FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 28th, 2003, 04:03 PM
mph mph is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 49 mph User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 56 sec
Reputation Power: 7
FTP Queue System

Has anyone been able to create a FTP file queue system similar to that of the one used on FilePlanet using MySQL & PHP or does anyone have any documentation on it?

Thanks in Advance,
Michael Halvorsen

Reply With Quote
  #2  
Old June 28th, 2003, 04:10 PM
alexgreg's Avatar
alexgreg alexgreg is offline
Full Access
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jun 2000
Location: London, UK
Posts: 2,019 alexgreg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 sec
Reputation Power: 11
Why not describe to us what you are trying to do, rather than posting a URL and expecting us to figure it out for you?
__________________
Alex
(http://www.alex-greg.com)

Reply With Quote
  #3  
Old June 28th, 2003, 04:32 PM
mph mph is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 49 mph User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 56 sec
Reputation Power: 7
Sorry...
Basically, our site needs a download system to limit the number of downloads per FTP server. Our site gets over 2TB of data transfer right now... thats without the file servers up yet.

We are trying to put a system together similar to FilePlanet's:
We want to have a download system where you click a ftp mirror and a script using PHP & MySQL checks to see if there are any slots available in the particular FTP mirror they pick. If there are open slots, it allows them to download the file... if not, they are put in a queue. That queue needs to be updated every minute or so to ensure they get to download the file. We would like to also be able to display the FTP mirrors status (ie. number of slots free vs. number of slots total).

I have yet to see any documentation on this process online. I have searched Google and have came up with no results.

There are two sites that I know to exist that use this file system, Fileplanet.com & FileShack.com. FilePlanet uses ASP & I am unsure what FileShack uses. ASP is not an option due to the amount of bandwidth our site consumes on a monthy basis.

Thanks in Advance,
Michael Halvorsen

Reply With Quote
  #4  
Old June 28th, 2003, 05:16 PM
alexgreg's Avatar
alexgreg alexgreg is offline
Full Access
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jun 2000
Location: London, UK
Posts: 2,019 alexgreg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 sec
Reputation Power: 11
This seemed initially simple - however I figured out that PHP will need to know when a download has finished, so it can free up a slot on an FTP server. Otherwise it would have just been a simple matter of incrementing a counter for each FTP server when it was given a download, and sending FTP request to servers that were loaded the least.

Maybe you can pipe the logs from the FTP servers through a Perl script that will decrement a value in MySQL when a download on a certain server finishes?

The best way to do this would be to make the FTP servers keep track of the number of downloads they are doing.

Another idea - when a download request comes in, try and retrieve a 1byte file from each of the FTP servers. I think they return code 550 if they're too busy to accept the transfer request, so you can give the request to a server that isn't busy. Even better, have a Perl script check each server every minute or so and record their statuses in a database table that you can read with PHP.

Alternatively, you could just have a hardware load balancer sitting in front of your FTP servers

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > FTP Queue System


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT