× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Den 07/10/10 01.17, Nathan Andelin skrev:
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?
Usually not. The typical Java EE server keeps a pool of worker threads which grows and shrink according to load.


Actually, they say that JEE servers only create one instance of each Servlet.
That instance can be invoked from different contexts easily. A servlet request do not keep state in the servlet object, but in servlet contexts provided as parameters.

Hence no need for more than a single object per 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
Only if explicitly requested for non-threadsafe code. The default servlet model is unsynchronized.



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.

I would like to see your studies. That experience is contrary to mine.

(but it would be consistent with a deployment with non-threadsafe servlets)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.