hook.io, redis, pubsub alternatives?

1,127 views
Skip to first unread message

Mark Hahn

unread,
Aug 4, 2013, 2:29:29 PM8/4/13
to nod...@googlegroups.com
What is the closest pubsub alternative to hook.io?  Or, what is your favorite pubsub solution?  When I searched for "pubsub nodejs" I got a headache trying to read them all.

My biggest problem was that all the pubsub alternatives don't mention whether they work between different instances of node (IPC).  Is it assumed that they all don't?

As I posted here recently I'd like to use a solution other than redis so that a user can just do "npm install myModule" and be done with it.

Angel Java Lopez

unread,
Aug 4, 2013, 3:46:15 PM8/4/13
to nod...@googlegroups.com
Hi people!

Just to mention my pet project:
not production ready, but maybe can help in the first stage

It can runs locally (same process) or be exposed to other process via RPC-like. 
I just added a fixed size for message queue, and a README for market sample


Angel "Java" Lopez
@ajlopez




--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Mark Hahn

unread,
Aug 4, 2013, 4:26:57 PM8/4/13
to nod...@googlegroups.com
Looks promising.  My project is at the very beginning also so maybe I'll give it a try.

Brian Lalor

unread,
Aug 4, 2013, 4:17:16 PM8/4/13
to nod...@googlegroups.com, nod...@googlegroups.com
I'd recommend ZeroMQ, but it does require a 3rd party library with development headers to be installed first. It's a great technology, however, and has bindings for a number of languages. 

How about Faye? Socket.io, or SockJS? Postal.js? 

--
Brian Lalor
--

Mark Hahn

unread,
Aug 4, 2013, 5:39:42 PM8/4/13
to nod...@googlegroups.com
As you said, ZeroMQ, Faye, etc. require a 3rd party library.  See below why I don't want this.

I'm already using Socket.io but I don't think it solves my problem and I think it requires redis be installed separately. There is virtually no documentation on socket.io with redis.

Postal.js falls into that category of pub/sub modules that make no mention as to whether they work across different node processes with IPC.  A blog entry talks about cross-frames in the browser but that is quite different.  I guess I'll have to dive into the code to figure this out.  Or I'll ask in an issue.

I didn't explain why I don't want the requirement for an external install.  My app is going to be a tool for developers to use that runs in their browser but it requires them to install a module on their server.  I fear that if they need to go to the trouble to install something like redis they'll never try it out. 

Stephen Belanger

unread,
Aug 4, 2013, 5:52:09 PM8/4/13
to nod...@googlegroups.com
You could try uhura. http://github.com/NodeFly/Uhura

I'm the primary contributor to Uhura. We use it at NodeFly to pipe around all our data. It's designed to behave mostly the same as socket.io, but only node clients are support so there's no alternative transports to much about with--just TCP. You can use a redis store to allow you to have more than one server instance, but that is not required.

I wouldn't really call that pubsub though. It assumes many clients connecting to one central receiver, while pubsub generally assumes multiple receivers.

If want you want is a many-to-many design for something like a service-oriented architecture, you'll probably want some sort of message queue system. It might be worth looking at http://github.com/visionmedia/axon, which is basically a zeromq clone without needing to install a native module.

Brian Lalor

unread,
Aug 4, 2013, 6:18:03 PM8/4/13
to nod...@googlegroups.com
On Aug 4, 2013, at 5:39 PM, Mark Hahn <ma...@reevuit.com> wrote:

As you said, ZeroMQ, Faye, etc. require a 3rd party library.

Faye doesn't require a 3rd-party library.  http://faye.jcoglan.com

I'm already using Socket.io but I don't think it solves my problem and I think it requires redis be installed separately. There is virtually no documentation on socket.io with redis.

They're complimentary, and socket.io doesn't require Redis at all.  Socket.io and SockJS provide two-way eventing/message-passing between separate Node.js processes or browsers.  You could easily create a hub that publishes messages to subscribers using simple strings for "topics".

Postal.js falls into that category of pub/sub modules that make no mention as to whether they work across different node processes with IPC.  A blog entry talks about cross-frames in the browser but that is quite different.  I guess I'll have to dive into the code to figure this out.  Or I'll ask in an issue.

Node's IPC between a parent process and spawned processes is just a pair of EventEmitters working together.  Either the parent or child can send() an object to its peer, or listen for the "message" event.  IPC is extremely simple; you're not going to get anything automatically.


Ilya Shaisultanov

unread,
Aug 4, 2013, 7:01:35 PM8/4/13
to nod...@googlegroups.com
I'm going to pimp my pet project as well - https://github.com/diversario/eventcast/

Basically, a multicast event emitter. I am also working on this - https://github.com/diversario/node-disco - which is based on eventcast, a little node discovery utility. Does that help at all?

Matteo Collina

unread,
Aug 5, 2013, 9:35:35 AM8/5/13
to nod...@googlegroups.com
Hi Everyone,

I'm also adding my take on the pub/sub problem: https://github.com/mcollina/ascoltatori.

Ascoltatori is a simple pub/sub API that provides an in-process broker or can be backed by RabbitMQ, Redis, MongoDB or MQTT.
The in-process implementation is faster than EventEmitter2, because it uses the same data structure that RabbitMQ uses.
BTW, it supports wildcards.

Have fun ;).

Matteo

Mark Hahn

unread,
Aug 5, 2013, 10:38:35 AM8/5/13
to nod...@googlegroups.com
Thanks everyone for helping me wade through this.  I can't believe it took me two days to figure out what will work for me.  There have been some misunderstandings in this thread on my part and some others, but everyone was helpful.

Faye looks perfect for me.  It requires no external redis-like engine until you expand to multiple servers which will never happen in my app.  Thanks Brian for pointing this out.

Faye will totally replace socket.io in my app.  It has a better architecture for my needs, especially exposing node instances in the server to the same api that the browser client sees. 

Thanks again.
Reply all
Reply to author
Forward
0 new messages