Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Learning About gRPC APIs From Google

DZone's Guide to

Learning About gRPC APIs From Google

gRPC 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.

· Integration Zone ·
Free Resource

The State of API Integration 2018: Get Cloud Elements’ report for the most comprehensive breakdown of the API integration industry’s past, present, and future.

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.

According to the site:

 "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.

Your API is not enough. Learn why (and how) leading SaaS providers are turning their products into platforms with API integration in the ebook, Build Platforms, Not Products from Cloud Elements.

Topics:
integration ,api ,grpc ,google

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}