NetTalk Central

Author Topic: File Download  (Read 2993 times)

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
File Download
« on: April 22, 2013, 03:27:34 AM »
Hi All,

I looked at the webserver download file example and although it works my needs are different. I was wondering;

1.) Would you use a Get or Post to download a file from a NetWebPage?
     a. I am thinking either would work.
     b. Should a NetWebForm(mem) be used to call the NetWebPage
     c. File(s) can be very large 500meg - 1+gig(PDF's/CSV)...this has me concerned about timeouts.

2.) I need to have a userid and pwd sent to the server's netwebpage to
    a. Validate the userid and pwd
    b. Check a production file to see if there is anything to download
    c. I do not want to show any dialogs for downloads success or failure,
          and if nothing to download then close quietly.
    d. Client's will be using some type of script engine to do this.

3.) Clients will be checking this quite often, some maybe every 10 secs.
         a. Do you see this as a potential problem?
         b. Right now I have about 10 clients polling our ftp site continuously this may
             go to 100+ clients in the near future

4.) Or should I use a secure FTP server?

Regards,


Ashley

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: File Download
« Reply #1 on: April 23, 2013, 05:47:49 AM »
Hi Ashley,

>> 1.) Would you use a Get or Post to download a file from a NetWebPage?

Either would work, but I'd use a GET. Get's are for "getting", Posts are for "Putting".

>> b. Should a NetWebForm(mem) be used to call the NetWebPage
no need for this.

>>  File(s) can be very large 500meg - 1+gig(PDF's/CSV)...this has me concerned about timeouts.

timeouts aren't your problem, but Ram most certainly is. Files are loaded into Ram before sending, and programs have a 2 Gig limit, so it'd be hard to serve files that large. But a CSV file that big surely demands to be zipped before sending? and I hate to know how you are managing PDF's that large... Plus files that large will take an absolute age to download - like hours and hours.

2.
Incoming parameters can be added to the URL For example;

www.capesoft.com/myreports?login=bruce&password=pwd


then in the MyReports procedure I can use

p_web.GetValue('login')
and
p_web.GetValue('password')
to decide what I want to send back.

>> 3.) Clients will be checking this quite often, some maybe every 10 secs.
         a. Do you see this as a potential problem?

Obviously it depends on the scale. 100 users at 10 seconds is 10 per second. So your bandwidth, cpu and disk need to be able to cope with that sort of activity.

Personally I would not poll that many users that often - I'd slow it down a bit. Ideally you want around once a minute to allow for some scalability.

cheers
Bruce










astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: File Download
« Reply #2 on: April 24, 2013, 10:24:18 AM »
Hi Bruce,

Thanks so much for the guidelines. I have one customer that is doing the 10 second polling on our ftp site.
I will try and convince them on a 1 minute cycle. As far as size I never had that great of bytes but we did
have a 500 meg csv and pdf(8000 pgs.) combinations.

Regards,
 
Ashley