Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swizec/rapid.queue
rapid.queue is a lightweight boss+queue+workers system built on node.js with a redis backend.
https://github.com/swizec/rapid.queue
Last synced: 3 days ago
JSON representation
rapid.queue is a lightweight boss+queue+workers system built on node.js with a redis backend.
- Host: GitHub
- URL: https://github.com/swizec/rapid.queue
- Owner: Swizec
- Created: 2010-11-01T16:14:42.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2011-01-13T17:01:42.000Z (almost 14 years ago)
- Last Synced: 2024-04-08T15:42:22.260Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 145 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WHAT
The general idea of rapid.queue is helping people write async API's.
The way it works is:
- listen for incoming http connections
- get tasks from http
- push tasks to queue
- multiple workers pull from queue
- once a worker is done, post result over http back to client# USAGE
The settings.js file contains some basic configuration options.
Run a redis server with default configuration.
Run the boss.js with port and listening ip
node boss.js 8124 127.0.0.1
Run foreman.js and it will start the workers and make sure they keep runningTo get a list of tasks in a certain queue just access boss.js from
your browser with a queue argument, something like so:
http://127.0.0.1:8124/?list=tasks&queue=testingYou can see the logs by going to: /?list=logs
## API
To add a task to the server send a POST request to your configured listener address
with the following JSON data in the body:{callback: '',
queue: '',
parameters: }The task will be passed to your chosen worker function.
When processing the task is complete the same task with an added result parameter:
{callback: '',
queue: '',
parameters: ,
result: }# DEPENDANCIES
* http://github.com/mranney/node_redis
* http://github.com/Slashed/daemon.node
* http://github.com/caolan/async
* http://bitbucket.org/mazzarelli/js-opts/wiki/Home
* http://github.com/mikeal/node-utils/tree/master/request/
* http://github.com/weaver/node-mail (if you want error notifications)