File Watvcher Service

  • Thread starter Thread starter zeno
  • Start date Start date
Z

zeno

Hi!

I am about to develop an application that should be able to process
incomming xml-files that are dropped in a directory by another
application/system. My application should be able to handle a great
number of files, and no files could be lost.

When the application have picked up one file it will read the contents
of the file, call a web service and some other things and I think it
would be wise to process one file at a time.

I was thinking of using some kind of file queue that process one file
at a time, but I dont really know how to implement this. Solutions
anyone? Is the FileSystemWatcher a good solution?

The main thing about this application is that it must be able to handle
heavy traffic, and that no files could be lost.
 
Hmmm.


If it were me, I would:

a. Create a Service to watch files being dropped in.
b. I would NOT process the files here.
c. I would create a message in a MessageQueue .....saying "I need to
process this file".
d. Another service would read messages from the queue and process the
message (based on the filename).

This would be a good article to check out.
http://www.eggheadcafe.com/articles/20041204.asp


You could have

WatchIncomingFileDrops : IService


and then code up your own


ProcessFileCommand : ICommand
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top