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" <botte...@gmail.com> 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 google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> 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 google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to