Which studies? Most of the studies I've read that reached such a conclusion
are from when the platform was actually called J2EE. Since Java SE and Java EE
5 and 6 came out, concurrency support is vastly improved.
Most of the stuff you've written about servlets and request handling appears
based on a second-hand understanding that isn't entirely true. Java EE app
servers manage requests using a thread pool. Some app servers don't even
tie up a thread while handling a request. While threads are waiting for I/O,
they're moved to a wait state until their request is satisfied (should sound
familiar).
Servlets are typically singletons on each appserver instance, with concurrent
access permitted unless the developer has specifically overridden it. These
calls are not serialized.
IBM i scales WebSphere very well, both horizontally and vertically.
________________________________________
From: web400-bounces@xxxxxxxxxxxx [web400-bounces@xxxxxxxxxxxx] On Behalf Of Nathan Andelin [nandelin@xxxxxxxxx]
Sent: Wednesday, October 06, 2010 7:17 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Which scales better? J2EE, PHP, or CGIDEV2?
From: Aaron Bartell
I would be curious to know how much CPU time is required to
create a new J2EE thread vs. have Apache hand-off a "CGI" request to
an existing job?
You're probably dealing in microseconds either way; less than 1 millisecond.
But how often do JEE application servers create new threads? The IBM i HTTP
server appears to reuse threads activated at startup. Do JEE servers create a
new thread for each request? Like they create new "request" and "response"
objects for each request?
Actually, they say that JEE servers only create one instance of each Servlet.
Servlet methods may be called by each thread. That would be quite a bit
different than CGI, where you might have an instance of each *PGM loaded in each
CGI worker process.
JEE app servers evidently synchronize Servlet method calls. Servlet methods can
easily get quite complex. That's probably why JEE app servers DON'T scale well.
Okay, I said it. IMHO, they don't scale well. Studies show that JEE application
servers don't have the ability to effectively utilize multiple processors,
unless you launch multiple instances, and deploy applications under each.
Contrast that with CGI worker jobs that effectively utilize all processors.
-Nathan
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.