Hi,

I recently wrote an article about the bank-transfer use case in App Engine,
and how to do it transactionally:

http://blog.notdot.net/2009/9/Distributed-Transactions-on-App-Engine

-Nick Johnson

On Mon, Nov 30, 2009 at 7:04 PM, Jeff Schnitzer <[email protected]> wrote:

> I'm pretty sure the answer to your question is "banking is not an
> appropriate problem space for Google App Engine".  Sure, you could
> eventually make it work by writing your own in-app 2pc layer, but why?
>  There are other platforms that make this easier.
>
> Consider also that there is no data robustness guarantee for GAE.
> Your data could go away without recourse.
>
> Use the right tool for the right job.  If you need fine transaction
> control across large datasets, GAE is probably not for you.  Most
> problem domains don't require the level of transactional integrity
> that banking demands.
>
> Jeff
>
> On Thu, Nov 26, 2009 at 7:40 PM, 风笑雪 <[email protected]> wrote:
> > I just watched some Google I/O videos about GAE yesterday, and I have
> > 2 questions about transaction.
> >
> > Assume I need to build a bank system, two clients (Alice and Bob) want
> > to transfer one's money to the other.
> > So when I create Alice and Bob, I must put them in the same entity group:
> > alice = User(name='Alice')
> > bob = User(parent=alice, name='Bob')
> >
> > If I have millions of clients, and they all have a chance to make a
> > deal with each other, then they should be all in the same entity
> > group:
> > adam = User(name='Adam')
> > alice = User(parent=adam,name='Alice')
> > bob = User(parent=adam, name='Bob')
> > chris = User(parent=adam, name='Chris')
> > ...
> >
> > As the presentation says, writes to the entity group is serialized,
> > and a write operation takes at least 10ms, a transaction needs at
> > least 1 reed and 3 writes, so I can't do more than 33 deals/sec, is it
> > scalable enough?
> > And having such a big entity group may easily cause high contention,
> > maybe most of the transactions will fail.
> > I wonder how could I break the huge group into small entity groups?
> >
> >
> > The second question is about the root entity.
> > The presentation says, root keeps a timestamp for the entire group.
> > But document also says, we can delete an ancestor, or just create a
> > Key for the ancestor that not exist to specify the parent of the new
> > entity.
> > So if the root has been deleted, or not exist at all, can this entity
> > group still transactional?
> >
> > --
> >
> > 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]<google-appengine%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
> >
> >
> >
>
> --
>
> 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]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

--

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.


Reply via email to