|
|
|
|
|
by lotw_dot_site
1416 days ago
|
|
No demo. I was wondering what kinds of things I could be doing here that I couldn't do before (with websockets, webrtc, etc) but demo.connect.build just redirects to connect.build. I'd only known of "Protocol Buffers" as something that was internal to Google, but never knew exactly to what end. |
|
Protocol Buffers are just a schema language. They're spiritually akin to OpenAPI, Thrift, Avro, and a bunch of other contract-type things. They're _also_ a binary serialization format that's usually faster and more compact than JSON. The intention is to use Protocol Buffers as a language-independent way of describing data bags and network APIs, and then use that schema/contract to generate code in the language you actually work in.
It's not that you _can't_ do that with websockets, webrtc, or just RESTful HTTP/1.1 - it's that you shouldn't _need_ to. The hand-written code to define the same data bag classes/interfaces/structs/etc in multiple languages, then wire them up to the same HTTP boilerplate isn't difficult or interesting, it's just toil. For all the times you're just calling an API, Protobuf lets you get on with the interesting work and skip the boilerplate. Ideally, things work well even if you're writing client code in a language that the server team doesn't have any expertise in.
If you're doing something unusual and need webrtc/websockets/etc, go for it!