[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

FileSystemWatcher - reliability and huuuuuge implementation

Posted on 2009-07-02
6
Medium Priority
?
1,319 Views
Last Modified: 2013-11-08
Hi,

I am looking to implement the FileSystemWatcher in some large corporations with 5000-100000 users across as many as a few hundred data servers. I appreciate there will be bottle necks when coming to evaluate my data - I will cross that bridge later. Does anyone have experience using the FileSystemWatcher on a large scale? Is it reliable? I have read something about catching errors to ensure all activity can be acknowledged.

All thoughts will be welcome.
0
Comment
Question by:CoolestBananas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 9

Expert Comment

by:Rahul Goel ITIL
ID: 24761722
0
 

Author Comment

by:CoolestBananas
ID: 24761800
That is a very useful link. It is irritating that this class is unreliable - so predictable! Have you had any other feedback? Is this your test case?
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 24763673
There are many more issues with the FileSystemWatcher. It not only misses some files, it would raise multiple events for the same file. As a test, watch a directory in a sample program and then use notepad to create a text file in that directory. You will receive two events for that same file. The best approach, in your case as it involves so many users and servers, would be to hook into Windows storage system at low level and monitor the hard disk activity. Here are some references but these mainly cover the UI aspect of hooking

http://msdn.microsoft.com/en-gb/magazine/cc188966.aspx

http://www.codeproject.com/KB/system/globalsystemhook.aspx?msg=840940

http://msdn.microsoft.com/en-us/library/ms644959%28VS.85%29.aspx

http://www.codeproject.com/KB/cs/netwin32hooks.aspx

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:Solar_Flare
ID: 24767557
I have used the filesystemwatcher to monitor files at my company (probably around 250 clients each monitoring their own network share location for new files created). I found that the biggest issue was that network interruptions meant that I had to catch the error raised and loop at intervals trying to re-initialize the filesystemwatcher until the connection was restored (otherwise the program keeps running but just desen't receive any events)


0
 

Author Comment

by:CoolestBananas
ID: 24771168
CodeCruiser: I have had a quick skim through those links and they are very useful. Thanks. I feel comfortable hooking into the Win32 API. What worries me is that this is what the FileSystemWatcher is trying to do and obviously has problems and therefore is unreliable. Why is it unreliable? Will I not just come across the same problems but in a more roundabout way?

Solar_Flare: I would be running the "watcher" on the device and building a file to be dumped on another server for evaluation. What do you think?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24771213
FileSystemWatcher is developed so that it just raises all file creation, modification, deletion events etc. When you hook into API yourself, you could handle the situations so that you do could handle the creation of a file properly. You could also code around the Watcher in way that you monitor the events being raised and match them to previous recent events to detect if multiple events are generated for same file etc.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question