Hi, I'm writing a simple game server where players can create games
and browse games. I've come across the following dilemma though and
want to see if my solution is a good idea. The dilemma:

User A calls joinGameAndRemoveItFromList().

User B calls fetchAvailableGamesInList() at the same time.

I'm concerned that User B may fetch the game that User A is joining
and removing from list (since it's no longer available)

My solution would be to lock the game list while User A is making his
call. That way User B would wait until User A is done with the list.

However, I realize that this could be very slow. Say there's thousands
of players all wanting to browse the available games (hey it could
happen!) and they shouldn't all have to wait for A to finish,
especially if A is slow for some reason.

Does anyone have any advice on if this is the right way to go, or if
there's a better solution?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to