Yes, you're right, I thought it was required, but supplying the element is now required, thanks for pointing that out. I don't see why you wouldn't want to use thread safe though, especially for Java apps and libraries that are in other environments also built with thread safety in mind.
Hugo On Tuesday, September 25, 2012 8:45:42 PM UTC+2, Andrew Mackenzie wrote: > > Hi Hugo, > > Thanks for the comments. > > But its not moot. The element in appengine-web.xml is obligatory, but can > be set to false. Current production environment respects it. I have done > many tests to verify that with overlapped requests and the changes in > behaviour when changing that setting. > > Point taken about multiple parallel instances and ds/mc. I thought I > discussed that but maybe left it out in final version - not > "multi-threading within a VM" or affected by setting in question > though.....we could call that "instance-safe" :-) > > Thanks > > Andrew > On 25 Sep 2012 18:52, "Hugo Visser" <[email protected] <javascript:>> > wrote: > >> Hi Andrew, >> >> To me, the whole point is kinda moot, since threadsafe is a required >> setting for Java apps (which is a good thing). >> >> Also, the points that you raise in the post are not different from the >> gotcha's as they are present in a "normal" Java servlet stack. There's not >> much App Engine specific in there. >> >> The statements like "static initializers are safe" are technically not >> correct; while it's true for a single instance running multiple threads, >> your app will still run on multiple instances. So if you are doing >> something funky in a static initializer (like writing to the datastore) >> there's still the possibility of race conditions or data corruption. >> Same holds true for writing to memcache and the data store that you >> describe in the post: even if your app is single threaded, a production app >> will run on multiple instances which could all concurrently write to the >> same entity or memcache entry. >> >> I hope you find this useful :) >> >> Hugo >> >> On Monday, September 24, 2012 2:41:25 PM UTC+2, Andrew Mackenzie wrote: >>> >>> I have published an analysis of using multi-threading for GAE/J here >>> http://devcon5.blogspot.com for a project I am working on. >>> >>> I would very much appreciate any comments, corrections, ommissions or >>> additional questions I should cover. >>> >>> Thanks. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/google-appengine/-/lHqF2_MQTAIJ. >> To post to this group, send email to >> [email protected]<javascript:> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:>. >> 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 view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/WDs3o9-C-14J. 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.
