Here is an example of what I want my data structure to look like:
[games]:
[game_1]:
players: 10
maxPlayers: 24
state: "PLAYING"
currentMap: "Example Map"
[game_2]:
players: 0
maxPlayers: 24
state: "LOBBY"
currentMap: "None"
I am using the Java implementation of Redis (Jedis) in order to cache data from registered game servers. A proxy server connects all the registered game servers together, however, the proxy cannot relay data such as this. Therefore, I have gone with the Redis approach and integrated it into the core plugin which is shared across all of the game servers. The lobby server will be able to access the data from Redis to display live game statistics to the players. How would I go about structuring this? I'm fairly new to Redis and hours of searching did not help. Please do explain this in simple terms.
I would like to be able to make method calls to get the data for a specific game and iterate through all cached games in the Redis database. (e.g. games: {"game_1", "game_2"})