Legend (C - client, GS - game server, MS - master server, DB - database) I have multiplayer game with 8 C connected to GS. GS is connected to MS who is connected with DB. After match i want update data in DB, but dont know which way (questions over post) sholud be better.
There’s no way I would have a match and have the clients themselves individually report their results to the master server. Trusting data like scores and kills from individual clients leaves yourself open to trivially easy hacking.
You included a legend for a 2 sentence question? Really?
I’ll assume your architecture is an authoritative’s game server. been said that, before the match start the master server must create a match object with all the players and the information you need to save, tell about this to the game server and then when the match is done the game server must define who is the winner and notifify to all clients and to the master server who the winner is, the master server then should save that information on your prefered database, using the information of the match .
Sorry my terrible english, is not my primary language
Game Server and Master Server are connected by example using RabbitMQ. After match GS converts data (using for example protobuf) and send message to MasterServer via RabbitMQ as persistent messages, when MS have time it iwill grab this message and update db. Another similar way to do this, use Kafka instead Rabbit - it is like logging send info and forget. After sending GS can shutdown, the data will be handled anyway