Can I create a pool of FTP connections (client)

M

moo moo

I cant find a spot on newsgroup for this but the application is
written in java so here goes... (let me know if you have better
newsgroup suggestions)

We want to allow our website visitors to upload some files. Therefore
there may be more than one upload at any given time. Also the files
need to be stored on a server which is different to the webserver. For
various reasons life is made very easy for us if we can use ftp to
transfer the files from a servlet which handles the upload request.
However because of the time taken to create a connection, we would
like to create a pool (well 2 to 3) of ftp connections (like a pool of
database connections). Is this possible?

Also, this second server is really intended for website hosting and Im
thinking that the ISP who hosts our 'file server' may very well have
limited the number of concurrent FTP connections to one, is this
possible/probable?


thanks for any info!
 
G

Gordon Beaton

I cant find a spot on newsgroup for this but the application is
written in java so here goes... (let me know if you have better
newsgroup suggestions)

We want to allow our website visitors to upload some files. Therefore
there may be more than one upload at any given time. Also the files
need to be stored on a server which is different to the webserver. For
various reasons life is made very easy for us if we can use ftp to
transfer the files from a servlet which handles the upload request.
However because of the time taken to create a connection, we would
like to create a pool (well 2 to 3) of ftp connections (like a pool of
database connections). Is this possible?

FTP creates a new data connection for every file transfer, whether you
like it or not, so only the control connection is a candidate for
pooling. Even then, most FTP servers will time out an unused
connection after a few idle minutes. Just how long does it take to set
up that connection anyway, 100 ms? 500 ms? In terms of "human time", I
can't see the value of pooling for such little saving.

Maybe you could set up the FTP connection speculatively when the user
enters the upload page (before he actually initiates the upload).

/gordon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top