gRPC-Web vs the gRPC-Gateway

Ever since I first started using gRPC in 2016, I’ve been interested in learning how to use it well with browser clients. It’s a common question to ask once you’ve decided that you are going to use gRPC for service-to-service and mobile app communication. Here’s this great technology that abstracts away the problems I was having when making RPC calls between my services. How do I use it for my front-end applications?...

October 24, 2021 · 5 min

The state of gRPC in the browser

gRPC 1.0 was released in August 2016 and has since grown to become one of the premier technical solutions for application communications. It has been adopted by startups, enterprise companies, and open source projects worldwide. Its support for polyglot environments, focus on performance, type safety, and developer productivity has transformed the way developers design their architectures. So far the benefits have largely only been available to mobile app and backend developers, whilst frontend developers have had to continue to rely on JSON REST interfaces as their primary means of information exchange....

January 8, 2019 · 6 min

Client side streaming in gRPC-Web

In a previous post I introduced my open source project to bring GopherJS bindings to Improbable’s gRPC-Web client. I’m happy to say that the initial goal of supporting all features of the gRPC-Web client has been completed. I was initially going to leave it at that and wait for client side streaming to land in the WHATWG Streams API Standard, and subsequently added to the official grpc-web spec and probably the gRPC-Web client, but then I was sitting at the GolangUK conference and I had a brain wave....

September 17, 2017 · 3 min

gRPC-Web with GopherJS

In a previous blog series I’ve talked about how to work with a gRPC backend from the GopherJS world. It relies on the gRPC-gateway which is a great piece of tech, but unfortunately carries a couple of downsides: Clients don’t know what types are used - the interface is HTTP JSON. This can be somewhat mitigated with the use of swagger generated interfaces, but it’s still not perfect. The interface being JSON means marshalling and unmarshalling can become a significant part of the latency between the client and the server....

June 20, 2017 · 4 min