Trying most of the websocket engines I've concluded that best way is using Primus (a universal wrapper for real-time frameworks) so to be able to test any websocket framework that may come around without changing my functionality.
Even though that Primus does what it says, i've found myself in the situation were I wanted to scale .
Primus has many plugins and two of those are : primus-cluster and primus-redis-rooms. These two are the ones that use Redis pub-sub in order to scale when you have many node processes. The problem that I faced with both plugins is that I cannot send a message to an individual socket - spark . Meaning that sparks are not saved - passed to Redis so that each process knows how many sparks are in total .
Does anyone have an idea on how to implement this?
The problem with primus-redis and primus-redis rooms is that only implements broadcasting and not from one server -> a spark on a different server messaging.
As for the rooms hack that you suggest is an "ok" alternative but it's definitely a hack and provides a lot of overhead. I don't think it's that hard to create a plugin which:
It might take a bit longer to write then the hack you suggested but It would probably be worth the effort.