[LA.pm] Monitoring a directory using Event.pm

Kleindenst, Fred fred.kleindenst at citigroup.com
Thu Jun 9 10:28:46 PDT 2005


Good point.  If the trailing file is a checksum of the orginal file, then it adds another useful bit(s) of information.

The Net::FTPServer module looks like a robust, lazy way to go.

Cheers

--Fred

> -----Original Message-----
> From: Terrence Brannon [mailto:tbrannon at valueclick.com]
> 
> I still think trailing the uploaded file with a flagged file is better
> unless you are using hooks into the file-reception scheme.
> 
> This is because a network lag or client shutdown would stop 
> differences
> in file size on the server, but not because the file was completely
> transferred.
> 
> > This problems seems like a common theme. 
> > 
> > I worked on such a system before.  One element of the 
> system that I found clever was that the directory watching 
> deamon would notice new files, but it would wait until the 
> size or checksum of the file remained constant.  A CPAN 
> search reveals:
> > 
> > http://search.cpan.org/~trockij/mon-0.99.2/mon.d/file_change.monitor
> > 
> > which would be the proverbial 90% of the code you need.
> > 
> > Cheers
> > 
> > --Fred
> > 
> > 
> > > -----Original Message-----
> > > From: losangeles-pm-bounces at pm.org
> > > [mailto:losangeles-pm-bounces at pm.org]On Behalf Of Peter Benjamin
> > > Sent: Wednesday, June 08, 2005 6:20 PM
> > > To: Ranga Nathan; losangeles-pm at mail.pm.org
> > > Subject: Re: [LA.pm] Monitoring a directory using Event.pm
> > > 
> > > 
> > > 
> > > I'd tend to replace the existing FTP daemon with a perl based one,
> > > and just have the new perl FTP daemon receive the file, write it
> > > to disk, move it, and then spawn the software needed to process
> > > the file contents.
> > > 
> > > That being so much work, I would stay with cron.
> > > 
> > > One other alternative is to have the sending system, after
> > > FTP exits, to have the script there invoke ssh to run a 
> > > command on the remote system to process the file.
> > > I've been told by gurus I respect that this is the
> > > best possible method.
> > > 
> > > Along with a cron job on the receiving system to look for
> > > files that were not processed, due to the ssh failing,
> > > and it then doing "something", like emailing about this
> > > failure, and perhaps processing the file, even though it
> > > is late.
> > > 
> > > Alternatively, use a database replication method instead of
> > > FTP, and use the database triggers.  A lot of work though.
> > > 
> > > _______________________________________________
> > > Losangeles-pm mailing list
> > > Losangeles-pm at pm.org
> > > http://mail.pm.org/mailman/listinfo/losangeles-pm
> > > 
> > _______________________________________________
> > Losangeles-pm mailing list
> > Losangeles-pm at pm.org
> > http://mail.pm.org/mailman/listinfo/losangeles-pm
> 


More information about the Losangeles-pm mailing list