Original Post
Hi.. long time reader.. first time poster.. :) While I am not a game developer, I find that this forum is amazing for good network coding practices and help. So, I am here to ask for your help. My design is very similar to an online game host system. I am trying to write a cloud solution for an application model that I have. The current application model is a simple client server.
Clients connect to the server and the server keeps the connected clients updated. This would be considered a session. The conceptual cloud model would look like this:
There would simply be multiple sessions running online. The cloud solution would simply look like one more connection to the server. The server would update its clients (the cloud being one of them) and the cloud would take that update and send it to all of the connected clients that are in that session (minus the sender of course). the physical model would look like this:
The basic idea is that each person connecting would connect to the gateway. They will be interrogated as to what session they want. They can request a list of all active sessions. Display that to the user and determine which session they want. When one is selected they request a session info from the gateway. (basically.. what server is hosting this session). As soon as they get the ip and port. they disconnect and connect to that server (SessionMgr). The sessionMgr has one listening socket.. SessionMgr interrogates the connection as well and ask what session they want. SessionMgr places that connected socket into the object hosting that session. One object (class) per session. The object will be overlapped i/o and will use 1 thread. AKA 1 thread per session. my question are: 1. Is this similar to how an online game solution would/could be designed? 2. What are the major drawbacks with TCP/IP with the internet (versus http/soap/etc) 2a. Do games that play online use tcp/ip or something else? 3. I was thinking of having both the gateway and the sessionmgr be a service. I was going to write it in ATL so I could use COM as well (attach my own debuggers and stuff using COM) 4. When needing a connection to a database, what is best? Is an active connection from each service (Gateway and Sessionmgr) good or some other solution like web services be better. Thanks in advance for all of your input!
Clients connect to the server and the server keeps the connected clients updated. This would be considered a session. The conceptual cloud model would look like this:
There would simply be multiple sessions running online. The cloud solution would simply look like one more connection to the server. The server would update its clients (the cloud being one of them) and the cloud would take that update and send it to all of the connected clients that are in that session (minus the sender of course). the physical model would look like this:
The basic idea is that each person connecting would connect to the gateway. They will be interrogated as to what session they want. They can request a list of all active sessions. Display that to the user and determine which session they want. When one is selected they request a session info from the gateway. (basically.. what server is hosting this session). As soon as they get the ip and port. they disconnect and connect to that server (SessionMgr). The sessionMgr has one listening socket.. SessionMgr interrogates the connection as well and ask what session they want. SessionMgr places that connected socket into the object hosting that session. One object (class) per session. The object will be overlapped i/o and will use 1 thread. AKA 1 thread per session. my question are: 1. Is this similar to how an online game solution would/could be designed? 2. What are the major drawbacks with TCP/IP with the internet (versus http/soap/etc) 2a. Do games that play online use tcp/ip or something else? 3. I was thinking of having both the gateway and the sessionmgr be a service. I was going to write it in ATL so I could use COM as well (attach my own debuggers and stuff using COM) 4. When needing a connection to a database, what is best? Is an active connection from each service (Gateway and Sessionmgr) good or some other solution like web services be better. Thanks in advance for all of your input!