Let's clarify this once more. GAE supports transactions ONLY at the level of one entity group (for practical purposes, transactions involving one single record). They are not the normal transactions of a SQL database.
We will add a special API to handle single record transactions but there is nothing we can do about the fact that GAE does not provide real transactions. This is a big limitation of GAE and it is due to the fact that they distribute queries on BigTables. Massimo On Jan 18, 8:38 am, Robin B <robi...@gmail.com> wrote: > > Sorry, I don't quite understand. Would implementing GAE transactions > > result in a change to how we call on the DAL? > > Yes. > > The proposal mentioned above is explained > here:http://groups.google.com/group/web2py/browse_thread/thread/293fe4c58f... > > We can provide both notations: > 1) row.update_record(count=db.table.count+1) > 2) row.update_record(count=lambda r: r.count+1) > > db.table.count+1 and lambda r: r.count+1 is nice syntax for atomically > updating a single record, but it does not make it easy for the > application handle transaction failures in a cross driver way. Also > if you want access to the full power of appengine transactions which > is required to create locks, create_or_insert/unique-constraints, > create/read/update/delete other records in the same entity group, it > should not be done in an update_record lamda. > > To get the full power of appengine transactions, you would need: > > txn = db.build_transaction(mytxn) > > which allows you to create/read/update/delete other records in the > same entity group and handle transaction failures in a consistent way. > > Robin > > > P.S. the more I work with Google Big Table, the more I'm finding it > > very crippled... (and crippling in terms of development difficulty) > > It might feel like more difficultly up front, but you gain complete > scalability, so you do not have to rewrite things later on to scale. > > If you want to experience real development difficulty, you could try > designing/configuring/operating a multi-master relational database, > now that is painful! ;) > > Robin > > On Jan 18, 8:11 am, Jonathan Benn <jonathan.b...@gmail.com> wrote: > > > Hi Robin, > > > On Jan 18, 3:30 pm, Robin B <robi...@gmail.com> wrote: > > > > Calling the txn(...) returns whether the txn suceeded or failed, so > > > you do not have to handle any custom exceptions outside the dal. For > > > SQLDB the txn(...) will allways return True. > > > Sorry, I don't quite understand. Would implementing GAE transactions > > result in a change to how we call on the DAL? > > > P.S. the more I work with Google Big Table, the more I'm finding it > > very crippled... (and crippling in terms of development difficulty) > > > --Jonathan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---