[GTPS][Discussion] Adding game data manually is allowed only on the client side

 Adding game data manually

The issue on the table

So far, the basic work flow with the server and the client is the following:
  • the server stores game data found in game_db.
    • the data are retrieved from Wikidata.
    • the data are prepared in advance before launching.
    • the server keeps the data up to date by synchronizing with Wikidata regularly.
  • the client requests game data from the server.
    • if the game data doesn't exist in `game_db`, the server tries to find the game in `Wikidata`.
      • if the game is found in `Wikidata`, the data is directly stored in `game_db`, then the data is sent to the client.
      • if the game is not even found in `Wikidata`, the server allows the user to enter the game entry manually into `game_db`.
        • then, this manual entry is sent to the client.
      • the manually created entries are marked with a flag.

This has been causing a lot of difficulties while implementing the logic. Also, there are potential issues.

  • `game_db` could be stored with game data that are not true.
  • multiple users can store same games at the same time.

The solution for the issue


Considering these matters, changes in the current logic and plan should be made. The changes are:

  • the manual entry is only implemented on the side of the client.
    • If the game is not found anywhere, the user is allowed to enter the data manually, with the flag(`manually_created`) on into the database on the client side only.
    • Regularly, the data on the client database and `game_db` are synchronized, while `game_db` is kept up to date Regularly.
      • if there are any matches for the manual entries, the data on the client's server are updated, with the flag off.
      • if there are no matches for the manual entries, the entries remain same.

Comments