Code Monkey home page Code Monkey logo

custom-scheduler's Introduction

Version MIT License PR's Welcome Code of Conduct

Overview

The notification-scheduler is a lambda-function that is invoked using a cloud-watch schedule that triggers every 1 minute.

  • All notifications created by the clients are stored in the PostgreSQL notifications-database by the event-service with all the information required to send the notification to the client.
  • When the notification-scheduler is invoked it retrieves the notification from the notification-database that are to be delivered in the next minute and forward them to the notification-sns-topic as notificaton-messages.
  • The notification-sqs-queue subscribed to the notification-sns-topic recieves the notification-message as soon as it is published to the sns-topic.
  • The notification-service continuously polls the notification-sqs-queue and send the incoming notification to the clients.

Operating Instructions

Fork

  • Fork this repository
    • "Forking" adds a copy of adisakshya/custom-scheduler repository to your GitHub account as https://github.com/YourGitHubUserName/custom-scheduler
  • Or you can download or clone this repository
    • You can clone the repository executing below command in a location of your choice in your system
    • $ git clone https://github.com/adisakshya/custom-scheduler.git
  • Source code for the custom-scheduler can be found at /src
  • Serverless configuration is defined at /src/serverless.yml

Local Development

Prerequisites

  • Make sure you have
    • Installed the severless framework
    • PostgreSQL notification-database running and is accessible using host-url, username and password
    • AWS SNS notification-topic setup and is accessible using ARN

Starting the scheduler

  • In source directory src/ run the following command
    • $ yarn install - install required dependencies
    • $ yarn build - build source code
    • $ yarn test - run test (optional)
    • $ yarn start - start the scheduler
  • On successful start, the scheduler will be invoked every 1 minute and will start forwarding the notifications in the notification-database to the notification-sns-topic.

Contributing

There are multiple ways to contribute to this project, read about them here.

License

All versions of the app are open-sourced, read more about this LICENSE.

custom-scheduler's People

Contributors

adisakshya avatar

Watchers

 avatar  avatar

custom-scheduler's Issues

Schedule notifications using SNS and SQS

A lambda function is required that can be invoked by a cloud-watch scheduled event in every 1 minute, the service should fetch all notifications from notification-PostgreSQL-database to be sent in the next minute and forward them to the notification-SQS-queue via notification-SNS-topic.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.