Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A Ruby-based lightweight publish-subscribe messaging system (github.com/derekcollison)
28 points by stevewilhelm on Dec 31, 2011 | hide | past | favorite | 8 comments


For those who don't know, nats is at the core of cloudfoundry. It's a great tool if you're in an all ruby world. The author wrote messaging software for Tibco before vmware so he knows his stuff.

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.


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?


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' ?


Interesting, but why force people to type NATS in caps all the time?


There you go:

    nats = NATS


What is the advantage of this over zeromq? zeromq supports intra-process pub/sub messaging.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: