GRPC

{{Short description|Software concept}}

{{lowercase title}}

{{Infobox software

| name = gRPC

| title = gRPC

| developer = Google

| latest_release_version = 1.70.1{{cite web|url=https://github.com/grpc/grpc/releases|title=gRPC releases|website=GitHub |accessdate=2025-02-15}}

| latest release date = {{Start date and age|2025|02|01}}

| released = {{Start date and age|2016|08}}

| programming language = Android Java, C#, C++, Dart, Go, Java, Kotlin/JVM, Node.js, Objective-C, PHP, Python, Ruby

| genre = Remote procedure call framework

| license = Apache License 2.0

| website = {{URL|https://grpc.io/}}

}}

gRPC (acronym for gRPC Remote Procedure Calls{{Cite web|url=https://grpc.io/docs/what-is-grpc/faq/|title=FAQ|website=gRPC}}) is a cross-platform high-performance remote procedure call (RPC) framework. gRPC was initially created by Google, but is open source and is used in many organizations. Use cases range from microservices to the "last mile" of computing (mobile, web, and Internet of Things). gRPC uses HTTP/2 for transport, Protocol Buffers as the interface description language, and provides features such as authentication, bidirectional streaming and flow control, blocking or nonblocking bindings, and cancellation and timeouts. It generates cross-platform client and server bindings for many languages. The most common usage scenarios include connecting services in a microservices style architecture, or connecting mobile device clients to backend services.{{Cite web|title=About gRPC|url=https://grpc.io/about/|access-date=2021-05-25|website=gRPC|language=en}}

As of 2019, gRPC's use of HTTP/2 makes it impossible to implement a gRPC client in a browser, instead requiring a proxy.{{cite web |title=The state of gRPC in the browser |url=https://grpc.io/blog/state-of-grpc-web/ |website=gRPC |date=8 January 2019 |language=en-us}}

History

From about 2001, Google created a general-purpose RPC infrastructure called Stubby to connect the large number of microservices running within and across its data centers.{{Cite web |date=24 August 2016 |title=gRPC: a true internet-scale RPC framework is now 1.0 and ready for production deployments |url=https://cloud.google.com/blog/products/gcp/grpc-a-true-internet-scale-rpc-framework-is-now-1-and-ready-for-production-deployments |access-date=2023-04-03}} In March 2015, Google decided to build the next version of Stubby and make it open source. The result was gRPC.

Authentication

gRPC supports the usage of Transport Layer Security (TLS) and token-based authentication. Connection to Google services must use TLS. There are two types of credentials: channel credentials and call credentials.

For token-based authorization, gRPC provides Server Interceptor{{Cite web|url=https://thecodedata.com/grpc-interceptors-with-java/|archive-url=https://web.archive.org/web/20230307123143/https://thecodedata.com/grpc-interceptors-with-java/|url-status=usurped|archive-date=March 7, 2023|title=gRPC Server Interceptor|date=27 February 2023 }} and a Client Interceptor.{{Cite web|url=https://grpc.io/docs/guides/auth/|title=gRPC|website=grpc.io|access-date=2020-02-24}}

Encoding

{{Main|Protocol Buffers}}

gRPC uses Protocol Buffers to encode data. Protocol buffers provide a serialization format and an Interface Definition Language.{{Cite web|url=https://docs.microsoft.com/en-us/aspnet/core/grpc/comparison|title=Compare gRPC services with HTTP APIs|last=JamesNK|website=docs.microsoft.com|language=en-us|access-date=2020-02-24}}

Testing

Some of the software tools used for testing gRPC implementations include Postman, ezy,{{cite web |title=ezy on GitHub |website=GitHub |url=https://github.com/getezy/ezy}} Insomnia, and Step CI.{{cite web |title=Step CI Documentation |url=https://docs.stepci.com/guides/testing-grpc.html}}

Adoption

Many organizations use gRPC, including Uber,{{cite web |title=gRPC at Uber |date=19 May 2021 |url=https://eng.uber.com/architecture-api-gateway/}} Square, Netflix, IBM, CoreOS, Docker, CockroachDB, Arista Networks, Cisco, Juniper Networks,{{Cite web|url=https://grpc.io/faq/#who-s-using-this-and-why|title=gRPC|website=grpc.io|access-date=2020-02-24}} Spotify,{{Cite web|url=https://www.jfokus.se/jfokus19-preso/Adopting-gRPC-at-Spotify.pdf|title=gRPC at Spotify|website=jfokus.se|access-date=2020-05-12}} Zalando,{{Cite web|url=https://opensource.zalando.com/tech-radar/|title=Zalando Tech Radar|website=opensource.zalando.com|access-date=2021-04-08}} Dropbox,{{Cite web

|url=https://dropbox.tech/infrastructure/how-we-migrated-dropbox-from-nginx-to-envoy

|title=How we migrated Dropbox from Nginx to Envoy

|website=Dropbox.Tech|access-date=2020-10-30}} and Google as the original developer.

The open source project u-bmc uses gRPC to replace Intelligent Platform Management Interface (IPMI).{{cite web |title=u-bmc |url=https://github.com/u-root/u-bmc |website=GitHub.com|date=5 October 2022 }} On 8 January 2019, Dropbox announced that the next version of "Courier", their RPC framework at the core of their service-oriented architecture (SOA), would be migrated to be based on gRPC, primarily because it aligned well with their existing custom RPC frameworks.{{cite web |title=Courier: Dropbox migration to gRPC |url=https://blogs.dropbox.com/tech/2019/01/courier-dropbox-migration-to-grpc/ |author=Nigmatullin, Ruslan |author2=Ivanov, Alexey |date=2019-01-08 |access-date=2019-01-09}}

Alternatives

See also

{{Portal|Free and open-source software}}

References

{{Reflist}}