Keep in mind that every app server is allowed to implement the spec in their own manner. It does sound peculiar, but it is very possible that Orion gets its performance by pooling a few servlet instances even without the single threaded model. I don't know for sure, but that seems logical. By having even two or three instances, it could increase the ability to handle ore requests..although myself I thought that a single instance would be plenty fast to have literally thousands of requests per second hit it. Each time a request comes in, the container should create a new thread for that request then send it on its way to the servlet instance. A PIII600 system can run over 1billion instructions per second. Figure that with the JVM interpreter, your code and any resources, you should still be able to iterate thousands of requests per second, unless object creation in a servlet (and depending on what it is doing) slows things down. The one factor I am not sure of is how many "threads" a JVM can handle at one time. I have heard of single servers handling 1000's of hits per second, and if each request goes to a JSP or servlet, that should equate to one new thread per request..even if the session id is the same (for example, the user somehow opened a new window from the browser window..and could possibly submit two (or more) requests at the same time).
 
At any rate, it sounds to me like perhaps either there is a bug, or that Orion is doing this pooling automatically to increase performance. Interesting though..I will now check out to see if my MVC framework does the same thing.
 
 
-----Original Message-----
From: Ville Rinne [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 7:59 AM
To: Orion-Interest
Subject: multiple instances of a servlet?

We've implemented the request-controller pattern using a servlet as the entry-point of all our jsp-pages. For some reason Orion creates multiple instances of this servlet even though it isn't implementing SingleThreadModel and there isn't anything peculiar about it. I have the servlet printing to System.out every time init() is run and every time it receives a request, it also prints the memory address of the instance that's handling it. For some reason with this servlet there are multiple instances (up to 3 so far) that handle these requests. There doesn't seem to be any larger logic in which instance gets to handle the request. It's not a problem per se but I just find it rather strange since I assumed that only one instance of a servlet would be created. Anyone else ran into this ?
 
cheers,
Ville Rinne

Reply via email to