It looks like ZeroMQ does not play well with the asynchronous nature of
Node. Take a look at the following gist:

https://gist.github.com/3966362

I would expect to see three replies from the server, except there is only
one. This occurs when the server tries to reply out of order. Changing the
send order to the following works:

sockit('thr').send( JSON.stringify({timeout:0,name:'thr'}) )
sockit('two').send( JSON.stringify({timeout:1000,name:'two'}) )
sockit('one').send( JSON.stringify({timeout:5000,name:'one'}) )



On Sat, Oct 27, 2012 at 11:46 AM, Alexey Kupershtokh <
[email protected]> wrote:

> I'm also interested in this theme.
>
> AFAIR, dnode 6 months ago was good in features but terribly slow comparing
> to socket.io/axon.
>
> https://github.com/visionmedia/axon looks interesting, but unstable yet -
> I have already found an issue (
> https://github.com/visionmedia/axon/pull/62 ). Also I don't like it's
> feature to open a new socket/port for each communication type.
>
> Also I don't like Socket.io's feature that it doesn't free ACK callbacks
> (probably already does) which is a leak for long & intensive s2s sockets.
>
> воскресенье, 28 октября 2012 г., 1:32:19 UTC+7 пользователь Jacob написал:
>
>> I was wondering what others are using for communication between back-end
>> servers. Since I control all involved servers, I would rather not include
>> authentication at the application layer. Forwarding SSH ports is perfectly
>> acceptable.
>>
>> On that note, my own research has lead me to three options, in order of
>> personal preference:
>>
>>    1. a message queue (ZeroMQ)
>>    2. websockets (socket.io)
>>    3. synchronize against the database (MySQL or Redis)
>>
>> ZeroMQ seems pretty awesome, but I am curious if anyone has tried it, and
>> what there experience was. For example, I stumbled across an article
>> discussing how their REQ/REP model can lock up 
>> easily.<http://lucumr.pocoo.org/2012/6/26/disconnects-are-good-for-you/> The
>> workaround is fairly simple, but I am interested in soliciting more
>> experience in the area.
>>
>> Websockets seem like a "native" way, but I see them as living in the
>> client-server domain. For example, I would have to setup express and a
>> basic restful service on each back-end server. Websockets are also 1-to-1,
>> where as ZeroMQ supports N-to-N connections.
>>
>> Synchronizing against the database would involve polling to achieve
>> real-time like events. I know Redis supports a pub/sub system, but does not
>> seem to have any RPC-like mechanisms.
>>
>> In the end, I will make the decision best suited to our needs, but I am
>> sure I can gain from some discussion on the matter.
>>
>> Thanks everyone,
>>
>> - Jacob Groundwater
>>
>  --
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to