Advertisement

dodSON Software Component Managment

dodSON Software Component Managment In this video we will explore the dodSON.Core.ComponentManagement namespace.

dodSON Core Library Help File


--------------------------------------------------------------------------------

The dodSON.Core.ComponentManagement namespace, utilizing virtually every namespace in the dodSON Core Library, provides all the functionality to create a configurable, packaged-deployed, plugin-based distributed programming framework.

To achieve this, the dodSON.Core.ComponentManagement namespace introduces the concepts of controllers and components. Each configurable controller is responsible for a single primary function, which are: packaging, installation, logging, networking and component control. Each controller is built using the types from their respective dodSON Core Library namespaces. Components are either extensions or plugin, built using the types from the dodSON.Core.Addon namespace. The Component Manager supervises and coordinates the controllers to provide a stable framework where components are packaged, installed and started and then provided with configuration, logging and networking services preconfigured and ready to use.

In the following example, we will instantiate a Component Manager from a configuration file. When started, it will install 3 packages with 1 component each: 1 extension and 2 plugins. Each component has been designed to log any messages received and then to reply, directly, to the client sending the message with a new message. This will set up a simple message oscillation between the clients.

A custom log filter has been provided which can be configured to filter any number of log source ids. We will add this custom log filter to a log splitter and create 4 logs: 1 for the Component Manager and 1 for each of the clients.
.
.
.
After letting the Component Manager run for 1 minute, we pressed any key and stopped the Component Manager. The Component Manager will first stop the Component Controller, which will stop all of the components. Stopping the components is the reverse of starting the component; we will stop the plugins first and then the extensions. Within the groups of plugins and extensions we will stop each component in reverse priority order. As each component is stopped its client is unregistered from the communication system; displaying some basic statistics.

Once the Component Controller is stopped, the Communication Controller is stop; first it unregisters its internal client, and any other clients that have not been on unregistered, and then displays some basic statistics. The communication controller only deals with envelopes, therefore, only the incoming and outgoing bytes and envelopes are displayed.

Once all of the Component Manager’s controllers are stopped, the Component Manager is finished and logs its total runtime and how many logs it generated.

Now we will look at the ExtensionAlpha log. It shows ExtensionAlpha starting and that it is running in application domain 1; this is because it is an extension and is running in the host’s application domain. ExtensionAlpha does not receive the seed message because ExtensionAlpha sent the seed message and has been configured not to receive its own messages. We can see, however, that messages are being received from PluginGamma and PluginBeta. There are twice as many PluginGamma messages as there are PluginBeta messages because PluginBeta waits 2 seconds before responding to a message. Finally, we can see that ExtensionAlpha was stopped.

Looking at the PluginBeta log we can see that it was started and is running is application domain 6; this is because it is a plugin and is running in a different application domain than its host. We can see that it received the seed message from ExtensionAlpha and then receives only messages from ExtensionAlpha; this is because the components have been programmed to respond directly to the clients that sent the message, in this case ExtensionAlpha.

Looking at the PluginGamma log we can see that it was started and is running is application domain 5; this is because it is a plugin and is running in a different application domain than its host; is has a lower application domain id because it was started before PluginBeta. We can see that it received the seed message from ExtensionAlpha and then receives only messages from ExtensionAlpha; this is because the components have been programmed to respond directly to the clients that sent the message, in this case ExtensionAlpha.

The dodSON.Core.ComponentManagement namespace provides a feature rich framework for a configurable, package-deployed, plugin-based distributed programming framework; making it easy to create configurable extensions and plugins that are provided with packaging and installation services, logging and advanced communication systems.

Please see the dodSON.Core library help file for more information.

software,software development,software library,software engineering,application,application development,application library,api,.net,c#,code,coding,Microsoft,Visual Studio,Visual Studio 2017,Visual Studio 2019,distributed programming,programming framework,plugin,plugins,

Post a Comment

0 Comments