Warning: this post is a little technical.
The point is that I have finally come up with a way to efficiently and effectively to communicate within the four different servers.
All servers are now completely in sync!
The UDP server(s) only receives the session id.
And instead of performing a loop through all players (which is very inefficient),
I now store them by session.
What does this mean? TCP and UDP servers are now effective at player look-ups;
a bottleneck in warrock emulators.
The auth and game(that includes tcp and udp) are also in sync - and with less overhead. I use a named pipe (NP) for local communication (and asynchronous too!).
Session ID:
The session id is dynamic. The game server holds all (still online) players. When
somebody authorizes succesfully, the auth server requests a available session id from the game server (through the NP). At this point the game server will check the user's details again, and find an available id (and responds to the auth server),
This means the user is already loaded at this point, and the (Tcp) GameClient is added later, when Tcp communication starts.
This also means the auth server will be updated with what (or how many) characters are online, along with lots of other data it might want to have access to at certain points.
I have little time to work on this project at the moment.
I am trying to learn functional programming, play some Call of Duty: Ghosts from time to time, and need to start doing some work for school.
The project is certainly not abandoned, however it might have a 'fresh' start now that I have better insight in Warrock's network structure -> this does not mean my current code will be lost, it will be revised though.