Purpose
To discuss the underlying implementation of the Reference Tag
in the Ignition Gateway Provider. The hope is to keep the conversation targetted in two areas:
- Initialization/Startup Overhead
- Ongoing Overhead
Background Reading
Early discussion on purpose/function of a reference tag: link
Observations
- Reference tags have an obvious impact to the
config.idb
structure. While minimal in relative terms, it is "heavy" in absolute terms, in the sense thatconfig.idb
is storing tag information asjson
. - From the above, there is at minimum a necessary initialization overhead to introducing
reference tags
into a tag db - From Colby in the above link:
[reference tags] aren’t much different than what you mentioned - expression tags, or more directly, derived tags. They are lighter weight than both of those in that they don’t create expressions in memory
- The above does not preclude the possibility that there is still a light to moderate amount of memory overhead associated with reference tags
Targeted Questions
- "Under the hood" (inside of the gateway), what is the initialization effort required to get a
Reference Tag
"up and running". Perhaps useful to discuss in Big(O) terms. - What is the ongoing cost to maintain a reference tag in memory terms to the gateway? Is this closer to a
pointer
(i.e. close to free), or closer to acopy
Discussion
I have recently had great success with Reference tags
in generating dedicated MQTT
Tag Providers for ingress and egress operations in and out of Ignition Gateways. The overhead is, at least apparently, very small, but because my environments have a lot going on, it is difficult (basically impossible) to isolate their performance against everything else going on. It quite obviously beat the alternative of allowing MQTT
scanning of our existing Tag Provider, and so I was content with the alternative.
More recently, I have found alternate applications for reference tags that fall in the category of bringing data closer to perspective with Reference Tag
-based UDT
structures. This pattern model is quite aesthetically nice, and providers downstream user with easier access to core data without having to search too much for it. As noted above, this does necessarily come with some tradeoff in performance. I mentally model these as pointers
, but I don't have any direct evidence for this, and I can't seem to find much clarity in any documentation or Forum topics (excluding the above).
I wished to open up this topic to discuss in more detail what the implementation looks like for these tags so I can get a better sense for what the trade off is for the obvious benefit of collecting data in a central place without replicating data capture.
Thanks,
Bobby