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].
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