[Tilesathome] Overall Status

Robert (Jamie) Munro rjmunro at arjam.net
Tue Jun 19 17:05:43 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alex S. wrote:
> Dirk-Lüder Kreie wrote:
>> johan.huysmans at x-tend.be wrote:
>>> Is uploading through post the most efficient?
>> As I wrote in my other mail, the main problem is, that each upload (~1
>> every 10 seconds according to OJW) results in up to 1365 files to be
>> extracted and then sorted into the filesystem, and a whole lot of
>> database updates.
> 
> Wouldn't the answer, therefore, be 'no'?
> 
> I wrote a solution for a similar issue which could be used here with
> relatively minor modification.
> 
> I won't go into the details of my use, but I will the modifications:
> 
> * have users upload the tile set zips via ftp or DAV PUT to a staging dir
> * run a queue processor once every minute or so via cron:
>   * check if another copy is currently running - if so, die quietly
>   * loop over:
>   * check the system load - if over (x), die quietly (so it doesn't do
> anything when the system is being used heavily)

I think it's probably better to have a script that does:

while (True) {
  while (files to process) {
    if (system load is high) {
      sleep(10);
    }
    process_oldest_file();
  }
  sleep(60);
}

and runs continuously, rather than have cron start something every 2
minutes that may well just exit 90% of the time.

Robert (Jamie) Munro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGd/7Wz+aYVHdncI0RAmGwAJ9SBpuokpe0Q0iLaq9kC+N2DbutywCfY6cG
CvHOAA0y1djXQClgZaI682k=
=JMUz
-----END PGP SIGNATURE-----




More information about the Tilesathome mailing list