Tuesday, 21 October 2014

StatusReporter Component

This time I am presenting the StatusReporter component (Control).
This component displays important events in your application in real time.
It is designed for real time debugging and (or) displaying current status of the system.
What is so special about it? Well such component should cause as little disturbance as possible to the target system. Why is that? Imagine you design the system with the serial or the network communication. The core of the system that receives the actual byte stream sends the message, displaying the content of this stream. Is it hard to do? It all depends upon how frequent the bytes come.
If the frequency is several thousand per second, it becomes a real problem. The actual problem is that the system that displays the messages, slows down the primary system to the point when it becomes nonfunctional. A millisecond delay in the communication system can be a killer.
So, how do we deal with this problem? We put the message in the queue on one thread, and the get it from the queue when system has the resources in abundance in order to display it. This component is almost invisible to the system that is being under the scrutiny. It is like a microscope that allows watching the live cell without killing it.

The source code can be downloaded here

No comments:

Post a Comment