On Nov 10, 2011, at 9:32 AM, pallav wrote: >> web2py is normally multithreaded when running as a WSGI app (as with its >> internal Rocket server, or Apache mod_wsgi). GAE is just catching up. >> One GAE consideration, though, is that while normally requests within the >> same web2py session are serialized, that is not the case on GAE. > > Thanks for the response. If I understand the response correctly it is > okay to enable the multithreading option in app.yaml because web2py > already is thread-safe? (I am trying to use Python 2.7 on GAE - this > is an experimental feature on GAE but I feel it is the way to go)
Right. I'm using 2.7+GAE as well, though I'm using the native Google Datastore API instead of the DAL, because I need transactions, which DAL doesn't support in the Datastore, especially under 2.7 (for reasons I can elaborate on if you're interested). > > I don't understand the implication of the second sentence though - if > responses are not serialized, what should I watch out for? I looked > through the book and it speaks about concurrent database transactions, > but not much else. That's the real issue. The web2py trunk (but not IIRC the stable release) has DAL support for select-for-update, which should give us transaction support with most SQL databases. But not with the Google Datastore, or presumably with other NoSQL databases. One workaround would be to use GAE with MySQL, I suppose.