Академический Документы
Профессиональный Документы
Культура Документы
gRPC java
Open Source RPC framework that makes it easy to build a heterogenous distributed system.
HTTP/1.1 HTTP/2
Protocol Buffers
message SubscribeRequest {
IDL (Interface definition language) string topic = 1;
}
Describe once and generate interfaces
for any language. message Event {
string details = 1;
Data Model }
● Install
○ apt-get install protobuf-compiler
○ pip install grpcio
● Write the protos
● Use protoc to generate service interfaces, messages & stubs
● Implement services in server
● Client instantiates stub
● Test & Deploy
Advanced Deployment...
● Auth & Security - TLS [Mutual], Plugin auth mechanism (e.g. OAuth)
● Proxies - nghttp2, haproxy, Google LB, Nginx (in progress)
● Client-side load balancing - etcd, Zookeeper, Eureka, …
● Monitor & Trace - Zipkin, Google, DIY
● Mobile - Reconnect, QUIC
● Web - REST Adapter, WHATWG Fetch
● API Evolution - Protobuf, Versioning
ARCHITECTURE
Architecture: Native Implementation in Language
gRPC Core
Planned in:
Application Layer C/C++, Java, Go
Http 2.0
Framework Layer
SSL
Transport Layer
Architecture: Derived Stack
Obj-C, C#,
Python Ruby PHP Language Bindings
C++,...
Application Layer
Generic Low Level API in C
Http 2.0
Transport Layer
SSL
Wire Architecture
Auth Implementation
and across
API languages
Http 2.0
SSL
Metadata and Auth
servers
name
client nameserver
addresses, ...
gRPC: LoadBalancing
servers
Control RPC LB
client
address-list Controller
ROADMAP..sorta !
Roadmap: Timeline
Twitter: @grpcio
Site: grpc.io
Group: grpc-io@googlegroups.com