|
|
| Author |
Message |
|
| NtFL |
Posted: Mon Oct 01, 2007 8:36 pm |
|
|
|
Joined: 10 Sep 2007
Posts: 2
|
Hi all,
This is my first message to the forum and I am quite excited to be part of this community.
I am currently coming up with an architecture, for a fault tolerant multiplayer game. After considering all the quality attributes that have to be present, (performance, modifiability, usability…) I decided to have client- server architecture. I want my server side to be fault tolerant, so I decided to use workers and supervisors (a framework for running a server in a cluster to increase server availability) and come up with a cluster of servers.
There are some aspects of the design that I can’t seem figure out:
Is the connection from the client to the server a one to many or one to one relation?
Does the client connect only to the main supervisor in the supervision tree?
If a worker is modified (e.g. new features added) how is this propagated to its supervisor and other workers?
I was also thinking of having a three tier architecture consisting of the client-tier, server-tier and database-tier. I am however not sure if this will affect performance enormously. What do you think?
Any useful reply to my question will be appreciated and your suggestion on how you would have planed the architecture will be appreciated.
Best regards. |
|
|
| Back to top |
|
| Mazen |
Posted: Tue Oct 02, 2007 8:14 am |
|
|
|
User
Joined: 20 Jul 2006
Posts: 164
Location: London
|
EDIT: Forgot to welcome you Welcome!!
The connection between client and server should be one to one since you want it persistant. A client connects to whatever process that is listening for connections.
A very common way of doing this type of client-server solutions is to have one listening process which accept connections. The socket is then passed on to another process (or another process is spawned and takes control over the socket). Usually this is done by having a Supervisor starting the new process as a child. Check out the tutorials for how to build a TCP server[1].
When it comes to updating code, if you are using an OTP behaviour for your workers (usually you would want to use gen_fsm) when all you need to do (assuming that all your workers run the same code) is to load the new module in the shell and all the workers will automagically start running the new code on next request/event.
Hope this helped somewhat anyway
/Mazen
[1] http://www.trapexit.org/Building_a_Non-blocking_TCP_server_using_OTP_principles |
|
|
| Back to top |
|
| NtFL |
Posted: Fri Oct 05, 2007 12:07 pm |
|
|
|
Joined: 10 Sep 2007
Posts: 2
|
| Thanks for the response, the link was also really helpful. |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|