thinger-io/thinger-server

Possibility to create aliases for bucket variable names

Opened this issue · 0 comments

In general, in key and value structures (JSON, PSON...), keys consume a lot of space in the playload.
See this image:
image
Source Link

One approach to minimizing key size in a PSON would be to allow aliasing for column names, something like this example:
Assigning the alias could be done on the bucket screen:
image

And in CSV export, the file header could look like this:
image

In the example above, maybe 18 bytes can be saved by changing ( iu -> interval_uplink, m -> millis ). The code would look like this:

thing["dados_output"] >> [](pson& out){
                              out["iu"] =  interval_uplink;
                              out["m"]  =  millis();
                              };