Earlier quoted context omitted.
> This turned out to be caused by HTTP/2.0 which only allows 1 billion streams over a single connection. Hilarious. People called this issue out as an obvious flaw when HTTP/2.0 was first proposed, got ignored, and here the issue is. For those unfamiliar: HTTP/2.0 uses an unsigned 31-bit integer to identity individual streams over a connection. Server-initiated streams must use even identifiers. Client-initiated stre…
It was not ignored, it was very much made on purpose because of a certain popular programming language not having unsigned 32 bit variables...
gRPC: Internet-scale RPC framework is now 1.0
81–90 of 111 posts
Re: gRPC: Internet-scale RPC framework is now 1.0
#82Earlier quoted context omitted.
Could you expound upon the problem of keeping your protocol definitions in sync? In my experience this is the strength of protocol buffers: if you follow a few rules, your systems can successfully be decoupled. Some of the rules are never re-using a tag number and never changing a type in an incompatible way (e.g. string->bytes might be ok, but int32->bytes is not).
Yeah! I think a few responses have covered this below, but I'll give you our spin (and why it's painful, compared to what people have offered up). Most of the projects that we're integrating gRPC into are existing codebases that have their own build tools that are (mostly) in isolation. JSON schemas have been agreed on beforehand, and there are separate client implementations in different languages that basically exi…
That said; If you've got a set of shared proto definitions, you should probably either go to a monorepo, or share the shared bits with a git submodule. Doesn't prevent you from needing to follow those conventions, but does make it far easier to debug when things changed.
[1] https://developers.google.com/protocol-buffers/docs/proto3#u...
Re: gRPC: Internet-scale RPC framework is now 1.0
#83Re: gRPC: Internet-scale RPC framework is now 1.0
#84Anyone here who tried out gRPC or is using it in production, and can share some experiences?
Re: gRPC: Internet-scale RPC framework is now 1.0
#85Can someone explain how is GRPC significantly better than WebSockets? I have used it for a few weeks and was very underwhelmed by it.
Re: gRPC: Internet-scale RPC framework is now 1.0
#86Something I've wondered for awhile: why would I want to design with gRPC rather than well-defined HTTP/JSON endpoints? Is it just a perf thing?
Significantly less overhead and the benefits of Protocol Buffers on top of that. If performance isn't a big deal, JSON-RPC over HTTP or something like it is fine. If it's critical, something like gRPC makes more sense.
Re: gRPC: Internet-scale RPC framework is now 1.0
#87Can someone explain how is GRPC significantly better than WebSockets? I have used it for a few weeks and was very underwhelmed by it.
What is your use case, and what issues did you find?
Re: gRPC: Internet-scale RPC framework is now 1.0
#88Something I've wondered for awhile: why would I want to design with gRPC rather than well-defined HTTP/JSON endpoints? Is it just a perf thing?
Performance. gRPC is basically the most recent version of stubby, and at the kind of scale we use stubby, it achieves shockingly good rpc performance - call latency is orders of magnitude better than any form of http-rpc. This transforms the way you build applications, because you stop caring about the costs of rpcs, and start wanting to split your application into pieces separated by rpc boundaries so that you can run lots of copies of each piece.
I cannot sufficiently explain how critical this is to the way we build applications that scale.
Re: gRPC: Internet-scale RPC framework is now 1.0
#89Anyone here who tried out gRPC or is using it in production, and can share some experiences?
I've used it. It's easy to use and very capable. My favourite feature is that it supports streaming objects, in both directions. In other words you can do an RPC call where the input and/or output is an asynchronous stream of objects. Every RPC system needs this, or you end up with hacks like HTTP long polling. My least favourite feature is that it is tied to HTTP2. I'm not sure what you're supposed to do if you are…
The tying to HTTP/2 and especially the way it is done is also not my cup of tea. E.g. if it wouldn't have chosen to use HTTP trailers (which are mostly unsupported) it could be implemented with a lot more HTTP libraries. It's also sad that it doesn't run in current browsers because of the lack of trailer support as well as streaming responses there. With putting a little bit more thoughts in it (maybe choosing multiple content types/body encodings) this could have been supported - at least for normal request/response communication without streaming.
Regarding microcontrollers: It should be possible to implement HTTP/2 and gRPC also on microcontrollers, but imho it will neither be easy nor necessarily a good choice. Implementing HTTP/2 with multiplexing will need quite a lot of RAM on a constrained device, especially with the default values for flow control windows and header compression. You can lower these through SETTINGS frames, but that might kill interoperability with HTTP/2 libraries that don't expect remotes to lower the settings or to reset connections while settings have not been fully negotiated.
Re: gRPC: Internet-scale RPC framework is now 1.0
#90I'll try to jump on the plane, and announce that latest GoReplay version now supports Thrift and ProtocolBuffers. So if you are looking to load testing (or integration testing) for gRPC based apps check https://goreplay.org