The state of gRPC in the browser

This is a guest post by Johan Brandhorst, Software Engineer at InfoSum.

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. However, with the release of gRPC-Web, gRPC is poised to become a valuable addition in the toolbox of frontend developers.

In this post, I’ll describe some of the history of gRPC in the browser, explore the state of the world today, and share some thoughts on the future.


gRPC Meets .NET SDK And Visual Studio: Automatic Codegen On Build

As part of Microsoft’s move towards its cross-platform .NET offering, they have greatly simplified the project file format, and allowed a tight integration of third-party code generators with .NET projects. We are listening, and now proud to introduce integrated compilation of Protocol Buffer and gRPC service .proto files in .NET C# projects starting with the version 1.17 of the Grpc.Tools NuGet package, now available from Nuget.org.

You no longer need to use hand-written scripts to generate code from .proto files: The .NET build magic handles this for you. The integrated tools locate the proto compiler and gRPC plugin, standard Protocol Buffer imports, and track dependencies before invoking the code generators, so that the generated C# source files are never out of date, at the same time keeping regeneration to the minimum required. In essence, .proto files are treated as first-class sources in a .NET C# project.


Visualizing gRPC Language Stacks

Here is a high level overview of the gRPC Stacks. Each of the 10 default languages supported by gRPC has multiple layers, allowing you to customize what pieces you want in your application.


gRPC-Web is Generally Available

We are excited to announce the GA release of gRPC-Web, a JavaScript client library that enables web apps to communicate directly with gRPC backend services, without requiring an HTTP server to act as an intermediary. “GA” means that gRPC-Web is now Generally Available and stable and qualified for production use.


A short introduction to Channelz

Channelz is a tool that provides comprehensive runtime info about connections at different levels in gRPC. It is designed to help debug live programs, which may be suffering from network, performance, configuration issues, etc. The gRFC provides a detailed explanation of channelz design and is the canonical reference for all channelz implementations across languages. The purpose of this blog is to familiarize readers with channelz service and how to use it for debugging issues. The context of this post is set in gRPC-Go, but the overall idea should be applicable across languages. At the time of writing, channelz is available for gRPC-Go and gRPC-Java. Support for C++ and wrapped languages is coming soon.