GithubHelp home page GithubHelp logo

queue's Introduction

queue (working title)

A multi-threaded in-memory single-server transactional queue.

A combination of a rust learning project and an experiment aimed at creating a transactional queue.

This project seeks to create a queue that is as simple to deploy and robust as redis but is restricted to just queues and provides transactions.

transactions

Workers can crash or be explicitly terminated. Without some mechanism to store unfinished jobs data will be lost.

When using redis as the basis for a queue there are no transactions. One workaround is to use RPOPLPUSH, upon starting a job pop off the main queue and push to a worker specific queue. Once a job is finished remove the data from the worker specific queue. When a worker starts it checks its specific queue and runs any jobs that had not finshed. For more information see https://github.com/mperham/sidekiq/wiki/Reliability.

This works perfectly well but is conceptually complicated and relies on being able to easily identify each worker.

commands

QUIT

Self-explanatory

PUSH queue_name, data

Push to queue. Will create queues if they don't exist.

POP queue_name

Pop the oldest data off of the queue.

BPOP queue_name

Blocking pop. Pop the oldest data off of the queue but block if there is no data.

BEGIN

Start a transaction.

COMMIT

Commit a transaction.

ABORT

Abort a transaction.

queue's People

Contributors

hfaulds 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.