Hi Chau:
Thanks for your tips. I've also found one in there:
http://appengine-cookbook.appspot.com/recipe/mutex-using-memcache-api/
Pretty good solution to try, though.

On Apr 23, 9:53 pm, Chau Huynh <[email protected]> wrote:
> Maybe you can look into low level API to obtain a 
> "lock"http://code.google.com/appengine/docs/java/javadoc/com/google/appengi...
>
> There're also sample implementation using this posted in the 
> grouphttps://groups.google.com/group/google-appengine/browse_thread/thread...
>
> On Fri, Apr 23, 2010 at 11:23 AM, Phuong Nguyen <[email protected]>wrote:
>
>
>
> > Hi guys:
> > I'm creating an app that I need to deal with concurrent modification of
> > object.
> > Given I have an object that I need to store on memcache.
> > Now, given my user base would be big enough for two request to arrive
> > simultaneously at  two different servers in the cloud.
> > So, in order to modify the object, the server #1 that receive request fetch
> > the object from memcache (Correct me if I'm wrong: this will deserialized
> > raw data on memcache in to Java Object on Server #1 JVM), modify it and then
> > put it back to memcache (which in turn serialize the object).
> > At the same time, server #2 tried to modify the object on memcache.
>
> > Under this scenario: Server #1 fetch object> Server #2 fetch object >
> > Server #1 store object > Server #2 store object
> > Then all changes make by Server #1 will be overrided by Server #2.
>
> > If these 2 requests happen on the same Server (and in effect, the same
> > JVM), then I believe the use of synchronized access will help. But in case
> > they happen on different server, then I don't know how to handle them yet.
>
> > Would you guys advice me on that?
> > Thanks.
>
> > --
> > 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
> > [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-appengine-java%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

-- 
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 [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-java?hl=en.

Reply via email to