[omniORB] Threading Question

Thomas Bednarz tb@smartsol.ch
Thu, 11 Nov 1999 15:32:55 +0100


> -----Original Message-----
> From: Ji-Yong D. Chung [mailto:virtualcyber@erols.com]
> Sent: Freitag, 12. November 1999 03:04
> To: tb@smartsol.ch
> Cc: omniorb-list@uk.research.att.com
> Subject: Re: [omniORB] Threading Question
> 
> ---------------------------------------------------------
> 
>     I am curious, as I do not know much about servlets, of 
> the following.
> When the servlet responds to the client, does the servlet run in a
> "separate" thread from the web server or the same thread as 
> the web server?
> Does it begin a new thread each time client calls?
> 
>     For instance, Netscape Enterprise Server has a pool of 
> threads.  Each
> thread handles certain amount of load.  If a particular 
> thread in the server
> invokes your servlet, does your servlet run in a different 
> thread, or does
> it attach to the thread of your web server?
> .
> 
> 

This is very much dependant on the implementation of your servlet runtime
environment. Netscape cannot run servlets, it needs additional software. I
guess the only Web Server that is able to run servlets and JSP's directly
without additional software is currently Sun's Java Web Server. But there
are many products you can add to existing web servers. Some of the products
are commercial others are free under GPL. I currently use JRun
(http://www.allaire.com/products/Jrun/), which is a commercial product. This
engine runs out of process of your web server. It even allows you to run an
unlimited number of JVM's so that you can run every application on a
different one. The advantage is, that in case of a crash of one application
all others and the web server will continiue to work. JRun can be configured
how many threads you want to allow it etc. Every client, that opens a
session, starts a thread in jRun, but the servlet is in memory only once.

So basically implementing a CORBA client inside a servlet means designing
proper middle-ware. I first will get some experience how this works under
load. Probably I have to write something like a pool of object references
similar to pools for database connections. It is an interesting topic, but
there is not much documentation around. To it basically works with try and
error!

Cheers

Thomas