I have been processing Google's API design guide and an unexpected part of the work has been learning more about gRPC, which Google is "converging designs of socket-based RPC APIs with HTTP-based REST APIs." This is something I have not seen in an API design guide until now.
"gRPC uses protocol buffers as the Interface Definition Language (IDL) for describing both the service interface and the structure of the payload messages" and is something I'm hearing more chatter about from larger providers, which I think represents the evolving world of API design beyond the old REST days.
"gRPC is used in the last mile of computing in mobile and web client since it can generate libraries for iOS and Android and uses standards-based HTTP/2 as transport allowing it to easily traverse proxies and firewalls. There is also work underway to develop a JS library for use in browsers. Beyond that, it is ideal as a microservices interconnect, not just because the core protocol is very efficient but also because the framework has pluggable authentication, load balancing, etc. Google itself is also transitioning to use it to connect microservices."
To help me learn anything, I need an example to reverse-engineer, showing me how things work — so here are the examples they provide from the site:
I'm going to add a research area for gRPC, similar to hypermedia, as well as GraphQL. It helps me better keep track of the news about each approach to crafting APIs, and is a single place I can go to reference service providers and working examples. I've had gRPC and Protocol Buffers on my monitoring list for some time now, but seeing Google invest so heavily in this area gives me a signal that I should be paying attention to gRPC more, and gathering more examples that I can share with my readers.
I'm thinking that I will assemble some sort of toolbox area in my API design research, helping folks understand when a more RESTful approach makes sense, as well as when hypermedia, GraphQL, or maybe a gRPC approach might be more appropriate. Next, I'm going to dive into BigTable, PubSub, and Speech APIs to see gRPC in action — something I'm hoping that will help me better understand Google's approach to API design, which something I'm struggling with grasping completely.