Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

server to server transfer

 
anand phulwani
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

I have came across a problem,and i need a solution for it badly,
The Scenarios contains 3 objects mainly


1)My WEB server(10 MBps Download,10 Mbps Upload)
2)A FTP server(36 Kbps Upload)
3)My PC(256Kbps Download,64Kbps Upload)


I need to copy the files from the ftp server to my PC,
but due to the speed of transfer,the download speed rates to 3 KB/ps,
but what i think is my Web server is underutilized,so i am thinking of deploying a JSP script on the WEB server to copy the files from the FTP server to the WEB server,then afterwards i can copy from Web Server to my pc,although i think i will be able to deploy a JSP script to copy, this is what i intend to do

On the Web Server,
i intend to deploy a JSP script with a text file containing the ftp links,
as soon as i invoke the JSP from a client the downloading process will begin,Now Here comes the big problem:- ,i need to close the client, and as soon as i close the client, the request,response,and the thread will be destroyed, and i need the proccess to continue,is there any way to keep the downloading continue and closing the client.
[ August 03, 2006: Message edited by: anand phulwani ]
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you talking about a new Thread you started that gets the files from the ftp server to the web server? I would be surprised if that got stopped/deleted just because the browser that requested the page was closed. How would the server even know that the browser went away?

Or are you talking about the download of the files to your PC? That works through the browser, so it would need to stay open.
[ August 03, 2006: Message edited by: Ulf Dittmer ]
 
anand phulwani
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dittmer for your reply,

The Basic Goal is to Download the files from the FTP to my PC,but i want to do that via my WEBSERVER,that means i want to first download files from the
FTP to the WEBSERVER
and then from
WEBSERVER to MY PC

the problem lies in the first step that is FTP to the WEBSERVER ,
what i think is when the client will request for the page,the downloading will begin,but as soon as the user moves away,wont the thread would be dumped,but you are also correct like how the WEBSERVER knows who is who.

I think i will try this today,and hope that i succeed.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the FTP to Webserver copy operations are done by the Thread that executes the JSP you may have a problem because that Thread is managed by the servlet container.

The servlet container is allowed to decide that a response is taking too long and terminate the Thread.

Like Ulf said - normal practice would be to start a separate Thread to do the copy operation.

I hope you have thought about the potential security/abuse possibilities - what happens if Google robots keep hitting your page?
Bill
 
anand phulwani
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Mr Brogden,

It is nice to have people who have registered 4660 and 7143 post on such a beautiful website,thinking over my issue.

Ok do you mean i should invoke another thread from the Servlet code which does the copying process,ya i think thats a nice idea and can be done.

I hope you have thought about the potential security/abuse possibilities - what happens if Google robots keep hitting your page?


I am really sorry but i am not familiar to these issues,if you would describe about them,it would be lot nicer.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William talks about this: Would the JSP page be a public page? If so, there is a possibility that Google or some bot (or a malicious user) finds it, and keeps accessing it - in which case they will get your files. So make sure your page is at least password-protected.
 
anand phulwani
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think i have some big problem,the server does not support JSP,it support CGI-PERL,PHP.i know after this i should not speak anything in this forum,
but can anyone advice how to make things go now.
[ August 03, 2006: Message edited by: anand phulwani ]
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see why you shouldn't be able to do this in Perl or PHP just as well as in Java.
 
Let's go to the waterfront with this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!