Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are concurrent requests disabled by default in AppEngine/Java?

Much to my surprise I found out that AppEngine applications server requests serially. Recently Java applications have the possiblity to server requests concurrently , which is disabled by default ( reference ).

What is the reason for concurrent request being disabled by default? Web applications are by their nature meant to serve multiple requests concurrently, whether they are written in Java, Python or PHP. It seems to me like this is an artificial limitation.

like image 210
Robert Munteanu Avatar asked Sep 11 '26 18:09

Robert Munteanu


2 Answers

This may have something to do with AppEngine at the beginning not supporting concurrent requests. The feature was only added for Java in version 1.4.3 (March 30, 2011). So some developers may have coded and tested their applications to behave properly only against a single thread at a time.

Once Google built the infrastructure and code to support concurrent requests they may have been wary about enabling concurrency by default, as it could break existing applications. Hence the reason for the opt in approach.

There are some GAE folk who check StackOverflow, so we might need to hear from them to be sure.

like image 145
planetjones Avatar answered Sep 13 '26 08:09

planetjones


I think that is the better option by default as many novice programmers are coding on appengine and expect minimalistic approach than scale/volume.

Concurrent PHP or python (process based) wont messup object data but Java can (thread based). That is the main difference.

like image 20
Dileep Avatar answered Sep 13 '26 07:09

Dileep