in reply to Re^3: Asynchronous FTP
in thread Asynchronous FTP

Yes I could do it that way. I think I'll still use the 0B file though.

The "unzipper" service will use Win32::ChangeNotify to monitor a directory without having to read it every now and then ... thus the service will take no processor time at all if you do not upload anything. The monitored directory will NOT be the one into which I upload the ZIPs ... it'll be a subdirectory of that one. So the service will stay sleeping while the FTP server creates and fills the ZIP file and be waked up by the 0B file after the ZIP is done.

Actually I might find out I do not need to do that and that I will be able to filter the notifications so that the service will not be notified everytime a next chunk of the file is uploaded, but I doubt it.

Thanks for the suggestion anyway :-)

Update 2003-04-29: Just FYI. In the end I used something similar to the 0B file idea. The file is not actually 0B, it's a little bigger. It contains an MD5 hash of the ZIP and some secret text. The Unzipper then computes such an MD5 hash itself and compares the two to make sure the ZIP was uploaded by the Uploader. We use these two services a lot and are quite happy with the solution.

  Jenda

Replies are listed 'Best First'.
Re^5: Asynchronous FTP
by Aristotle (Chancellor) on May 23, 2002 at 04:35 UTC
    I'm probably clueless and shouldn't talk, but won't the renaming of bogus.zip to target.zip also wake up your watchdog? Seems like it should, at least..

    Makeshifts last the longest.

      Well it would, if I was monitoring that directory. The point is the creation of the ZIP would trigger it as well. And I am afraid the service would be waked even every time the FTP server writes another chunk of data into the file. And THAT is what I do not like. It's not a big problem, but I do not like it.

        jenda