Hacker News new | ask | show | jobs
by stunt 1098 days ago
The session thing looks really cool, but when do I need it? I can develop a simple real-time app using socket.io or a service like Pusher.

Why would I choose this instead? That isn't clear to me yet.

1 comments

If you write a socket.io service that uses broadcast, and then scale up to more than one server, your users will be split between those servers and won’t be broadcast to the other. Jamsocket allows you to generate a unique hostname for each room that ensures that every user is talking to the same server. That server can still use socket.io in addition to Jamsocket; they work at different layers of the stack.

Pusher solves the problem of scaling in a different way, which is by giving you an HTTP endpoint to send events to. It’s better for large broadcast groups (e.g. sending people sports scores) but doesn’t run any compute for you.