Your requirement to be able and spin up more servers of the same "game"
requires a lot of sharing between each of these servers, because they
need (eventually) to be in the same state. The only advantage of this
over having a single server for each "game" is that you load balance
incoming traffic and concurrent connections, but introduce
connections/traffic between the servers. Then even more problems arise
when a 3rd server comes in, and every action means notifying also the
other two servers.
Even if you implement this, i dont think it will be sustainable, as you
can imagine.
Maybe we have to redesign how we think about MMO servers. Just a quick
idea: Only one server handles a specific area/city (literally) of the
game. So you limit the shared state, and can still scale to many machines.
You also have to classify your data.
Eg in-game messaging system can be in some db that each server asks when
player visits mailbox. (no need to IPC since it is not a "realtime" message.
But player location has to be the same on all servers every moment, so
movement messages must be sent out straight away (no db).
Good luck with your project ;)
danmilon.
> <mailto:
nguyen...@gmail.com>> wrote:
>
> I think it turns out too detail when discussing about
> code/business processing here.
>
>
> To imagine easier, please look at below diagram:
>
> As you can see, we have 2 users access to the same game hosted
> in 2 nodejs servers. Client communicates to server through web
> socket protocol, example user1 joins game and stick with
> server1, user2 joins and stick with server2, of course through
> proxy server as load balancer. 2 users on the same scene of
> game, assume user1 attacks user2, so user2 must see user1's
> action and vice versa.
>
> So nginx or node http proxy can help us on this situation
> transparently with as less effort as possible? Or any
> different solution to get over it?
>
>
>
> --
> Job Board:
http://jobs.nodejs.org/
> Posting guidelines:
>
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to
nod...@googlegroups.com
> <mailto:
nod...@googlegroups.com>
> <mailto:
nodejs%2Bunsu...@googlegroups.com>