S
S
SKEPTIC2019-07-17 21:54:44
Python
SKEPTIC, 2019-07-17 21:54:44

How to store player data on the server?

There is an online card game, let's say the game is something like "Fool".
How to store game data, i.e. how to store each game on the server?
Data: players who take part in the game and all moves.
After the end of the batch, the data must be deleted and the result of the batch sent to the database.
So: I've been scratching my head for the second day, I can't figure out how to store data. I tried to store in nested lists, but I got a low server performance, about 1000 requests per second, but 10,000 are needed.
And what is the best way to make a server? Asynchronous or multithreaded? It seems that the game is simple, the player sends data to the server once per second, and I got into a stupor.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2019-07-18
@Messiah_v2

Well for that OOP. There is an object - a game. It has 2 objects - the player.
The game keeps a log of actions, after achieving victory - saves.
And concerning the server... I suggest an asynchronous socket server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question