Giter Club home page Giter Club logo

scheduler's Introduction

scheduler

Description

Provides ability to manage background tasks with delay.

You set a task with any payload and can poll it state until completion.

In the same time, worker will claim this task, try to process it and push results back to the service.

API

Service implements JSON-RPC 2.0 and contains 2 types of API:

  • scheduler (public) used for setting a task;
  • worker (private) for processing a task.

Do you want to know more?

Design

Alt text

SLA

...

Deployment

Service uses environment variables for configuration.

Most important parameter is DB_DSN - address of a postgres instance.

You can see a full list of parameters in Makefile.

Docker

To get image run
docker pull ghcr.io/freundallein/scheduler:latest

Docker-compose example

Build

You can build scheduler via Makefile:

make build

Binary file will be delivered to ./bin/scheduler.

Example

For proper work you will need a client and a worker.

You can run example with client and worker via Makefile:

make run
make example

Ensure, that you change variables in Makefile, especially DB_DSN

Example code

Load test

...

TODO

  • extend unittests
  • add grafana dashboard
  • add prolong operation for worker
  • benchmarks
  • fill README.md

scheduler's People

Contributors

freundallein avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.