My basic idea here is, I'm going to be creating a website that will store a number of very large files (think 200 megs) and hopefully generate a fair amount of traffic. The problem here is that I can not afford to pay for a box/bandwidth large enough to provide ample service. So the idea is to enlist other websites and have them provide the content to save me bandwidth and storage.

So my question is, how can I best accomplish this using perl? The basic idea is to have a database of 'host websites', then whenever a file is uploaded my my server, it would choose say, three websites that still had available storage space and bandwidth, and then send the file to them for storage. I would then reccord the location of the file in another database, along with its size and so forth. Then when someone requests a file, I would select from the database of hosts that contain the file and still has bandwidth, then subtract the file size from the hosts bandwidth and redirect to that file.

So again my question, how can i do this with perl? I'm more the familiar with the database portion of this, but i'm unsure of the best way to replicate the file out to the other hosts. Some sort of lwp::* operation? Net::Ftp? But I'm also concerned about security, as well as over the ease of setting it up on the other hosts.

In reply to Multiwebsite Distributed Content? by BUU

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.