we are using UPD datagram for cross-process communication of node apps on 
the same machine. The performance is incredible.
here is the code repo:
https://github.com/SGF-Games/node-udpcomm 

regards,

ty


在 2011年4月28日星期四UTC+8上午8时32分08秒,kowsik写道:
>
> On Wed, Apr 27, 2011 at 5:00 PM, billywhizz <[email protected]<javascript:>> 
> wrote:
> > my bad. i was under the impression that stdio was full duplex.
>
> Full duplex is not the same as concurrent. Each TCP connection is
> full-duplex, but in order to achieve concurrency, you need multiple
> connections.
>
> > had a look at that article. the problem they were having was because
> > they were setting the backlog too small. you would be getting dropped
> > packets and connection refused errors just the same if you had done
> > the same thing with TCP. i find it hard to believe you could make TCP
> > as fast as a unix socket considering TCP has to go through the network
> > stack and TCP has all the packet overhead too... W Richard Stevens
> > says unix domain sockets are more efficient than network sockets and
> > that's usually good enough for me. ;)
> >
> > Unix domain sockets also allow you to use datagrams rather than
> > streams, which might be good depending on what your requirements are.
> > The datagrams are reliable and in-order over a unix socket though, not
> > like in UDP.
>
> There's a possibility that the datagram unix sockets are faster, but
> then you would have to account for the loss of messages in case of
> buffer shortage. If you explore sysctl, there isn't much to tune for
> unix sockets, but there are a bazillion options for TCP.
>
> K.
> ---
> http://blitz.io
> http://twitter.com/pcapr
> http://labs.mudynamics.com
>
>

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