All IPC goes through a single (per machine) routing server which handles routing messages to the various node.js processes, which may or may not be on the same physical server. Only communications are for objects around the edges of the squares, for collision detection etc. and for transferring websocket connections to another node.js process.
After a lot of thought, that seems to me to be the best way to work out a scalable solution. Have yet to see if it'll work well, but I see no reason why it shouldn't. Now if only I had enough users to test it..
Oh, and thanks for the great 0MQ library! :)
I wrote a tiny little script to test the max number of concurrent connections.
https://github.com/JustinTulloss/zeromq.node/blob/master/exa...
On my OS X machine it fails at 893 open connections. I compiled zeromq to have max_sockets = 5000 (zeromq2/src/config.hpp)
The error is:
s_849.send(msg); Too many open files rc == 0 (mailbox.cpp:374) Abort trap
What am I doing wrong? Should I just have one connection to zeromq and have all my async callbacks use it? I have a comment below that describes what I am trying to build. Thanks!
It will give you event passing across machines in a really concise way.