开发者

FTP FileWatcher

So, I am in this little predicament where I am stuck watching a few ftp folders to see if they have new files added to them. If they do, it needs to throw an event with the file name. Thereby telling something else to download that file.

This is a pretty simple object to make, I was just curious if anyone knew how expensive this operation would be?

I plan on using the command NLIST because I don't need file size information, and there will be no sub-directories in the folder. Each file in the folder will have exactly 25 characters in its name.

There could be anywhere from 10 to 'maybe' a couple thousand (max around 2000) files per folder (usually on the lower end, 100-300, but currently growing).

The files are anywhere from 250kb to a very VERY unlikely 10mb (usually within the 250kb to 4mb range).

There possibly could be up to a few hundred folders (in which case I could change the watch frequency depending on number of folders), but currently there are only a few (6-10ish).

There also would be multiple logins for the ftp server, different logins would have access to different folders.

I am not asking for an implementation, just if anyone 开发者_运维知识库has some first or second hand knowledge about FTP, how could this affect my network.

I am not opposed to putting in file retention times or change the frequency in which I check for new files.


Do you have any control over the remote servers? FTP isn't really optimized for this, and you could probably do a lot better with some sort of dedicated mini-server. You could use file system monitoring on the remote side and just send out the filenames when they arrive rather than continuously polling. You'd only need to have one connection open too, rather than the two that FTP requires.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜