3 ms·
I've been having fun with connectrpc https://connectrpc.com/ https://connectrpc.com/ It fixes a lot of the problematic stuff with grpc and I'm excited for webt
by jon_richards 2y ago
I've been having fun with connectrpc https://connectrpc.com/ https://connectrpc.com/
It fixes a lot of the problematic stuff with grpc and I'm excited for webtransport to finally be accepted by safari so connectrpc can develop better streaming.
I initially thought https://buf.build https://buf.build was overkill, but the killer feature was being able to import 3rd party proto files without having to download them individually:
deps:
- buf.build/landeed/protopatch
- buf.build/googleapis/googleapis
The automatic SDK creation is also huge. I was going to grab a screenshot praising it auto-generating SDKs for ~9 languages, but it looks like they updated in the past day or two and now I count 16 languages, plus OpenAPI and some other new stuff.
Edit: I too was swayed by false promises of gRPC streaming. This document exactly mirrored my experiences https://connectrpc.com/docs/go/streaming/ https://connectrpc.com/docs/go/streaming/
- thayne 2y agoIt still uses protocol buffers though, which is where many of the problems I have with gRPC comes from
- jon_richards 2y agoThe auto-generated SDKs are very useful here. An API customer doesn't have to learn protobuf or install any tooling. Plus they can fall back to JSON without any fuss. Connectrpc is much better at that than my envoy transcoder was. If you're thinking from the API author's point of view, I might agree with you if there was a ubiquitous JSON annotation standard for marking optional/nullable values, but I am sick of working with APIs that document endpoints with a single JSON example and I don't want to inflict that on anyone else.
- masterj 2y agoYou can also choose to use JSON instead. Works great with curl and browser dev tools.
- 9rx 2y agoIt doesn't use protocol buffers any more than gRPC does, which is to say it only uses them if you choose to use them. gRPC is payload agnostic by design. Use CSV if you'd rather. It's up to you.
- cyberax 2y ago> It fixes a lot of the problematic stuff with grpc and I'm excited for webtransport to finally be accepted by safari so connectrpc can develop better streaming. We developed a small WebSocket-based wrapper for ConnectRPC streaming, just to make it work with ReactNative. But it also allows us to use bidirectional streaming in the browser.
- jon_richards 2y agoAwesome! Could you share? I also use react native.
- cyberax 2y agohttps://gist.github.com/Cyberax/3956c935a7971627e2ce8e2df3fafb8e https://gist.github.com/Cyberax/3956c935a7971627e2ce8e2df3fa... I'll do a proper write-up in a couple of days.
- nazcan 2y agoIs there recent news on safari supporting webtransport?