9:26, EET
March 7, 2014
Hi,
I’m working on a system where we are currently creating one subscription per monitored item. Looking at the API and some other examples it seems to me we could have added monitored items for all the events and data items we are interested in to a single subscription instead.
Are there any recommended practices regarding this? E.g. how many items you should add to a subscription, whether there are any downsides/upsides to multiple items per subscription vs multiple subscriptions with a single item?
9:58, EET
December 21, 2011
Yes, in practice, I would say that it’s better to minimise the number of subscriptions, since every one of them needs more infrastructure and checking in the server, especially. Also if you have several items in one subscriptions, their data changes will be packaged into the same data change notification message, which takes less communication bandwidth. Of course, very big subscriptions may lead to too big messages (but that means thousands of items). We have not really measured any performance differences, though. I suppose some balanced design would give the best overall performance.
Anyway, I would suggest that you design the client application according to the most suitable application logic and group items that are logically connected to the same subscription. If you notice any performance issues, then you can start optimising the design from that.
In general, the communication is very fast locally, and the optimisation may be more necessary, if you have a slow network connection between the applications.
Most Users Ever Online: 1919
Currently Online:
21 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 738
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6451
Newest Members:
jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettingerModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1