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].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.


Reply via email to