You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When dealing with properties the purge properties message is essential for the correct state synchronization of a device with an Astarte instance.
The current specification requires the purge properties message payload to be compressed using deflate. This to minimize the size of the payload and increase the efficiency of the Astarte protocol.
However, when dealing with resource-constrained embedded devices the overhead required to compress the payload might surpass the gained benefits.
Let's take as an example the Astarte device SDK for Zephyr. With a simple application taking care of transmitting some datastreams and setting some properties.
Excluding the compression the RAM heap usage never exceeds 6K Bytes.
If we instead include the compression of the purge properties message the used RAM heap rumps up to over 14K Bytes.
Furthermore, the purge properties message is not always transmitted or received when connecting to Astarte.
Some suggestions to improve this
It would be awesome for a device to have the choice of compression or non-compression of the purge properties message.
One first suggestion would be to encode the purge properties state in an empty cache message.
The empty cache message payload is currently hardcoded to "1". However, this is of little utility as already receiving an empty cache message is unequivocal. The payload could be used to encode a choice in the purge properties compression.
The text was updated successfully, but these errors were encountered:
When dealing with properties the purge properties message is essential for the correct state synchronization of a device with an Astarte instance.
The current specification requires the purge properties message payload to be compressed using deflate. This to minimize the size of the payload and increase the efficiency of the Astarte protocol.
However, when dealing with resource-constrained embedded devices the overhead required to compress the payload might surpass the gained benefits.
Let's take as an example the Astarte device SDK for Zephyr. With a simple application taking care of transmitting some datastreams and setting some properties.
Excluding the compression the RAM heap usage never exceeds 6K Bytes.
If we instead include the compression of the purge properties message the used RAM heap rumps up to over 14K Bytes.
Furthermore, the purge properties message is not always transmitted or received when connecting to Astarte.
Some suggestions to improve this
It would be awesome for a device to have the choice of compression or non-compression of the purge properties message.
One first suggestion would be to encode the purge properties state in an empty cache message.
The empty cache message payload is currently hardcoded to "1". However, this is of little utility as already receiving an empty cache message is unequivocal. The payload could be used to encode a choice in the purge properties compression.
The text was updated successfully, but these errors were encountered: