rubywebsocketeventmachineem-websocket

Scaling multi-channel pub/sub via web-sockets


I have been looking into this gist which provides a minimal functional implementation of channelled pub/sub style communication over websockets.

For multiple channels we can have a local hash of EM::Channel instances which can be created on the fly as per requirements. What I am concerned with is how can this setup be scaled to support a cluster of server instances or what alternatives are available to facilitate channeled pub/sub via web-sockets which are usable in clustered deployments ?


Solution

  • The Jet Protocol provides strict pub/sub (no-poll) semantics and is open source. It is far more powerful than subscribing to "Channels" (It is called "Fetching" in the Jet wording.