A Node.js speed dilemma: AJAX or Socket.IO?
1–10 of 19 posts
Re: A Node.js speed dilemma: AJAX or Socket.IO?
#2Re: A Node.js speed dilemma: AJAX or Socket.IO?
#3Re: A Node.js speed dilemma: AJAX or Socket.IO?
#4Re: A Node.js speed dilemma: AJAX or Socket.IO?
#5Re: A Node.js speed dilemma: AJAX or Socket.IO?
#6I tried node.js and some modules a couple of weeks ago. It was pretty easy to set up and I had a "working" chat application in few hours with socket.io. It was 20-30 lines of code, provided callback to send data immediately to other clients.
I don't think polling the server every 500 ms is a good practice, say 5-10 sec or more can be reasonable, but with socket.io you got it instant.
Re: A Node.js speed dilemma: AJAX or Socket.IO?
#7"transport" of Socket.IO plays major role (but, it's not smooth/plug 'n play). Benchmark missing note about chosen transport.
socket.io falls back to long polling, so you have to be careful when trying to produce benchmarks based only on websockets. I didn't see this in the server code so I assume the default transports were used.
io.configure(ENV, function(){ io.set('transports', ['websocket']); });
more here: https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Soc...
Also, Firefox version would be nice to know.
Re: A Node.js speed dilemma: AJAX or Socket.IO?
#8Re: A Node.js speed dilemma: AJAX or Socket.IO?
#9Anyone have any experience / advice?