Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #28652

Data serialization for embedded platforms: ASN.1, JSON, Protocol Buffers....

From pozz <pozzugno@gmail.com>
Newsgroups comp.arch.embedded
Subject Data serialization for embedded platforms: ASN.1, JSON, Protocol Buffers....
Date 2019-06-05 10:58 +0200
Organization A noiseless patient Spider
Message-ID <qd808f$3tg$1@dont-email.me> (permalink)

Show all headers | View raw


It's a long time I work with embedded platforms, however I never used a 
well-defined and "standard" data serialization format. I often had the 
need to exchange data between platforms (Wifi, Ethernet, RS485...) and I 
always find a custom solution.

I perfectly understood the problem with this approach. Keeping the two 
(or more) side synchronized is very difficult and error-prone. When the 
sides are designed and maintaned by a single person/company, this 
approach could be sufficient. However I started to interface with other 
people, companies, very difficult techologies.

For example, I'm working on a IoT device that connects with AWS through 
MQTT protocol. I have to decide the data format of MQTT packets. They 
will be processed by AWS services, so JSON seems the perfect choice 
(maybe someone remember an old post where I was asking how to use a JSON 
in C for embedded platforms).
However JSON, considering it's a schema-less data format, is very 
complex to manage in C without using dynamic memory. So I'm thinking to 
use another data format, fithing with guys that will work with AWS, 
Javascript, Typescript, and so on (they doesn't understand why JSON 
isn't good on my side).

ASN.1 (mainly in uPER mode) and protobuf could be a good choice. However 
the backend/frontend guys don't know ASN.1, some has heard about protobuf.
I could insist to use ASN.1, however I'm not sure it is a good choice. 
And I don't know if they will be able to decode uPER messages in 
Typescript (for example). It seems they found something for BER, nothing 
for PER.

So this post just to discuss and share some experience on this topic.

Back to comp.arch.embedded | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Data serialization for embedded platforms: ASN.1, JSON, Protocol Buffers.... pozz <pozzugno@gmail.com> - 2019-06-05 10:58 +0200
  Re: Data serialization for embedded platforms: ASN.1, JSON, Protocol Buffers.... Boudewijn Dijkstra <sp4mtr4p.boudewijn@indes.com> - 2019-07-02 13:21 +0200

csiph-web