Re:Messenger.js - dead simple API for multi-server communica...
by shtylman on Wednesday February 29, 2012 @10:41AM
(#3648200)
What makes you think this is faster than existing solutions? I see no benchmarks.
[ Parent
| on HN ]
Re:Messenger.js - dead simple API for multi-server communica...
by bascule on Wednesday February 29, 2012 @10:50AM
(#3648233)
There's no need to benchmark. Everything written in Node.js is insanely fast by default, because nonblocking is the secret to the roflscale sauce.
Re:Messenger.js - dead simple API for multi-server communica...
by weixiyen on Wednesday February 29, 2012 @04:59PM
(#3649908)
I will put them up. In theory it should be faster than something like DNode or anything that uses DNode (hook.io) because it doesn't have the TCP tear down from using HTTP to carry what is probably small payloads most of the time.
Right now it's as fast as Node.js will allow TCP to be, if that makes any sense.
Benchmarks will come as soon as I get some free time to sit down and do them all. I'll plan to compare with zmq+nodezmq, rabbitmq+nodeamqp, dnode, hook.io. Any others?
Re:Messenger.js - dead simple API for multi-server communica...
by bascule on Thursday March 01, 2012 @01:33AM
(#3651184)
You do know what HTTP keepalive is, right?
Re:Messenger.js - dead simple API for multi-server communica...
by weixiyen on Thursday March 01, 2012 @05:00PM
(#3654262)
Eh, correct, but you still pass unnecessary headers each time as part of the payload. It would even up the speed theoretically, but it's still a request reply model that demands a response, and you really don't need that for pub/sub for example.
TCP just feels cleaner as a protocol for this kind of stuff but I would certainly concede that speed of HTTP isn't as bad as people would make it out to be.
Also, I'm considering adding createFastSpeaker and createFastListener to the API for people like game makers who don't need to guarantee delivery of certain data over UDP.