Hi James,
Thanks for pointing out. But please forgive my bad, what is CAS?
(I'm keeping the object for some modification before actually write it
to the Datastore)

On Apr 23, 8:00 pm, James <[email protected]> wrote:
> It sounds like you're looking for memcached CAS 
> -http://groups.google.com/group/memcached/browse_thread/thread/b98fc70...
>
> Of course, this all begs the question of what you do if your data is
> expunged from memcached.  Are you not also writing to the datastore
> (which has its own concurrency mgmt for cases like these)?
>
> James
>
> On Apr 23, 12: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].
> > 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 
> 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