Analogy to DataSet |OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Analogy to DataSet
Avatar
Aydin Homay
Member
Members
Forum Posts: 22
Member Since:
04/22/2021
sp_UserOfflineSmall Offline
1
06/24/2021 - 07:04
sp_Permalink sp_Print sp_EditHistory

Hi, I have basic questions in PubSub, 

If I have 3 signals, temperature, level, and humidity, and if I want to publish them on OPC UA Publisher should I create a DataSet for each signal or 3 Fields (FieldMetaDate) inside one DataSet? 

Regards,

  Aydin 

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
06/24/2021 - 08:54
sp_Permalink sp_Print

It depends on your requirements.

Putting more fields, when it makes sense, into a single DataSet can reduce overhead.

But too many fields can make messages too large.

Ideally, DataSets should contain fields which Subscribers need to see as a group.

So you if you had one group of Subscribers that only cared about the humidity and another group only cared about the temperature then you could argue that different DataSets made sense.

But if your Subscribers always need temperature and humidity then there should be 1 DataSet.

Other factors such as different publishing rates could also affect the decision.

Avatar
Aydin Homay
Member
Members
Forum Posts: 22
Member Since:
04/22/2021
sp_UserOfflineSmall Offline
3
06/24/2021 - 13:11
sp_Permalink sp_Print

Tnx Randy for your answer, please let me shed a bit more light on my question. There are 10,000 different process variables that I would like to publish to my subscribers and there is no way to group them, what would be the best way to go in this situation? 

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
06/24/2021 - 14:23
sp_Permalink sp_Print

Then maybe you should be looking at client-server subscriptions instead of pub-sub.

The pub-sub model only works if publishers have fixed bundles of data that are interest to subscribers.

If you have a situation where every subscriber needs a different set of data then cllient-server subscriptions make more sense because each client can select exactly what it needs.

Why did you decide you needed pubsub?

Avatar
Aydin Homay
Member
Members
Forum Posts: 22
Member Since:
04/22/2021
sp_UserOfflineSmall Offline
5
06/24/2021 - 14:32
sp_Permalink sp_Print

Well, What I can do is to group singles based on sub-systems and make each sub-system one subscriber, this will result in 500 signals per sub-system (subscriber). How about this case? 

I decided on PubSub because I don`t want to go with the overhead that Client-Server adds. I need very low latency and less resource (processor, memory, and network) consumption. Additionally, PubSub is more loosely coupled than 

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
6
06/24/2021 - 15:57
sp_Permalink sp_Print

I decided on PubSub because I don`t want to go with the overhead that Client-Server adds. I need very low latency and less resource (processor, memory, and network) consumption.

It is a complicated problem. Have you done benchmarks based on your system requirements or are you making theoretical assumptions?

You don't get those benefits if you are publishing a huge volume of information that most subscribers do not care about.

Multiple subscriptions with only the necessary data points could result in less resource consumption.

Avatar
Aydin Homay
Member
Members
Forum Posts: 22
Member Since:
04/22/2021
sp_UserOfflineSmall Offline
7
06/28/2021 - 00:26
sp_Permalink sp_Print

I am in the process of benchmarking. 

Avatar
Aydin Homay
Member
Members
Forum Posts: 22
Member Since:
04/22/2021
sp_UserOfflineSmall Offline
8
06/30/2021 - 03:10
sp_Permalink sp_Print

So you if you had one group of Subscribers that only cared about the humidity and another group only cared about the temperature then you could argue that different DataSets made sense.

Following this topic, if I have a group of subscribers that are interested only in humidity and some other on temperature, the better approach is to create two different datasets, right? So the question is as we are on PubSub with the UDP model all subscribers will receive both datasets, then why having different datasets could be an improvement and less overhead? 

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
9
06/30/2021 - 09:09
sp_Permalink sp_Print

The UDP headers provide information that allow subscribers to halt processing if they decide the data is not of interest (e.g. the dataset writer id).

If all data in a single dataset then the entire message must be processed and then discarded.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 27
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855