I'm programming a multiplayer game for mobile phones.I'm working on a distributed server architecture for handling lots of concurrent players.
Here is my architecture on my mind:
Some questions about that architecture:
1-) How can i provide a secure login on Login Server?Here is what i'm thinking:
- Client connects to login server.
- Login server sends its public key(RSA encryption)
- Client encrypts its username and password with login server's public key.Then sends that packet to login server.
- Login server verify username-password information with connecting database server.
- Login server creates auth token and sends back to client.
2-) How can i secure database queries?Also can that be so slow?Here is what i'm thinking:
- Client sends its auth token with query packet.Also client sends its random public key.
- Database server verify that auth token.
- Database server replies with encrypted(with clients random public key) reply packet.
- Client decrypt it with its private key.
3-)How can i merge game servers working like a single game server?
Am i on the right way of doing a mmo server design?I'm using Java and Kryonet library for server programming.