Open Genoil opened 2 years ago
All valid points.
Having said that, the Sparkplug project currently exists in two repositories: this one for sample implementations, and another one over at https://github.com/eclipse/sparkplug for the official specification documentation and compatibility test tool (TCK).
You'll probably get more traction on requests to change or clarify the spec if you make this an issue over on that repository.
I have some questions about the Sparkplug specification, but I don't know where to put these. I hope somebody could either answer them here or point me to a resource where I could have these answered.
1) Why don't PropertySets/Values and Template Parameters use the same internal structure? They seem to be made to contain the same kind of data and they seem to be able to hold exactly the same amount of data, but they are structured just a little bit differently. Why don't Templates not simply use an optional PropertySet instead of introducing an additional Parameter type?
2) What is the difference between Template.parameters and Template.metrics? I haven't seen any meaningful examples of how we are supposed to use them and how they relate to one another. In the spec, there even is a comment that says we are not supposed to put values into Template.metrics (Page 42 comment at Template.metrics). Yet all examples given in this repo do?
3) Why are there no array types? Are we supposed to implement these using single-column Datasets? I understand that there is room for extending types with custom types, but I don't exactly understand how that would work. I read that there are Ignition modules that do support Array types, but why aren't these then in Sparkplug?
4) If a client has sent a Metric.name, Metric.alias and Metric.type during BIRTH, it should be sufficient to only send Metric.alias and Metric.value in a subsequent PUB if the client was smart enough to remember the associated type. But apparently most clients aren't. What is then the whole point of sending metrics during BIRTH if the client isn't even supposed to remember or validate this?