gRPC - Ovesome RPC for microservices - Deadline and Streaming
Recently I'm viewing good explanation of gRPC from Alex Borysov:
Enabling Googley microservices with gRPC" at JEEConf 2017
I'm very liked using Deadlines Propagation mechanism instead of Static Timeouts.
The idea is:
- Each service accepts 'Deadline' parameter in request
- Service calc a time of his spent time and network round-trips
- Service provide decreased 'Deadline' to downstream services in Requests
- Service can observe and cancel his operation when deadline occurs, which effectively free his resources and all call-chain
In other aspects gRPC have same features as like WCF in .Net - Bi-Drections, binary, Streaming and Events, excitability.
Interesting part - gRPC based on HTTP2. Other libraries (like WFC and most of others) have its own custom implementations based on Sockets via TCP or UDP, but using HTTP2 make gRPC more stable (all concerns moved to HTTP2), better traceable while still providing same features.
Obviously, gRPC use Protobuffer for serialization, and generate all Stabs for 10+ languages.

Comments
Post a Comment