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

Protocol Buffer for the payload? #285

Closed
michcfr opened this issue Jan 30, 2024 · 4 comments
Closed

Protocol Buffer for the payload? #285

michcfr opened this issue Jan 30, 2024 · 4 comments

Comments

@michcfr
Copy link

michcfr commented Jan 30, 2024

Hello,
Is there any plan that Homie uses the Google Protocol Buffer for the payload?
It enable compact mqtt messages.
This is for example what Sparkplug mqtt is using.

I don't know if it is a good idea, I just wanted to share and discuss about this opportunity.

Michel

@Tieske
Copy link
Contributor

Tieske commented Jan 30, 2024

Not likely. The current draft for version 5 doesn't change the format, and if anything introduces some JSON elements (single topic device description).

It was discussed however, here's my recollection of why not;

  • not available everywhere
  • has a steeper learning curve, so harder to get started with
  • not easy to debug for user nor developer (because of its binary nature)

@michcfr
Copy link
Author

michcfr commented Jan 30, 2024

Thank you for the response.
The not makes sense.
May we get access to the draft for version 5? Thx

@Tieske
Copy link
Contributor

Tieske commented Jan 30, 2024

It's in the homie5 branch

@Thalhammer
Copy link
Member

Thalhammer commented Jun 26, 2024

As already outlined by Tieske, protobuf has been discussed before and a decision has been made in favor of json, mostly because of its wide availability. Homie mostly uses mqtt topics for structure, so the only message that would really benefit from it is the description topic. As lined out by #287 we will likely add a binary type soonish, which means you can send arbitrary binary data there (including protobuf).

I personally would have loved to move to protobuf for its DSL and codegen features, but I have to agree, that especially in IoT devices json support is often already built in the firmware while pb would need extra space.

I assume this is resolved, if not feel free to reopen @michcfr.

@Thalhammer Thalhammer closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants