Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

GAE Java only handled one request at a time till now?


One request per server instance. The change allows multiple threads to run in each instance, so now your code has to be threadsafe.


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

Thilo added answer a few hours ago, pointing out the new threadsafe mode for GAE. That's why I like StackOverflow.


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


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


It'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.


I don't really recall seeing this spelled out clearly in the documentation before.


That's pretty standard for Servlet containers.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: