I had the exact same concerns already, and think we should definitely have a possibility to reduce the “meta data” in downstream messages.
We have several options IMHO to improve this:
-
As Marc outlined, we can make some meta data be configurable (e.g. on a tenant level or device level)
-
Additionally I like to propose to massively reduce the long names we use for the keys:
o
“orig_adapter” could be shortened (e.g. to “o” ?)
o
“orig_address” could be shortened (e.g. to “a” ?)
o
“device_id” could be shortened (e.g. to “d” ?)
o
“resource” could be shortened (e.g. to “r” ?)
o
“telemetry” – often contained in the value – could also be only “t” (as we allow this in the mean time for Kapua integration anyway)
o
And so on…
Mit freundlichen Grüßen / Best regards
Karsten
From: hono-dev-bounces@xxxxxxxxxxx [mailto:hono-dev-bounces@xxxxxxxxxxx]
On Behalf Of Marc Pellmann
Sent: Mittwoch, 25. April 2018 16:43
To: hono developer discussions <hono-dev@xxxxxxxxxxx>
Subject: [hono-dev] All data needed?
Hi,
I just asked myself if we really need all the additional data we send with a telemetry or event in our default setting.
If we send the data as in our getting started we send
{"temp":5} as the data. We also really need device_id=4711 as the application property (and of course we send it to the address telemetry/DEFAULT_TENANT with contentType
application/json).
But in addition to this we always set
Application properties: orig_adapter=hono-http, orig_address=/telemetry
Message annotations: tenant_id=DEFAULT_TENANT, device_id=4711, resource=telemetry/DEFAULT_TENANT/4711
(and the relatively verbose message id TelemetrySenderImpl-n).
So with a very simplified counting we could say to send 10 bytes data we need 54 bytes meta data and send in additional ~130 bytes often redundant data.
As long as we think that we have typical use cases with such small messages this is a big addition. Also if users rely on e.g. the message annotations in there
implementations (we have not specified them, but they are present..), it could be a problem to remove them later.
Should we not by default remove the message annotations and add the orig_* properties only if configured as special need? But maybe I missed or do not remember the reasons for some of them.