News for hackers. Stuff that matters.
Re:Demystifying the protobuf wire format by jimbokun on Friday May 17, 2024 @10:18AM (#40390213)
Yes, I wonder if anyone uses Protobuf encoded payloads over plain old HTTP REST calls.
Re:Demystifying the protobuf wire format by dalyons on Friday May 17, 2024 @12:37PM (#40391694)
yes! Twirp - last two companies ive worked at have used it to great success. Protos over plain ol http, without all the weird bespoke network stuff of gRPC. We just use regular dns, loadbalancers, etc etc. It should be way more popular IMHO.
Re:Demystifying the protobuf wire format by rochacon on Friday May 17, 2024 @11:10AM (#40390761)
I've used Twitch's Twirp before and it does that. It is a great middleground between gRPC and plain-HTTP services. :)

https://github.com/twitchtv/twirp

Re:Demystifying the protobuf wire format by dalyons on Friday May 17, 2024 @12:39PM (#40391708)
Yes! its amazing, it really should be the default people reach for. Vast majority of people dont need or want the complexity of grpc, they just want protos.
Re:Demystifying the protobuf wire format by burutthrow1234 on Friday May 17, 2024 @12:46PM (#40391779)
Yeah protobuf is a good IDL and encoding. Unfortunately gRPC makes some choices that make sense for internal RPCs in a large engineering org, but it's not good for external clients IMO.
Re:Demystifying the protobuf wire format by fl0ki on Friday May 17, 2024 @12:04PM (#40391326)
> plain old HTTP REST calls

Please don't add to the confusion around the term REST. These days most people just mean they use the GET/POST/PUT/DELETE verbs specifically, which is just using the HTTP protocol itself, no REST about it.

https://htmx.org/essays/how-did-rest-come-to-mean-the-opposi...

Re:Demystifying the protobuf wire format by pjc50 on Friday May 17, 2024 @11:27AM (#40390946)
The one really annoying decision in GRPC's design is tying it to HTTP/2 without an official choice. It optimizes for complicated high-throughput and bidirectional cases, while making it slightly harder to use for simple one-at-a-time "client server unary" RPC calls.
Re:Demystifying the protobuf wire format by vouwfietsman on Friday May 17, 2024 @10:40AM (#40390465)
We do flatbuffers (super similar) over websockets/http rest. Works beautifully. gRPC is the culprit here.
Re:Demystifying the protobuf wire format by tonyarkles on Friday May 17, 2024 @11:43AM (#40391102)
Yeah we stream a bunch of telemetry and GPS/attitude data in protobufs over a websocket and it works beautifully.
Re:Demystifying the protobuf wire format by secondcoming on Friday May 17, 2024 @12:45PM (#40391767)
Google’s AdX was entirely protobuf, but now they offer json too.
Re:Demystifying the protobuf wire format by matzf on Friday May 17, 2024 @10:27AM (#40390319)
The Connect RPC protocol is pretty much that: https://connectrpc.com/docs/protocol
Re:Demystifying the protobuf wire format by dilyevsky on Friday May 17, 2024 @11:59AM (#40391277)
Re:Demystifying the protobuf wire format by neonsunset on Friday May 17, 2024 @12:35PM (#40391675)
I have experience doing so with .NET simply because writing RPC / Contract definition in a .proto file once and then having gRPC tooling generate all boilerplate associated with it is much better than dealing with existing OpenAPI generators - this one slots right into .csproj where you just add a package reference and a reference to .proto file and you are ready to go.
Re:Demystifying the protobuf wire format by timvdalen on Friday May 17, 2024 @10:35AM (#40390407)
We use it in a client-facing application to keep state of a complex configuration, primarily as a means of having a URL-safe way to encode that configuration. It works great, very happy with it.
Re:Demystifying the protobuf wire format by worldsayshi on Friday May 17, 2024 @11:23AM (#40390891)
Performance and the promise of seamless type safety?
Re:Demystifying the protobuf wire format by sbrother on Friday May 17, 2024 @12:54PM (#40391870)
I've done this in a lot of projects -- it works great. Protobuf is nice in a lot of ways and pretty simple, while gRPC is overkill (imo) for a simple web server that doesn't see tons of traffic.