> I guess what I want to have is some kind of check and lock. My
> question is how to implement an "efficient" lock on a distributed
> environment like GAE. Transactions? Or better using memcache?
>
>
> Is there a best practise how to implement that?

I'm not saying this is best practice but just throwing it out there...

1 start transaction
2a run check on entity on whether AccountStatus needs generation
2b (if AccountStatus needs generation && AccountStatusLock entity is
null  )  store entity Key or unique identifier in separate
AccountStatusLock entity
2c commit transaction [which stores AccountStatusLock]
3a generate AccountStatus
3b commit entity with generated AccountStatus
4 delete AccountStatusLock

Shawn

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

Reply via email to