So, this appears to be one of the most common WebSocket related problems we see around here. As long as you have a single process (daemon/morbo), everything is super simple. But then you want to scale up a little and use multiple processes or even servers (prefork/hypnotoad), suddenly passing around messages through some shared data structure doesn't work anymore.
In the past we would have told you to use Redis pub/sub, but a few releases ago PostgreSQL got something similar with LISTEN/NOTIFY. Only one problem, PostgreSQL does not handle huge numbers of concurrent connections very well, which is a little bit at odds with WebSockets. There is a solution though, every server process only uses one database connection for all of its message sending and receiving. And that's what the latest Mojo::Pg release (1.09) focuses on with its new pub/sub system.
The example WebSocket chat app (originally written by Joel) that is included with the release not only works out of the box, it also scales quite well.
I'm very happy with how it turned out, and hope you'll build some cool apps with it too. ;)
--
sebastian