Azure Gateway DataRepository
Azure, Cloud Computing, Object-Oriented Internet, OPC Unified Architecture, Reactive Networking (RxNetworking), Machine to Machine Communication, Internet of Things
This project shows an example implementation of an OPC UA PubSub to Azure embedded gateway. It is implemented as a composable part of the Reactive Networking Application (
RxNetworking App). The article Reactive Networking of Semantic-Data Library covers a description of the architecture supporting the reactive communication design pattern. The
RxNetworking Appis an aggregation of
Consumerentities derived from
DataRepository. They must provide interconnection to real-time process data, hence they are recognized as an extension of the
AzureGatewaypart fulfills the
Consumerrole and uses out-of-band communication to push telemetry data to the cloud.
Working through this tutorial gives you an introductory understanding of the steps required to implement the
Consumerrole of the
RxNetworkingapplication. It is an example of
Semantic-Datareactive networking based on OPC UA PubSub specification. The document OPC UA PubSub Main Technology Features covers a description of selected fetuses relevant to this specification.
This project is proof of concept that out-of-band communication for OPC UA PubSub can be implemented based on the
DataRepositoryconcept. This workout will be described in an independent article. To get the full story and your copy check out the preprint from Research Gateway: Object-Oriented Internet - Azure Interoperability. Main purpose of this preprint it to enable an early community review. We will consider your contribution to be applied to the final version of the article.
The obtained results prove that the embedded gateway archetype implementation is possible based on the existing standalone framework supporting reactive interoperability atop of the M2M communication compliant with the OPC UA PubSub standard. It is worth stressing that there is no dependency on the Client/Server session-oriented relationship. In contrast to the architecture described in the OPC UA Part 1 specification, the publisher/consumer roles are not tightly coupled with the Address Space of the OPC UA Server embedded component. In the proposed approach, the cloud interoperability is supported by a dedicated part employing out-of-band communication only without dependency on the OPC UA functionality. In contrast to the middleware concept, the gateway functionality is implemented as a part - composable to the whole without programming skills. It makes it possible to modify its functionality later after releasing the library or even deploying the application program in the production environment because the part is composed at the runtime.
Concluding, the paper describes a proof of concept that it is possible to integrate selected cloud services (e.g. Azure) with the Cyber-physical network atop of the OPC UA PubSub applying the proposed architecture and deployment scenario. In contrast to limiting the PubSub role to export the data from the Address Space exposed by a selected OPC UA server out of the OPC UA ecosystem, applying the proposed solution enables interoperability of the cloud services and the Cyber-physical network as one whole.
Here are steps undertook to implement the
Consumerrole in the application:
DataManagementSetup: this class has been overridden by the
PartDataManagementSetupclass and it initializes the communication and binds data fields recovered form messages to local resources.
IMessageHandlerFactory: have been implemented in external common libraries and
Consumerdoesn't depend on this implementation - current implementation of the interfaces is localized as services using an instance of the CommonServiceLocator.IServiceLocator interface.
IBindingFactory: has been implemented in the class
PartBindingFactorythat is responsible to gather the data recovered from the
Messageinstances pulled from the
Distribution Channel. The received data is driven to the Azure services using configured out-of-band protocol.
IConfigurationFactory: the class
PartConfigurationFactoryimplements this interface to be used for the configuration file opening.
PartDataManagementSetupconstructor initializes all properties, which are injection points of all parts composing this role.
public sealed class PartDataManagementSetup : DataManagementSetup
//Compose external parts
IServiceLocator _serviceLocator = ServiceLocator.Current;
//string _configurationFileName = _serviceLocator.GetInstance<string>(CompositionSettings.ConfigurationFileNameContract);
m_ViewModel = _serviceLocator.GetInstance<ProducerViewModel>();
EncodingFactory = _serviceLocator.GetInstance<IEncodingFactory>();
MessageHandlerFactory = _serviceLocator.GetInstance<IMessageHandlerFactory>();
//compose internal parts
ConfigurationFactory = new PartConfigurationFactory(ConfigurationFilePath);
PartBindingFactory pbf = new PartBindingFactory();
_DTOProvider = pbf;
BindingFactory = pbf;
DataManagementSetup.Start()method is called to initialize the infrastructure, enable all associations and start pumping the data.
Implementation of this interface is a basic step to implement
DataRepositoryrepresents data holding assets in the
RxNetworking Appand, following the proposed approach, the
IBindingFactoryinterface is implemented by an external part. It captures functionality responsible for accessing the process data represented by the
LocalResourcesrepresents the external part that has a very broad usage purpose. For example, it may be any kind of process data source/destination, and to name a few
OPC UA Address Space Management,
Azurecloud-based front-end, etc.
AzureGatewayfunctional package has been implemented based on the
Consumerconcept. This particular
PartBindingFactory) implements the
IBindingFactoryinterface to gather the data recovered from the
Messageinstances pulled from the
Distribution Channel. The received data is driven to the Azure services using configured out-of-band' protocol. An instance of the
IBindingFactoryis responsible to create objects implementing
IBindingthat can be used by the
Consumerto forward the data retrieved from
NetworkMessagreceived over the wire to Azure services.
The proposed implementation of the Azure gateway proves that the
DataRepositoryand associated entities, i.e.
Producercan be implemented as external parts, and consequently, the application scope may cover practically any concern that can be separated from the core OPC UA PubSub communication engine implementation.
UAOOI.Configuration.Networking. In a typical scenario, this implementation should not be considered for further modification. The only open question is how to provide the name of the file containing the configuration of this role. This role uses an independent configuration file:
attached to the project.
Note; This library is not considered to be published as the NuGet package.
See also the list of contributors who participated in this project and the
- Postół M., Szymczak P. (2021) Object-Oriented Internet Cloud Interoperability. In: Paszynski M., Kranzlmüller D., Krzhizhanovskaya V.V., Dongarra J.J., Sloot P.M. (eds) Computational Science – ICCS 2021. ICCS 2021. Lecture Notes in Computer Science, vol 12745. Springer, Cham. https://doi.org/10.1007/978-3-030-77970-2_43
- Postół M. (2020) Object-Oriented Internet Reactive Interoperability. In: Krzhizhanovskaya V. et al. (eds) Computational Science – ICCS 2020. ICCS 2020. Lecture Notes in Computer Science, vol 12141. Springer, Cham; DOI: https://doi.org/10.1007/978-3-030-50426-7_31
- Mariusz Postol, Machine to Machine Semantic-Data Based Communication: Comprehensive Survey chapter in book Computer Game Innovations 2018, Publisher: Lodz University of Technology Press; ISBN: 978-83-7283-999-2