tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Jessop" <mark.jes...@cs.york.ac.uk>
Subject Large file transfer through tomcat?
Date Thu, 12 Jul 2007 10:54:37 GMT
Hi,

I am putting together a site that allows files stored in an external system
to be uploaded/downloaded via http.  This works absolutely fine, but I am
concerned as to what might happen if a user attempts to up/down load
gigabyte files.


My question is, what happens inside tomcat in these cases, does it buffer
all data in memory or is it cached on disk?

For upload, I have a servlet that reads off the file data, and then connects
to the storage system and sends the file.  In an ideal world I would like
the servlet to be able to stream data directly off the http socket into the
storage system socket.

For download, a servlet connects to the storage system and extracts file
data, returning it to the client browser, which then saves it as a file.
Again I would like to forward data directly from the storage system socket
to the http socket.

In both of these cases, I don't want to have to hold the entire file in a
memory buffer before it can be managed.

Thanks for your help.

Mark.

Mark Jessop
Carmen Project
The University of York, Dept. of Computer
Science, Heslington, York, Y010 5DD
Tel   : +44 (0)1904 567712 (727712 internal)
Web   : http://www.carmen.org.uk
E-mail: mark.jessop@cs.york.ac.uk


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


Mime
View raw message