OPCFoundation / UA-.NETStandard

OPC Unified Architecture .NET Standard
Other
1.96k stars 946 forks source link

PubSub OPC UA #628

Closed NakWarsi closed 5 years ago

NakWarsi commented 5 years ago

I was looking for PubSub sample code for but couldn't find any, is there any sample code available ??

cpipero commented 5 years ago

You have to look at the prototype branches like https://github.com/OPCFoundation/UA-.NETStandard/tree/prototyping-pubsub

--cos

mpostol commented 5 years ago

Code review

@cpipero I hope you agree with me but this implementation tightly merges PubSub and OPC UA together. Based on my experience described here:

OPC UA Makes Reactive Object Oriented Internet Possible

it could make impossible migration of the OPC UA down to field level.

From the described proof of concept related to HMI based on a small mobile device (Android based), we can learn that implementation of the PubSub as an independent pluggable component is feasible and thanks to the loosely coupled architecture based on the application composition it is scalable, i.e. we are able to freely select components (i.e. encoding, transport, data source, data destination, etc.) required in a selected application without necessity to touch the code and return to the development stage.

Additionally, thanks to this approach (composition) we can design application as adaptable at the deployment stage. More about adaptive programming you can learn here:

C# Adaptive Programming (AP)

This code I am using as an example for my lecture and lab.

Recommendation:

Work on decoupling the whole OPC UA stuff to promote separation of concerns approach.

Hope it helps.

NakWarsi commented 5 years ago

Thank You @cpipero that branch code sample is really helpful, thanks to you @mpostol for sharing amazing resource