12
kabbura
6y

Today I learned about binary encoding formats alternative to JSON such as Google Protocol Butter.
I like these binary formats.
Just thought I would share this here so others would benefit as well (and please share your experience if it is relevant)

Comments
  • 2
    damm you autocorrect! 😄
  • 1
    @heyheni
    😂😂😂😂😂😂😂😂
    Damn!
    Just noticed it.
  • 2
    Well I've used proto buff a few times before for smaller projects. Yes it works nicely and requires a smaller network bandwidth. But you'll lose the option of dynamically making up different data packets. You have to tell which variable will go where and what kind of data structures you'll encode. Also on both sides you have to have the exactly same order of variables to decode and encode successfully. Also you'll need to compile the proto file into lots of code then link with proto buff so it's also plus code a bit. But it can be worth it.
  • 2
    Try msgpack, simple and easy to learn.
  • 1
    I went down the rabbit whole and found gRPC. Exactly what I was looking for.
    I can't wait to start testing it and see if it makes server communications easier.
  • 0
    @cpp0xc0ffeeee
    I'll will look into that 👌
    Thanks.
  • 0
  • 2
    Interesting fact: Apple uses protobuf in their wifi based location api. And probably others
Add Comment