Reactive Networking of Semantic-Data Library
UAOOI.Networking.SemanticDatalibrary is designed to be a foundation of developing application programs that are taking part of message-centric communication pattern and interconnected using the reactive networking concept described in the Semantic-Data Processing Architecture. The diagram below presents how to engage this library to provide a more specific functionality required depending on the role of concern compliant with the overall architecture.
Figure 1. Message-centric Communication Roles Implementation
NOTE: The project is in development stage - major changes are expected.
The figure below shows the relationship between the library
UAOOI.Networking.SemanticDataand external parts compounding any reactive networking application (
OOI Reactive Application). The
OOI Reactive Applicationis collection of
Consumerentities. They must provide an interface to real-time process data, hence they are recognized as an extension of
DataRepositoryclass. To implement the
IBindinginterface should be provided to create a bridge between real word data
Row Datarepresented by the
Figure 2. Application Architecture
Any application engaging the library is composed using the dependency injection pattern. The
DataManagementSetupclass is a placeholder to gather all external injection points used to compose the application, initialize the communication and bind to local resources.
To promote flexibility and the separation of concern design approach, the concreted types are loosely coupled with the library. It means, that the selection of the concrete types used to compose the application is up to the application, namely it may designate them at runtime. To conform to the library requirements all the classes must implement appropriate contract defined as an interface.
Configuration: represents functionality needed to read the configuration and handle the configuration modification at runtime. This functionality must be supported by the deployment platform. The library described in the article Reactive Networking (RxNetworking) Configuration provides helper classes that may be used to gather all required information from the configuration files to instantiate the communication infrastructure and start pumping the data. This class must implement the
Consumermust provide its own configuration.
DataRepository: represents local resources in the application, for example PLC registers, HMI variables bound to screen controls, internal register of smart meters, etc. Depending on the role the library supports:
Consumer- recovering data from message and writing to local resource.
Producer- reading data from the Local resource, populating a new message with this value and sending the message over the wire.
MessageHandling: is a part providing the message handling services. The communicating party can be interconnected using any transparent messages transport infrastructure. For the broker-less transport layer the network infrastructure routes datagram-based messages and the
ETHERNETprotocol. Applying the broker-based approach a core component of the transport layer is a message broker and in this case the
Encoding: A method stub or simply stub in software development is a piece of code used to stand in for some other programming functionality. A stub may simulate the behavior of existing code (such as a procedure on a remote machine, such methods are often called mocks) or be a temporary substitute for yet-to-be-developed code.
In figure below the relationship of the internal implementation with the overall domain model is presented.
Figure 3. Internal Implementation Diagram
- It is assumed that the data consumer is lightweight and may support limited encoding/decoding functionality. The functionality will be provided as a plug-in library injected at run time. EncodingDecoding is recognizable using a pair of: name recovered from the Type object and OPC UA DataType represented by its URI.
- Data binding - it is assumed that the binding of Local repositories/variables and messages content items is provided by the configuration. It could be also provided at runtime by updating the configuration using any external mechanism.
Binding between the local repository
DataRepository(e.g. HMI Screen, OPC UA Server Address Space) and the message content items is provided by the
IBindinginterface and its basic implementation
Bindingclass. This class is responsible to decode the data from the format used to construct the message to the local type. The decoders are factored by the external class
Encoding. See definition for details:
IBinding. It is expected that the value conversion (decoding) is provided by an instance of the IValueConverter class. If it is not applicable the Adapter pattern must be used.
Message Transport will not be implemented as the library part. This functionality must be injected form outside by implementing the interfaces:
IMessageHandler: provides basic functionality handling messages communication over the wire.
IMessageReader: provides functionality supporting reading the messages from the wire.
IMessageWriter: provides functionality supporting sending the messages over the wire.
The library provides basic implementation of the above mentioned interfaces. In following diagram an implementation provided by the library is presented.
Figure 4. Implementation Diagram
Hope is that the abstraction will support any types of message based communication layer. The library provides basic implementation of the
Messageclass that supports package level encoding/decoding functionality.
Figure 5. Sequence Diagram