deployment questions

2008-03-26 Thread Kimberly Begley
Hi,
I've been devloping a web app on a virtual machine on my computer and I want
to move it over to remote server.
I understand that I
1) make a war file of my web app directory
2) add a context entry to the server.xml file on the remote server (Q1:
where in the server.xml file do I add this entry - it is a fresh install and
I do not see one there to start with)
3) copy the war file to the remote server tomcat/webapp directory
4) stop and start tomcat on the remote server

Q2: But then what is the process to see it online? everything I've read
online stops at this part - do I not have to make more modifications to see
it at a URL other than localhost?
Thanks


hot deployment questions

2006-08-28 Thread Hammad Sophie
Hello.

I've searched through and read a number of messages related to 'hot
deployment'. All of them deal with hot deploying the ENTIRE webapp, not
just particular classes in my webapp. 

We use tomcat as the application server/container for our application.
We use a single production server running a single instance of tomcat on
client sites. Frequently we run into a situation where a bug fix must be
deployed without restarting tomcat or even reloading the webapp. This
works well when a patch contains only JSPs. We simply unzip/copy the
jsps into the webapps/blah directory and tomcat recompiles them itself
automatically. However, alot of times, our patches also contain our
class files [located in webapps/blah/WEB-INF/classes]. Currently we can
copy these files to the appropriate directory within tomcat, but they do
not get picked up unless tomcat is restarted or the webapp redeployed.
Is there any way to 'hot deploy' certain classes within a webapp such
that the entire webapp does not reload, but only the new classes are
picked up and used?

Thanks.

Hammad.



Project Deployment Questions

2007-12-16 Thread Richard G. Reyes

Hi All,

We have created this web application where users can upload images and
display it selectively on the other parts of the system. For performance
reasons we have saved the said images into the filesystem ( e. g.
$CATALINA_HOME/webapps/ROOT/images/uploadedimages/bird01.jpg). At this
point the said image can easily be displayed anywhere in the site as
long as you have the filename which we have persisted into a DB.

Now we have come to the point that we need to deploy the web application
and the idea is to create multiple servers ( multiple tomcats ) pointing
to the same db server and implementing dns round-robin for load
balancing. My problem would be if the user used server a to upload an
image the same image cannot be accessible from the other 2 tomcat servers.

Hoping that someone here have undergone same scenario or maybe someone
might able to point me to a right direction to fix this.

Thanks in advance.
Richard


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: deployment questions

2008-03-26 Thread Caldarale, Charles R
> From: Kimberly Begley [mailto:[EMAIL PROTECTED] 
> Subject: deployment questions
> 
> 1) make a war file of my web app directory

Yes.

> 2) add a context entry to the server.xml file on the remote 
> server

Unless you're deploying on an ancient version of Tomcat (you didn't
bother to tell us), definitely not.  Your  element belongs in
your webapp's META-INF/context.xml file, if you need one at all.  Note
that path and docBase attributes are not allowed in  elements
in this circumstance.  Read the doc:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

> 3) copy the war file to the remote server tomcat/webapp directory

That's usually webapps, not webapp.

> 4) stop and start tomcat on the remote server

Usually not necessary, unless autoDeploy is disabled.

> But then what is the process to see it online?

The name of the .war file is the name of the webapp, so you reference it
via a URL like:
http://[:port]/

If Tomcat on the remote host is configured to use port 80, you omit that
from the URL, of course.  If the host has no DNS entry, use its IP
address.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: deployment questions

2008-03-26 Thread Kimberly Begley
Great thanks!
and sorry about that its tomcat5.

On Thu, Mar 27, 2008 at 1:06 PM, Caldarale, Charles R <
[EMAIL PROTECTED]> wrote:

> > From: Kimberly Begley [mailto:[EMAIL PROTECTED]
> > Subject: deployment questions
> >
> > 1) make a war file of my web app directory
>
> Yes.
>
> > 2) add a context entry to the server.xml file on the remote
> > server
>
> Unless you're deploying on an ancient version of Tomcat (you didn't
> bother to tell us), definitely not.  Your  element belongs in
> your webapp's META-INF/context.xml file, if you need one at all.  Note
> that path and docBase attributes are not allowed in  elements
> in this circumstance.  Read the doc:
> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
>
> > 3) copy the war file to the remote server tomcat/webapp directory
>
> That's usually webapps, not webapp.
>
> > 4) stop and start tomcat on the remote server
>
> Usually not necessary, unless autoDeploy is disabled.
>
> > But then what is the process to see it online?
>
> The name of the .war file is the name of the webapp, so you reference it
> via a URL like:
> http://[:port]/
>
> If Tomcat on the remote host is configured to use port 80, you omit that
> from the URL, of course.  If the host has no DNS entry, use its IP
> address.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Kimberly Begley


RE: deployment questions

2008-03-26 Thread Shreekanta Prasad

 Hi Chuck/All,

I am using tomacat5.5,eventhough autoDeploy option is "true" we have to
restart the server.
 

  

above is the snippet of my server.xml which has autoDeploy option.
'tmp' and 'work' folder will not get refreshed however .war file will
get replaced successfully.
after stop and start of the server my newly deployed .war changes came
into effect.
Is there any other things I missed out?


Thanks and Regards -
Shreekanta Prasad


-Original Message-
From: Kimberly Begley [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 27, 2008 8:44 AM
To: Tomcat Users List
Subject: Re: deployment questions

Great thanks!
and sorry about that its tomcat5.

On Thu, Mar 27, 2008 at 1:06 PM, Caldarale, Charles R <
[EMAIL PROTECTED]> wrote:

> > From: Kimberly Begley [mailto:[EMAIL PROTECTED]
> > Subject: deployment questions
> >
> > 1) make a war file of my web app directory
>
> Yes.
>
> > 2) add a context entry to the server.xml file on the remote
> > server
>
> Unless you're deploying on an ancient version of Tomcat (you didn't
> bother to tell us), definitely not.  Your  element belongs in
> your webapp's META-INF/context.xml file, if you need one at all.  Note
> that path and docBase attributes are not allowed in  elements
> in this circumstance.  Read the doc:
> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
>
> > 3) copy the war file to the remote server tomcat/webapp directory
>
> That's usually webapps, not webapp.
>
> > 4) stop and start tomcat on the remote server
>
> Usually not necessary, unless autoDeploy is disabled.
>
> > But then what is the process to see it online?
>
> The name of the .war file is the name of the webapp, so you reference
it
> via a URL like:
> http://[:port]/
>
> If Tomcat on the remote host is configured to use port 80, you omit
that
> from the URL, of course.  If the host has no DNS entry, use its IP
> address.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the
e-mail
> and its attachments from all computers.
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Kimberly Begley

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: deployment questions

2008-03-26 Thread Caldarale, Charles R
> From: Shreekanta Prasad [mailto:[EMAIL PROTECTED] 
> Subject: RE: deployment questions
> 
> I am using tomacat5.5,eventhough autoDeploy option is "true" 
> we have to restart the server.

I just retested this on my WinXP box with 5.5.25, and dropping an
updated .war file into webapps caused immediate redeployment.

Initial deployment (drag & drop of wan.war):
Mar 26, 2008 10:48:11 PM org.apache.catalina.startup.HostConfig
deployWAR
INFO: Deploying web application archive wan.war

Redeployment (also drag & drop, overwriting the original wan.war file):
Mar 26, 2008 10:52:21 PM org.apache.catalina.startup.HostConfig
checkResources
INFO: Undeploying context [/wan]
Mar 26, 2008 10:52:21 PM org.apache.catalina.startup.HostConfig
deployWAR
INFO: Deploying web application archive wan.war

This is without any explicit  element, but with
unpackWARs="true" and autoDeploy="true" in the  element.  A more
complex webapp may require a  element with antiJARLocking and
antiResourceLocking set for a Windows environment.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: deployment questions

2008-04-01 Thread quikpak

i dont want tomcat!!
im not a member of it!! dont send me emails hereafter...
if im a member send me emails,but im not a member.

Best Regards
Ajmal

- Original Message - 
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Thursday, March 27, 2008 8:36 AM
Subject: RE: deployment questions


From: Kimberly Begley [mailto:[EMAIL PROTECTED] 
Subject: deployment questions


1) make a war file of my web app directory


Yes.

2) add a context entry to the server.xml file on the remote 
server


Unless you're deploying on an ancient version of Tomcat (you didn't
bother to tell us), definitely not.  Your  element belongs in
your webapp's META-INF/context.xml file, if you need one at all.  Note
that path and docBase attributes are not allowed in  elements
in this circumstance.  Read the doc:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html


3) copy the war file to the remote server tomcat/webapp directory


That's usually webapps, not webapp.


4) stop and start tomcat on the remote server


Usually not necessary, unless autoDeploy is disabled.


But then what is the process to see it online?


The name of the .war file is the name of the webapp, so you reference it
via a URL like:
http://[:port]/

If Tomcat on the remote host is configured to use port 80, you omit that
from the URL, of course.  If the host has no DNS entry, use its IP
address.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hot deployment questions

2006-08-28 Thread Andrés González

Only one question: why don't you want the webapp to be reloaded?

You can save your sessions easily using the Session Manager (just
insert the following in your context.xml:   ):

http://tomcat.apache.org/tomcat-5.0-doc/config/manager.html



On 8/28/06, Hammad Sophie <[EMAIL PROTECTED]> wrote:

Hello.

I've searched through and read a number of messages related to 'hot
deployment'. All of them deal with hot deploying the ENTIRE webapp, not
just particular classes in my webapp.

We use tomcat as the application server/container for our application.
We use a single production server running a single instance of tomcat on
client sites. Frequently we run into a situation where a bug fix must be
deployed without restarting tomcat or even reloading the webapp. This
works well when a patch contains only JSPs. We simply unzip/copy the
jsps into the webapps/blah directory and tomcat recompiles them itself
automatically. However, alot of times, our patches also contain our
class files [located in webapps/blah/WEB-INF/classes]. Currently we can
copy these files to the appropriate directory within tomcat, but they do
not get picked up unless tomcat is restarted or the webapp redeployed.
Is there any way to 'hot deploy' certain classes within a webapp such
that the entire webapp does not reload, but only the new classes are
picked up and used?

Thanks.

Hammad.






--

-=-=-=-=-=-=-=-=-=-=-=-=-
Andrés González.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: hot deployment questions

2006-08-28 Thread Hammad Sophie
I wasn't aware of SessionManager. However, I'm not sure it will help.
Generally we are installing patches on a live server that has
transactions/activity going on while we patch. I'd like to know if its
possible for us to do a hot patch without causing any disruption to any
user. If we reload, it will cause users to lose data that they are
working on.

Hammad.

-Original Message-
From: Andrés González [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 28, 2006 7:11 PM
To: Tomcat Users List
Subject: Re: hot deployment questions


Only one question: why don't you want the webapp to be reloaded?

You can save your sessions easily using the Session Manager (just
insert the following in your context.xml:   ):

http://tomcat.apache.org/tomcat-5.0-doc/config/manager.html



On 8/28/06, Hammad Sophie <[EMAIL PROTECTED]> wrote:
> Hello.
>
> I've searched through and read a number of messages related to 'hot 
> deployment'. All of them deal with hot deploying the ENTIRE webapp, 
> not just particular classes in my webapp.
>
> We use tomcat as the application server/container for our application.

> We use a single production server running a single instance of tomcat 
> on client sites. Frequently we run into a situation where a bug fix 
> must be deployed without restarting tomcat or even reloading the 
> webapp. This works well when a patch contains only JSPs. We simply 
> unzip/copy the jsps into the webapps/blah directory and tomcat 
> recompiles them itself automatically. However, alot of times, our 
> patches also contain our class files [located in 
> webapps/blah/WEB-INF/classes]. Currently we can copy these files to 
> the appropriate directory within tomcat, but they do not get picked up

> unless tomcat is restarted or the webapp redeployed. Is there any way 
> to 'hot deploy' certain classes within a webapp such that the entire 
> webapp does not reload, but only the new classes are picked up and 
> used?
>
> Thanks.
>
> Hammad.
>
>
>


-- 

-=-=-=-=-=-=-=-=-=-=-=-=-
Andrés González.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hot deployment questions

2006-08-28 Thread Andrés González

I apply patches on production servers every week (or i did some time
ago, now things are more stable O:)) and the hot deployment work
perfectly. It does not "interrupt" any HTTP-transaction. If you are
using sessions you need to persist them and may be write your
ServletContextListener class to execute some code on the start/stop of
the context (the webapp).

I think what tomcat does when it detects a new class is:

1 - "stop" responding new request (don't discard them, only "paused"
them for a while)
2 - wait until current "http transactions" are done
3 - reload the webapp
4 - attend "paused" requests and new ones



On 8/28/06, Hammad Sophie <[EMAIL PROTECTED]> wrote:

I wasn't aware of SessionManager. However, I'm not sure it will help.
Generally we are installing patches on a live server that has
transactions/activity going on while we patch. I'd like to know if its
possible for us to do a hot patch without causing any disruption to any
user. If we reload, it will cause users to lose data that they are
working on.

Hammad.

-Original Message-
From: Andrés González [mailto:[EMAIL PROTECTED]
Sent: Monday, August 28, 2006 7:11 PM
To: Tomcat Users List
Subject: Re: hot deployment questions


Only one question: why don't you want the webapp to be reloaded?

You can save your sessions easily using the Session Manager (just
insert the following in your context.xml:   ):

http://tomcat.apache.org/tomcat-5.0-doc/config/manager.html



On 8/28/06, Hammad Sophie <[EMAIL PROTECTED]> wrote:
> Hello.
>
> I've searched through and read a number of messages related to 'hot
> deployment'. All of them deal with hot deploying the ENTIRE webapp,
> not just particular classes in my webapp.
>
> We use tomcat as the application server/container for our application.

> We use a single production server running a single instance of tomcat
> on client sites. Frequently we run into a situation where a bug fix
> must be deployed without restarting tomcat or even reloading the
> webapp. This works well when a patch contains only JSPs. We simply
> unzip/copy the jsps into the webapps/blah directory and tomcat
> recompiles them itself automatically. However, alot of times, our
> patches also contain our class files [located in
> webapps/blah/WEB-INF/classes]. Currently we can copy these files to
> the appropriate directory within tomcat, but they do not get picked up

> unless tomcat is restarted or the webapp redeployed. Is there any way
> to 'hot deploy' certain classes within a webapp such that the entire
> webapp does not reload, but only the new classes are picked up and
> used?
>
> Thanks.
>
> Hammad.
>
>
>


--

-=-=-=-=-=-=-=-=-=-=-=-=-
Andrés González.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--

-=-=-=-=-=-=-=-=-=-=-=-=-
Andrés González.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hot deployment questions

2006-08-28 Thread Mikolaj Rydzewski

Hammad Sophie wrote:

I wasn't aware of SessionManager. However, I'm not sure it will help.
Generally we are installing patches on a live server that has
transactions/activity going on while we patch. I'd like to know if its
possible for us to do a hot patch without causing any disruption to any
user. If we reload, it will cause users to lose data that they are
working on.
  
You can try to use custom classloader to load/unload specific classes on 
demand. But it's a tricky issue - you have to be sure, that there's no 
instance of a class being unloaded.


Maybe some kind of cluster would help - you shutdown one node, update 
it, bring it back, do the same with the second node, and users - in 
theory - don't see any problem.


--
Mikolaj Rydzewski <[EMAIL PROTECTED]>



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Project Deployment Questions

2007-12-17 Thread Len Popp
There are a couple of ways to handle this.

1. Replicate the uploaded images to all the Tomcat servers. This isn't
hard if the image directories can be shared on the server LAN. Not
much more complicated than what you're doing now.

2. All Tomcats save the uploaded images in a single location that is
served by a single server, not round-robin. This is good if the images
aren't a big portion of the web traffic.

3 = 1+2. If you want to get fancy you can use any number of image
servers, separate from the webapp servers. High-traffic web sites
often do this.
-- 
Len

On Dec 17, 2007 12:42 AM, Richard G. Reyes <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> We have created this web application where users can upload images and
> display it selectively on the other parts of the system. For performance
> reasons we have saved the said images into the filesystem ( e. g.
> $CATALINA_HOME/webapps/ROOT/images/uploadedimages/bird01.jpg). At this
> point the said image can easily be displayed anywhere in the site as
> long as you have the filename which we have persisted into a DB.
>
> Now we have come to the point that we need to deploy the web application
> and the idea is to create multiple servers ( multiple tomcats ) pointing
> to the same db server and implementing dns round-robin for load
> balancing. My problem would be if the user used server a to upload an
> image the same image cannot be accessible from the other 2 tomcat servers.
>
> Hoping that someone here have undergone same scenario or maybe someone
> might able to point me to a right direction to fix this.
>
> Thanks in advance.
> Richard
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Project Deployment Questions

2007-12-17 Thread Richard Reyes

Hi Len,

Please see inline...

Len Popp wrote:

There are a couple of ways to handle this.

1. Replicate the uploaded images to all the Tomcat servers. This isn't
hard if the image directories can be shared on the server LAN. Not
much more complicated than what you're doing now.
  
Like a cron task? The image directories must be accessible by the webapp 
so it must be inside the webapp/ROOT folder. We were thinking of 
mounting the image folder into a nfs but then again we also estimate 
about 150 simultaneous access and the images will be a big part of it.



2. All Tomcats save the uploaded images in a single location that is
served by a single server, not round-robin. This is good if the images
aren't a big portion of the web traffic.

3 = 1+2. If you want to get fancy you can use any number of image
servers, separate from the webapp servers. High-traffic web sites
often do this.
  
Please tell me more how to do this? Is this like an httpd app serving 
the images, then the tomcat will access the images via http://";


Regards,
Richard

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Project Deployment Questions

2007-12-17 Thread Len Popp
On Dec 17, 2007 2:52 PM, Richard Reyes <[EMAIL PROTECTED]> wrote:
> Hi Len,
>
> Please see inline...
>
> Len Popp wrote:
> > There are a couple of ways to handle this.
> >
> > 1. Replicate the uploaded images to all the Tomcat servers. This isn't
> > hard if the image directories can be shared on the server LAN. Not
> > much more complicated than what you're doing now.
> >
> Like a cron task? The image directories must be accessible by the webapp
> so it must be inside the webapp/ROOT folder. We were thinking of
> mounting the image folder into a nfs but then again we also estimate
> about 150 simultaneous access and the images will be a big part of it.

I wasn't thinking about cron, I meant that when the app saves an
uploaded image, it saves it in several files on several servers (via
network shares) so that the uploaded files appear on all servers. The
uploadedimages directory in each Tomcat server would have to be shared
on the network.

Are 150 users going to be uploading images all the time, or will they
view images more often than uploading them? Usually uploads are a much
smaller part of the traffic than views, so replicating the uploaded
files to multiple servers makes sense.

> > 2. All Tomcats save the uploaded images in a single location that is
> > served by a single server, not round-robin. This is good if the images
> > aren't a big portion of the web traffic.
> >
> > 3 = 1+2. If you want to get fancy you can use any number of image
> > servers, separate from the webapp servers. High-traffic web sites
> > often do this.
> >
> Please tell me more how to do this? Is this like an httpd app serving
> the images, then the tomcat will access the images via http://";

Yes. Examples of sites that use separate servers for images:
http://slashdot.org/ and http://images.slashdot.org/
or http://www.cnn.com/ and http://i.l.cnn.net/
In both of those cases, I suspect that the image server
(http://images.slashdot.org/, http://i.l.cnn.net/) is actually several
web servers behind a load balancer.

You could still use Tomcat for the images, but it doesn't necessarily
have to be the *same* Tomcat that runs the application. It's not that
different from what you're doing now. The application uploads images
to the location(s) where they're served from - but it doesn't have to
be in CATALINA_HOME/webapps/ROOT on the same computer. You can use the
number of app servers and static image servers that work best for you.
-- 
Len

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Project Deployment Questions

2007-12-18 Thread Richard Reyes


Thanks!

Len Popp wrote:

On Dec 17, 2007 2:52 PM, Richard Reyes <[EMAIL PROTECTED]> wrote:
  

Hi Len,

Please see inline...

Len Popp wrote:


There are a couple of ways to handle this.

1. Replicate the uploaded images to all the Tomcat servers. This isn't
hard if the image directories can be shared on the server LAN. Not
much more complicated than what you're doing now.

  

Like a cron task? The image directories must be accessible by the webapp
so it must be inside the webapp/ROOT folder. We were thinking of
mounting the image folder into a nfs but then again we also estimate
about 150 simultaneous access and the images will be a big part of it.



I wasn't thinking about cron, I meant that when the app saves an
uploaded image, it saves it in several files on several servers (via
network shares) so that the uploaded files appear on all servers. The
uploadedimages directory in each Tomcat server would have to be shared
on the network.

Are 150 users going to be uploading images all the time, or will they
view images more often than uploading them? Usually uploads are a much
smaller part of the traffic than views, so replicating the uploaded
files to multiple servers makes sense.

  

2. All Tomcats save the uploaded images in a single location that is
served by a single server, not round-robin. This is good if the images
aren't a big portion of the web traffic.

3 = 1+2. If you want to get fancy you can use any number of image
servers, separate from the webapp servers. High-traffic web sites
often do this.

  

Please tell me more how to do this? Is this like an httpd app serving
the images, then the tomcat will access the images via http://";



Yes. Examples of sites that use separate servers for images:
http://slashdot.org/ and http://images.slashdot.org/
or http://www.cnn.com/ and http://i.l.cnn.net/
In both of those cases, I suspect that the image server
(http://images.slashdot.org/, http://i.l.cnn.net/) is actually several
web servers behind a load balancer.

You could still use Tomcat for the images, but it doesn't necessarily
have to be the *same* Tomcat that runs the application. It's not that
different from what you're doing now. The application uploads images
to the location(s) where they're served from - but it doesn't have to
be in CATALINA_HOME/webapps/ROOT on the same computer. You can use the
number of app servers and static image servers that work best for you.
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]