6 ms·
GAE Java only handled one request at a time till now?
by HowardRoark 15y ago
GAE Java only handled one request at a time till now?
- teraflop 15y agoOne request per server instance. The change allows multiple threads to run in each instance, so now your code has to be threadsafe.
- Smerity 15y agoYour code only needs to be threadsafe if you wish to enable the concurrent flag, otherwise your code will happily run as it had before. I just thought it's important to note that they're not forcing you to push a code update unless you want to handle concurrent requests with a single instance.
- eneveu 15y agoI was wondering about this in October, I guess the Vosao CMS needs to stop storing state in static fields now: http://stackoverflow.com/questions/4028787/is-it-thread-safe-to-store-data-inside-a-static-field-when-deploying-on-google-ap http://stackoverflow.com/questions/4028787/is-it-thread-safe... Thilo added answer a few hours ago, pointing out the new threadsafe mode for GAE. That's why I like StackOverflow.
- ShabbyDoo 15y agoWow. I'm not a GAE user, so I'm not embarrassed that I didn't know this. However, I'm surprised that such a restriction hasn't come up in all the blog entries I've read about GAE over the years.
- space-monkey 15y agoIt's not a huge restriction since GAE will happily spin up dozens of instances without any intervention if your load requires it. Getting multiple concurrent requests into each instance will make things like local memory caching somewhat more useful though.
- brown9-2 15y agoI don't really recall seeing this spelled out clearly in the documentation before.
- tybris 15y agoThat's pretty standard for Servlet containers.