Reputation: 8387
Core features of node.js as far as I understood are (also): event-based structure and very cheap "threads" sleeping. So, it may be really good idea (and probably cheaper) to do not create periodic ajax requests, but to hold events like "user A got a new message" and let user's A connection thread sleep until this event happens.
How do you think - what would be cheaper for server (RAM, CPU) to use?
Upvotes: 1
Views: 307
Reputation: 15829
Take a look at socket.io for pushing data. It really is very good.
Upvotes: 3