Power of Ada
In “What You Need to Know About One-Way Calls, Callbacks, and Events” concerning WCF Essentials (that is, Microsoft Windows Communication Foundation Essentials), Juval Lowy has a diagram (Figure 7) showing subscribing clients and publishing clients interfacing with a Pub/Sub Service. Also interfacing with the Pub/Sub Service is a Persistent Subscription Admin service.
Although, my current Message Controller framework separated out a Message service of Remote for forwarding messages between applications and some other features such as Memory management into Ada child packages, it didn’t segregate the procedures and functions involved with the Writer and Publish of a topic producer (a publishing client) and the Reader of a topic consumer of a subscribing client. In addition, due to the aerospace / embedded origins of the PC based exploratory project, the Pub/Sub “service” is part of the framework in every application of the distributed system. That is, it can’t very well be contained in its own independent PC process/application since an aerospace application has to keep running even if a part of it fails so the failure of a stand-alone Pub/Sub service would not be acceptable.
Also, since in this distributed system any particular component can subscribe to be a consumer of one topic it can also be the producer of another and hence be the publisher. That is, any particular participating component can be both a producer and a consumer. Therefore, the Message “service” of the framework also had routines for registering the topics that a particular component planned to produce as well as those it needed to consume.
Since the methods required had grown to a significant number and weren’t assigned to a category denoting their general purpose, I decided to make such assignments. Also, to avoid extra confusion since more routines will become necessary in order to add unsubscribe, late subscription (that is, after startup) and the robustness to allow an application to connect, disconnect and then reconnect to the inter-application network.
At first I thought of making the registration methods be part of a Subscribe package. But considering how the producer registration used many of the same methods, this seemed at odds with the terminology of the literature. Also, the distribution of the instances of the topics, whether the producer or the consumer, used many of the same procedures.
Therefore, I decided to use the Pub/Sub designation of Juval Lowy’s diagram to group the methods to publish (produce) and subscribe (consume) the messages in a Pub_Sub package and grouped the topic registration methods into a Registry subpackage.
After making the changes and getting the applications to build, they executed without a problem on the first attempt. An example of the power of Ada.
No comments:
Post a Comment