A common question about why so many classes implement ICommunicationObject requires a bit of a side trip into design history. The role of ICommunicationObject is to provide a common state machine across many different objects. That state machine has no notion of sending or receiving data; sending and receiving are aspects of another concept called channels. Instead, the state machine encompasses six notions about how an object must be used:
These notions correspond to six states called Created, Opening, Opened, Closing, Closed, and Faulted. Each of these states has a mechanism in the state machine for transition and notification.
Finally, there are the base objects that implement the state machine, collections of these objects (associated, for example, by a common channel factory or channel listener), collections of the collections, and so on. A service in many ways is just a collection of collections that splay eventually down into many operational channels that send and receive messages. When you have a collection of communication objects, it is convenient to work with them as a unit so that you have a single object running through the same state machine that reflects its contained objects. The same can be said about collections of collections. Since the state machine is embodied by ICommunicationObject, you can see why everything implements it.
Next time: Configuring TCP Activation from the Command Line
Please note that this blog is no longer on CodeBetter but at http://samgentile.com/blogs/samgentile/default
Since the last pair of performance comparisons, I've had a few people ask for similar comparisons between
Please note that this blog is no longer on CodeBetter but at http://samgentile.com/blogs/samgentile/default.aspx . You do not need to do a thing as the FeedBurner feed is automagically directing you here. WCF/WF/Orcas/BizTalk/CSD Congrats to all my friends