Hi Nix

I need to read the headers to see if the request can be moved up in
priority. If no I will put that particular servlet into a wait state to be
woken up by some scheduler I create in the servlet engine. 

Ideally, all requests will be processed but some will be done before others.


It is not a login or cookie application. We are not using browsers to access
the application so the headers are customizable and we know the type of
message arriving. It's just we want some types of messages to be done. Under
load we can reject certain messages that are not high priority if an
internal processor cannot be assigned with a specified time frame.

Thanks
Donie


-----Original Message-----
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]
Sent: 09 January 2004 12:34
To: Tomcat Users List
Subject: Re: How does a servlet request work. Not a newbie question ;)

Donie Kelly wrote:
> Hi all
>
> I want to insert some form of scheduling into our application and I was
> wondering how Tomcat passes the request to the actual servlet I write.
> Does Tomcat just read the headers to create the request object and leave
> the body of the message in an inputstream for the servlet to read or is
> all the data in the request read by Tomcat before passing it to servlet?
>
> Some of my traffic is more important that other based on headers in the
> request. I want to prioritise the handling of requests under load
> conditions.

I'm not aware of any priority scheduling in Tomcat's worker threads. There
is no
public API for that, anyway.

If I understand correctly, you'd like people to login to a part of your app
and
then they will be issued a Cookie, which would be the token for boosting
priority of such requests. Possibly in a Filter.

Unless you wish to employ your own thread pools, internal or real, I think
this
is a no-go.

As a quick solution, you'd be better off using IP layer stuff, like IP QoS
(Quality of Service), Linux policy routing, etc.

Nix.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to