Right - I understand that, unless your servlet implements SingleThreadModel,
it is a multi-threaded object.
I was just wondering if there was any advantage (or maybe a disadvantage) to
having multiple multi-threaded objects processing requests instead of a
single multi-threaded object. I'm not hugely familiar with the ins and outs
of multi-threading.
In the 2.1+ Servlet spec, for instance, there is one RequestDispatcher per
servlet - would requests be dispatched more efficiently by having multiple
dispatchers?
Sam
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]
Sent: Monday, May 01, 2000 7:14 PM
To: [EMAIL PROTECTED]
Subject: Re: Multiple servlets vs. Pages
>
> I've got a general question about the Turbine framework.
>
> It seems to me (and I haven't looked at the current CVS, so I may be out
of
> date. There's also the distinct possibility that I had this wrong to begin
> with) that all requests end up getting handled by one servlet and routed
to
> multiple Pages each with their own set of Screens (Actions may also be
> invoked during request processing).
>
> This, it seems, is an alternative to the idea of having multiple servlets,
> each of which handles it's domain (like Pages handle theirs).
Your description is close enough. :-)
> Does using a single servlet this way introduce a bottleneck to the system?
> Does it potentially introduce a bottleneck on some servlet engines but not
> others?
>
> Sam
Not at all because servlets are multithreaded. Essentially, a "Screen" is
a simplified servlet that is invoked by the "master servlet" which is
Turbine. Each Screen must also be written to be called in a multithreaded
manner (ie: don't have class variables that are not syncronized). Thus, if
100 requests come in for the same "Screen", then those 100 requests will
be executed in a MT manner.
Make sense?
-jon
--
Scarab -
Java Servlet Based - Open Source
Bug/Issue Tracking System
<http://scarab.tigris.org/>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]