Hi!
Been reading a bit about the subject, and out of curiosity, online games which maintain a "lobby" system that lists games;
How do they keep each client synchronized with the current games list state?
I'm talking in a "client asks for the games list update" terms and not in event driven terms (game's state changes and immediately broadcasts it <--- not scalable!).
Possible scenraio:
A server holds 5000 connections to online players.
It has a list of 1000 games.
A client asks for a games list update every one second.
Now the server needs to iterate through all the games list and compare the last update time of each particular game, then if it sees that the player's last update is older it will send an update.
This means that every one second it is going to have (5000 * 1000 = 5,000,000) iterations!
Is there any practical way to avoid it?
Did you do it already, and can share a tip with me?
I've been thinking about having a cache. What's your solution?