Home > Articles > Programming > C#

  • Print
  • + Share This
Like this article? We recommend


The growing importance of small, resource-constrained devices is increasing the need for highly responsive code. Distributed objects must be able to communicate in a more natural real-world style via autonomous message exchanges. The callback and event mechanisms of C# provide a lot of what is needed to achieve such responsiveness.

The field of network management has for years relied on a variety of mechanisms for autonomous feedback, such as SNMP traps, JMX notifications, etc. Each of these approaches has advantages (small overhead) and disadvantages (insufficient information in notification messages). In many cases, network operators disallow event-based mechanisms for fear of wasting too much bandwidth. Clearly, more intelligence is required from these managed entities. For more on this topic, see my book, "Network Management, MIBs and MPLS: Principles, Design and Implementation."

The C# language provides a variety of easy-to-use callback and event mechanisms. These mechanisms allow for flexible two-way conversations between objects at the right time. Rather than having to guess if an object should be polled for data, you can instead just wait for that data to be supplied as appropriate. This facilitates right-sizing of code, produces loosely coupled class designs, and paves the way for separation of concerns.

  • + Share This
  • 🔖 Save To Your Account