Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protobuf encoding? #202

Open
emiltin opened this issue Dec 3, 2024 · 3 comments
Open

Protobuf encoding? #202

emiltin opened this issue Dec 3, 2024 · 3 comments

Comments

@emiltin
Copy link
Contributor

emiltin commented Dec 3, 2024

Question from a manufacturer:
Did anyone used Google protobufs for validating messages and stronger message typing when using RSMP protocol?

@emiltin
Copy link
Contributor Author

emiltin commented Dec 3, 2024

JSON was chosen because it’s very easy to work with and is human readable.

Protocol buffers are more efficient and do provide typing it’s harder to update the format because you need the protocol schema at both ends.

For RSMP 4 we’re considering CBOR, which is a binary encoding of JSON. It’s more efficient, but with the flexibility of JSON, and it does not require a protocol schema.

We do work with JSON schemas to validate the format of messages. Whether it would be easier to work with a protocol schema is worth considering.

@RazeAntoine
Copy link

When you're communicating in JSON, you may also want to consider whether or not to compress it. Compression can reduce the size of the message by up to 75%. Is it worth looking into?

@emiltin
Copy link
Contributor Author

emiltin commented Dec 12, 2024

Yes it's worth considering, however increased CPU need might be problematic on embedded devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants