Interface Definition Language (IDL)
Message interchange format
Define service once => generate servers, clients
The complexity of communication between different languages and environments is handled by gRPC
+ All Protocol Buffers Advantages
+ All HTTP 2.0 Advantages
Deadlines/Timeouts
Bi-Directional Streaming
gRPC | REST | |
---|---|---|
Serialization Format | Protocol Buffers | JSON |
Transfer Protocol |
HTTP 2.0 | HTTP 1.1 |
Streaming | Supported | Not Supported |
Type | Strongly | Weakly |
service ServiceName {
rpc procedureName (commaSeparatedParameters) returns (returnType) {}
}
Implements the methods declared by the service and runs a gRPC server to handle client calls.
Has a local object known as "stub" that implements the same methods as the service.
The client can then just call those methods on the local object.