gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. It enables client and server applications to communicate transparently and makes it easier to build connected systems. Remote Procedure Calls (RPCs) provide a useful abstraction for building distributed applications and services. The libraries in this repository provide a concrete implementation of the gRPC protocol, layered over HTTP/2. These libraries enable communication between clients and servers using any combination of the supported languages.
By default, it uses Protocol Buffers as the Interface Definition Language (IDL) for describing both the service interface and the structure of the payload messages. It is possible to use other alternatives if desired.
Starting from an interface definition in a .proto file, gRPC provides Protocol Compiler plugins that generate Client- and Server-side APIs. gRPC users typically fall into these APIs on the client-side and implement the corresponding API on the server-side.
Synchronous vs. asynchronous
Synchronous RPC calls, that block until a response arrives from the server, are the closest approximation to the abstraction of a procedure call that RPC aspires to.
On the other hand, networks are inherently asynchronous and in many scenarios, it is desirable to have the ability to start RPCs without blocking the current thread.
The gRPC programming surface in most languages comes in both synchronous and asynchronous flavors.
grpc v1.31.0 has been released.
The following new xDS functionality is added in this release:
- Requests matching based on path (prefix, full path and safe regex) and headers.
- Requests routing to multiple clusters based on weights.
- The features supported in a given release are documented here.
- Remove MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL to ensure timely processing of events. (#23535)
- Include the target name in top-level DNS error messages. (#23493)
- Remove xds-experimental URI scheme. (#23463)
- fix memory leak of grpc_resource_user_quota. (#22201)
- Store ref to the ExternalConnectivityWatcher in external_watchers_ map. (#23418)
- Update grpclb configuration with field “service_name”. (#22345)
- Fix possible deadlock in RemoveExternalConnectivityWatcher. (#23365)
- Enable TLS 1.3 in the C-core and all wrapped languages. (#23165)
- Add message-size check before message decompression with ordering change. (#23293)
- Fix race condition caused by simultaneous updates on SSL server handshaker. (#22647)
- Add missing reset for ping clocks to avoid mistakenly sending GOAWAY frames due to ‘too_many_pings’. (#23145)
- Simplify makefile: Get rid of “install” rules with pure make, recommend cmake and bazel instead. (#23412)
- Replaced grpc::string with std::string. (#23350)
- Fix wrong version in gRPCConfigVersion.cmake and grpc++*.pc. (#22982)
- Avoid collisions in cs files generated by Grpc.Tools. (#22869)
- Add Grpc.Auth support for Google.Apis.Auth.ITokenAccessWithHeaders. (#21616)
- Objc support PB runtime import override. (#23298)
- [Aio] Support tuple and aio.Metadata interaction. (#23556)
- [Aio] Allows poller to bind to ephemeral loops in multiple threads. (#23377)
- [Aio] Hide init_grpc_aio and guard async API outside of AsyncIO context. (#23280)
- [Aio] Implement methods to access auth context and peer info. (#23265)
- Add protobuf as an “extras” dependency to grpcio package. (#23170)
- [Aio] Use Metadata type. (#23045)
- Avoid attribute error in del of _ChannelCallState. (#23176)
- Default wait_for_ready to True in simple stubs. (#23163)
- Propagate contextvars to auxiliary threads. (#23107)
- Simplify channel credentials in simple stubs. (#23153)
- Fix ruby protoc plugin when message is in another package. (#23501)
- Fix ruby 2.7 keyword arguments deprecation. (#23419)
- Make sure call creds user callbacks can’t kill the ruby call credentials thread. (#23333)
- Fix auth plugin context use-after-free in ruby. (#19756)
- Add verbose logs for details around ruby call creds user callback invocation. (#23327)