Hi Cornel, Atomic transfers between accounts is a classic example of a 'hard' scalability problem. It's being tackled on App Engine, however, with higher-level transaction libraries. There were a couple of talks about it at I/O this year: http://code.google.com/events/io/sessions/DesignDistributedTransactionLayerAppEngine.html http://code.google.com/events/io/sessions/TransactionsAcrossDatacenters.html
-Nick Johnson On Thu, Aug 6, 2009 at 8:30 PM, Cornel<[email protected]> wrote: > > Hello. I'm using app engine to write a business application. I've read > that during a transaction one can modify only entities within the same > entity group. How would one approach the following scenario? : > > Consider the "Account object" with the "Owner" and "Credit" fields. > > If i want to make a credit transfer between accounts A and B > (A.credit--; B.credit++), it must be done in a single transaction. > That can only happen if A and B are in the same entity group (from > what i understand) > > Since a credit transfer can be done between any two random accounts, i > must put them all in the same entity group; but this way, two > unrelated transfers (A to B and C to D let's say) cannot be done at > the same time anymore. Which again is not desired (i understand that > having a single big entity group is bad practice) > > I think this is a pretty general problem (not related only to this > scenario), so how is it solved? > > > > -- Nick Johnson, Developer Programs Engineer, App Engine --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
