At work I have a set of server processes that run and process emails. Once processed then an event is set out to our clients informing them that the new data for the primary key is available. Synchronoulsy. This of course has the effect that every client machine has to read from the server to update before the next email can be parsed, and should a client stop responding then the whole process hangs.
So my recent bug fix was to separate the parsing of the emails from the Notification of the clients. I used a Queue wrapped in a Thread Safe manner, and added into a singleton class. The add method then kicks off a thread (should one not already exist) which then starts dispatching the messages out to the clients.
Now what this has do with instrumentation is that the queue needs monitoring so that you can see how far the dispatch of the clients is getting behind the parsing of the emails. Now that is where the Performance Counter classes come in
Things I found
Well I’ve had issues with loosing all Performance counters (yes that includes System counters as well) on two machines.
I also found that it was much easier to work with Instances than without.