3 ms·
FTA "My first version was hosted on Heroku and lagged like crazy." Hmmm even on heroku you should have pretty damn good responsiveness as I assume it should be
by darkxanthos 14y ago
FTA "My first version was hosted on Heroku and lagged like crazy."
Hmmm even on heroku you should have pretty damn good responsiveness as I assume it should be using what is known as "COMET" http://en.wikipedia.org/wiki/Comet_(programming) http://en.wikipedia.org/wiki/Comet_(programming)
The polling is just to reestablish the kept alive connection. Which while still less than ideal... I wouldn't think would be terrible.
Not saying the author is wrong but being that it seems like his first foray into socket.io it's a possibility.
- darkxanthos 14y agoOh and also! Great stuff and thank you for sharing! Personally, socket.io is the reason for node to exist. It's a beautiful marriage and I wish more people who learned node learned it in this context.
- marcgg 14y agothanks!
- marcgg 14y agoYes, it's my first time using socketio. So, yeah, I must have missed a lot. The gain in speed was visible, but maybe it wasn't for the reason I thought
- cmwelsh 14y agoWebSocket has much less latency and overhead than long-polling Ajax. Heroku just doesn't support it yet. The solution for now is to run your own WebSocket server on AWS or subscribe to a service like Pusher.
- marcgg 14y agoThat's how I understood it