Hi Chris, Yes, you can design complex apps using the datastore and have support for transactions or transaction-like operations. One question you need to ask is why do you need a transaction, or what are you trying to accomplish by using the transaction? I often see people using RDMSs put everything inside transactions for no apparent reason, for instance when inserting a single row.
STOP thinking in terms of SQL -- repeat that 10 times, loudly. Model your data based on what it is and how you will get it, search it, and present it. Do not be afraid of denormalizing your data a bit. Beyond that, It is very hard to give general advice about how to model your data. As for transactions, keep entity groups small. Most likely, small entity groups will ultimately benefit you. Make sure you actually need transactions. When you do, decide if eventually consistent is OK, or if you need immediate and 'strong' consistency. Either way, you've got some good options that easy to implement: 1) use datastore transactions when needed, 2) use transactional tasks, 3) see Nick's blog on distributed transactions. http://code.google.com/appengine/docs/python/datastore/transactions.html http://code.google.com/appengine/docs/python/taskqueue/overview.html#Tasks_Within_Transactions http://blog.notdot.net/2009/9/Distributed-Transactions-on-App-Engine Robert On Tue, Dec 28, 2010 at 06:46, chrissnow <[email protected]> wrote: > I have a strong background in RDBMS and java, but I am new to > datastores like appengine's datastore. > > I'm currently working through the OReilly Programming Google App > Engine book and am focusing on the python implementation. While the > book gives a lot of good theory, it doesn't have much info on data > model design - particularly around designing for transactions. > > Coming from the java world, using transactions was easy and very > necessary for complex apps. However, I can't work out if a relatively > complex app could be done with datastore because of the entity group > constraints for transactions. > > Is there any documentation recommendations on data model design for > appengine datastore? In particular, how to design for best use of > transactions. > > Many thanks in advance, > > Chris > > -- > 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. > > -- 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.
