Servlet Caching question

2003-07-25 Thread Atreya Basu
Hello,
 
I wanted to know how Tomcat caches the output of Servlets/JSPs.  Could
someone direct me to where I could find some information on that?
 
_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca
 


RE: Servlet Caching question

2003-07-25 Thread Shapira, Yoav

Howdy,
Basically, tomcat doesn't.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 12:42 PM
To: [EMAIL PROTECTED]
Subject: Servlet Caching question

Hello,

I wanted to know how Tomcat caches the output of Servlets/JSPs.  Could
someone direct me to where I could find some information on that?

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Servlet Caching question

2003-07-25 Thread Atreya Basu
Okay,

So if I want to do some caching for say: GET requests.  Is there a way
to cache output based on URL?  Is this kind of thing simply not
supported, and I will have to go to some other application server.

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: July 25, 2003 1:59 PM
To: Tomcat Users List
Subject: RE: Servlet Caching question


Howdy,
Basically, tomcat doesn't.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 12:42 PM
To: [EMAIL PROTECTED]
Subject: Servlet Caching question

Hello,

I wanted to know how Tomcat caches the output of Servlets/JSPs.  Could
someone direct me to where I could find some information on that?

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


-
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]



RE: Servlet Caching question

2003-07-25 Thread Bodycombe, Andrew
Just one question:
The output from a servlet/JSP is dynamic, so why would you want to cache the
output?

-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED] 
Sent: 25 July 2003 18:03
To: 'Tomcat Users List'
Subject: RE: Servlet Caching question


Okay,

So if I want to do some caching for say: GET requests.  Is there a way
to cache output based on URL?  Is this kind of thing simply not
supported, and I will have to go to some other application server.

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: July 25, 2003 1:59 PM
To: Tomcat Users List
Subject: RE: Servlet Caching question


Howdy,
Basically, tomcat doesn't.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 12:42 PM
To: [EMAIL PROTECTED]
Subject: Servlet Caching question

Hello,

I wanted to know how Tomcat caches the output of Servlets/JSPs.  Could
someone direct me to where I could find some information on that?

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


-
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]

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



RE: Servlet Caching question

2003-07-25 Thread Shapira, Yoav

Howdy,
Actually, caching of servlet/JSP output is not a rare request, and is
sometimes valid.  Especially if there is a common set of request
parameters (ViewPage?pageId=... where the pageId has three values that
are very common).

It would be fairly trivial to write a URL-based caching filter.  One
does not come with tomcat, but it's less than a 20 minutes effort to
write I think.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 1:06 PM
To: 'Tomcat Users List'
Subject: RE: Servlet Caching question

Just one question:
The output from a servlet/JSP is dynamic, so why would you want to
cache
the
output?

-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED]
Sent: 25 July 2003 18:03
To: 'Tomcat Users List'
Subject: RE: Servlet Caching question


Okay,

So if I want to do some caching for say: GET requests.  Is there a way
to cache output based on URL?  Is this kind of thing simply not
supported, and I will have to go to some other application server.

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: July 25, 2003 1:59 PM
To: Tomcat Users List
Subject: RE: Servlet Caching question


Howdy,
Basically, tomcat doesn't.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 12:42 PM
To: [EMAIL PROTECTED]
Subject: Servlet Caching question

Hello,

I wanted to know how Tomcat caches the output of Servlets/JSPs.  Could
someone direct me to where I could find some information on that?

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


-
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]

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Servlet Caching question

2003-07-25 Thread Mike Curwen
Because I might decide that hmm, this page's content really doesn't
change very often, so why don't I cache its results for 5 minutes?
 
For example, one page might contain many different 'pagelets', say a
little weather box with the current weather conditions.  If your weather
conditions are only updated every hour, why are you dynamically
generating that little pagelet every request (which can be anywhere from
2 in an hour to several thousand).  You'd cache that pagelet, and set it
to expire every hour.

 -Original Message-
 From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 25, 2003 12:06 PM
 To: 'Tomcat Users List'
 Subject: RE: Servlet Caching question
 
 
 Just one question:
 The output from a servlet/JSP is dynamic, so why would you 
 want to cache the output?
 
 -Original Message-
 From: Atreya Basu [mailto:[EMAIL PROTECTED] 
 Sent: 25 July 2003 18:03
 To: 'Tomcat Users List'
 Subject: RE: Servlet Caching question
 
 
 Okay,
 
 So if I want to do some caching for say: GET requests.  Is 
 there a way to cache output based on URL?  Is this kind of 
 thing simply not supported, and I will have to go to some 
 other application server.
 
 _
 Atreya Basu
 Developer,
 Greenfield Research Inc.
 e-mail: atreya (at) greenfieldresearch (dot) ca
 
 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Sent: July 25, 2003 1:59 PM
 To: Tomcat Users List
 Subject: RE: Servlet Caching question
 
 
 Howdy,
 Basically, tomcat doesn't.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: Atreya Basu [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 25, 2003 12:42 PM
 To: [EMAIL PROTECTED]
 Subject: Servlet Caching question
 
 Hello,
 
 I wanted to know how Tomcat caches the output of 
 Servlets/JSPs.  Could 
 someone direct me to where I could find some information on that?
 
 _
 Atreya Basu
 Developer,
 Greenfield Research Inc.
 e-mail: atreya (at) greenfieldresearch (dot) ca
 
 
 
 
 This e-mail, including any attachments, is a confidential 
 business communication, and may contain information that is 
 confidential, proprietary and/or privileged.  This e-mail is 
 intended only for the
 individual(s) to whom it is addressed, and may not be saved, 
 copied, printed, disclosed or used by anyone else.  If you 
 are not the(an) intended recipient, please immediately delete 
 this e-mail from your computer system and notify the sender.  
 Thank you.
 
 
 -
 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]
 
 -
 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]



RE: Servlet Caching question

2003-07-25 Thread Bodycombe, Andrew
That makes sense. I'd always considered that it was too dangerous to cache
servlet output.
I might try implementing this Filter and try to gain some performance...

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: 25 July 2003 18:17
To: Tomcat Users List
Subject: RE: Servlet Caching question



Howdy,
Actually, caching of servlet/JSP output is not a rare request, and is
sometimes valid.  Especially if there is a common set of request
parameters (ViewPage?pageId=... where the pageId has three values that
are very common).

It would be fairly trivial to write a URL-based caching filter.  One
does not come with tomcat, but it's less than a 20 minutes effort to
write I think.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 1:06 PM
To: 'Tomcat Users List'
Subject: RE: Servlet Caching question

Just one question:
The output from a servlet/JSP is dynamic, so why would you want to
cache
the
output?

-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED]
Sent: 25 July 2003 18:03
To: 'Tomcat Users List'
Subject: RE: Servlet Caching question


Okay,

So if I want to do some caching for say: GET requests.  Is there a way
to cache output based on URL?  Is this kind of thing simply not
supported, and I will have to go to some other application server.

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: July 25, 2003 1:59 PM
To: Tomcat Users List
Subject: RE: Servlet Caching question


Howdy,
Basically, tomcat doesn't.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 12:42 PM
To: [EMAIL PROTECTED]
Subject: Servlet Caching question

Hello,

I wanted to know how Tomcat caches the output of Servlets/JSPs.  Could
someone direct me to where I could find some information on that?

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


-
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]

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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


-
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]



RE: Servlet Caching question

2003-07-25 Thread Atreya Basu
Andrew,

Our JSP/Servlets perform some calculations based on some input from a
HTML Form.  These calculations are a little bit complicated so they take
time to perform.  However the output that they produce is relatively
small.  The majority of our users will give the same input, so the
output is also known for those cases.  If we can map the input given in
the form of a GET request (i.e. the URL) to a cache of outputs, we could
save a lot of time.

So that is why we would like to cache the output.

Another question I have is, once a Servlet is executed, does it get
stored in memory so that it doesn't have to be read off the disc next
time?

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca

-Original Message-
From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED] 
Sent: July 25, 2003 2:06 PM
To: 'Tomcat Users List'
Subject: RE: Servlet Caching question

Just one question:
The output from a servlet/JSP is dynamic, so why would you want to cache
the
output?

-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED] 
Sent: 25 July 2003 18:03
To: 'Tomcat Users List'
Subject: RE: Servlet Caching question


Okay,

So if I want to do some caching for say: GET requests.  Is there a way
to cache output based on URL?  Is this kind of thing simply not
supported, and I will have to go to some other application server.

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: July 25, 2003 1:59 PM
To: Tomcat Users List
Subject: RE: Servlet Caching question


Howdy,
Basically, tomcat doesn't.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 12:42 PM
To: [EMAIL PROTECTED]
Subject: Servlet Caching question

Hello,

I wanted to know how Tomcat caches the output of Servlets/JSPs.  Could
someone direct me to where I could find some information on that?

_
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


-
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]

-
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]



RE: Servlet Caching question

2003-07-25 Thread Shapira, Yoav

Howdy,

Our JSP/Servlets perform some calculations based on some input from a
HTML Form.  These calculations are a little bit complicated so they
take
time to perform.  However the output that they produce is relatively
small.  The majority of our users will give the same input, so the
output is also known for those cases.  If we can map the input given in
the form of a GET request (i.e. the URL) to a cache of outputs, we
could
save a lot of time.

For this case, I would actually consider doing the pre-calculation and
result caching in the calculator object or something hanging off of it,
rather than the servlet output.  That's because the output is small, so
it's not like you're saving presentation/layout effort.  Rather, you're
trying to speed up business object creation.

Another question I have is, once a Servlet is executed, does it get
stored in memory so that it doesn't have to be read off the disc next
time?

This is a basic java question (or rather OS/JVM question).  Once a class
is loaded, it's kept in memory, in a special section of the memory
allocated to the JVM (known as the Permanent Generation).  However, the
creation and destruction of servlet instances is up to the container,
although those are in-memory operation.  As an aside, the penalty for
loading a class from disk is tiny and if that's your worst performance
bottleneck, you should publish a paper about your application ;)

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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