Think hard before locking a table while a user is dawdling over his 
reservation.

The feature you are dealing with is database "isolation 
level<http://en.wikipedia.org/wiki/Isolation_%28database_systems%29>" 
and is the subject that fills volumes of database theory.  From what you 
describe I think you want the "repeatable read" level.  I do not know 
enough about GAE to tell you which levels it supports.

-- Joe B.

On Thursday, November 29, 2012 2:18:47 AM UTC-8, José Manuel López Muñoz 
wrote:
>
> I'm making a room reservation system in Web2Py over Google App Engine. 
> When a user is booking a Room the system must be sure that this room is 
> really available and no one else have reserved it just a moment before. To 
> be sure I make a query to see if the room is available, then I make the 
> reservation. The problem is how can I do this transaction in a kind of 
> "Mutual exclusion" to be sure that this room is really for this user?
>
> Thank you!! :)
>

-- 



Reply via email to