A Ruby-based lightweight publish-subscribe messaging system(github.com)
github.com
A Ruby-based lightweight publish-subscribe messaging system
https://github.com/derekcollison/nats
5 comments
Can anyone suggest an exisiting tool to achieve the following--what I want isn't quite a message queue, but has similarities.
-Queue paths that clients can subscribe to for pub/sub.
-Queues that, upon reconnect, replay their history to date.
-Api for listing listeners and their IP's
-Fast
-Scalable
-Heartbeating or presence
-Status-queues (a queue that sends the same message on first connect, and only re-broadcasts when the status changes)
-API that lets you view messages non-destructively
-API that lets you list clients
-Queues that broadcast a message to all
-Round-robin queues
Do I need to roll my own, or have I missed some existing tool?
-Queue paths that clients can subscribe to for pub/sub.
-Queues that, upon reconnect, replay their history to date.
-Api for listing listeners and their IP's
-Fast
-Scalable
-Heartbeating or presence
-Status-queues (a queue that sends the same message on first connect, and only re-broadcasts when the status changes)
-API that lets you view messages non-destructively
-API that lets you list clients
-Queues that broadcast a message to all
-Round-robin queues
Do I need to roll my own, or have I missed some existing tool?
I haven't seen any one product that does all of that, but generally I want to separate heartbeating and status updates from the other queue functionality. ZooKeeper will do a lot of the heartbeating, presence, status changes, list clients, etc. I don't think it's designed to function as a queue though. I think with a combination of Redis and ZooKeeper you could get what you want.
I don't know if something like this exists, but if you do roll your own I would recommend using Redis as the backend - either have your clients connect to Redis directly and have a "tender" process keeping track of the keys, or just use Redis "behind" the queue server.
How is it different from faye? Faye is also eventmachine ruby code. Faye is 'simple' and NATS is 'lightweight' ?
What is the advantage of this over zeromq? zeromq supports intra-process pub/sub messaging.
Having said that, 0mq is probably a better choice these days since it's cross language. Still you can build some fun stuff with nats.