Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Google confidential │ Do not
distribute
Google confidential │ Do not
distribute
gRPC:
A multi-platform RPC system
Louis Ry...
Google confidential │ Do not
distribute
Microservices at Google
~O(1010
) RPCs per second.
Images by Connie
Zhou
Open source on Github for C, C++, Java, Node.js,
Python, Ruby, Go, C#, PHP, Objective-C
gRPC core
gRPC java
OVERVIEW
gRPC is ...
Open Source RPC framework that makes it easy to build a heterogenous distributed system.
● Free as in beer! (a...
● Core features and protocol are fully specified
● Rolled out for public Google APIs and widely used internally
○ Lots of ...
Multiple Languages
C/C++
HTTP/2HTTP/1.1
http://www.http2demo.io/
message SubscribeRequest {
string topic = 1;
}
message Event {
string details = 1;
}
service Topics {
rpc Subscribe(Subscr...
● Three complete stacks: C/C++, Java and Go.
● Other language implementations wrap C-Runtime libraries.
○ Hand-written wra...
USE CASES
Google confidential │ Do not
distribute
Use Cases
Client-server
communication
Access Google Cloud
Services
Build distribut...
HOW TO GET STARTED
● Install
○ apt-get install protobuf-compiler
○ pip install grpcio
● Write the protos
● Use protoc to generate service int...
● Auth & Security - TLS [Mutual], Plugin auth mechanism (e.g. OAuth)
● Proxies - nghttp2, haproxy, Google LB, Nginx (in pr...
ARCHITECTURE
gRPC Core
Http 2.0
SSL
Code Generated API
Planned in:
C/C++, Java, GoApplication Layer
Framework Layer
Transport Layer
Arc...
Generic Low Level API in C
Python
Code-Generated Language Idiomatic API
Obj-C, C#, C++,
...
Ruby PHPPython
gRPC Core in C
...
Wire Implementation across languages
gRPC Core
Http 2.0
SSL
Code Generated API
Auth Architecture and API
Credentials API
A...
● Generic mechanism for attaching metadata to requests and responses
● Built into the gRPC protocol - always available
● P...
ADVANCED FEATURES
gRPC: Naming
client nameserver
servers
name
addresses, ...
gRPC: LoadBalancing
client
LB
Controller
servers
Control RPC
address-list
ROADMAP..sorta !
Initial Alpha
Release
Beta
Release
Stability,
Easy
installation,
1.0 release
Q1 ‘16
Roadmap: Timeline
Q2 ‘15 Q3 ‘15,
Q4’15...
Thank you!
Thank you!
Twitter: @grpcio
Site: grpc.io
Group: grpc-io@googlegroups.com
Upcoming SlideShare
Loading in …5
×

gRPC Overview

4,689 views

Published on

An overview at gRPC: Talk at Slack

Published in: Technology

gRPC Overview

  1. 1. Google confidential │ Do not distribute Google confidential │ Do not distribute gRPC: A multi-platform RPC system Louis Ryan 26th February 2016
  2. 2. Google confidential │ Do not distribute Microservices at Google ~O(1010 ) RPCs per second. Images by Connie Zhou
  3. 3. Open source on Github for C, C++, Java, Node.js, Python, Ruby, Go, C#, PHP, Objective-C gRPC core gRPC java
  4. 4. OVERVIEW
  5. 5. gRPC is ... Open Source RPC framework that makes it easy to build a heterogenous distributed system. ● Free as in beer! (and licensing) ● Based on HTTP/2 today (multiplexed, works with the Internet) ● Payload agnostic (we’ve implemented proto) ● Streaming & Flow-Controlled ● Designed for harsh environments (timeout, lameducking, load-balancing, cancellation, …) ● Support in 10 languages & first class mobile support ● Layered & Pluggable - Bring your own monitoring, auth, naming, load balancing ...
  6. 6. ● Core features and protocol are fully specified ● Rolled out for public Google APIs and widely used internally ○ Lots of mobile adoption ● Approaching 1.0 (GA) release in all languages ○ Stable APIs for key features ● Benefit of layering on top of HTTP/2 standard ○ Interoperability with 3rd party proxies, tools, libraries.. ○ WHATWG Fetch Project Status
  7. 7. Multiple Languages C/C++
  8. 8. HTTP/2HTTP/1.1 http://www.http2demo.io/
  9. 9. message SubscribeRequest { string topic = 1; } message Event { string details = 1; } service Topics { rpc Subscribe(SubscribeRequest) returns (stream Event); } IDL (Interface definition language) Describe once and generate interfaces for any language. Data Model Structure of the request and response. Binary format for network transmission. Wire Format Protocol Buffers
  10. 10. ● Three complete stacks: C/C++, Java and Go. ● Other language implementations wrap C-Runtime libraries. ○ Hand-written wrappers to maintain language idioms ● Why wrap C? ○ Development costs & Implementation Consistency ○ Performance ○ Feature evolution ● Easy one line installation via packages e.g npm install grpc Implementation Details
  11. 11. USE CASES
  12. 12. Google confidential │ Do not distribute Use Cases Client-server communication Access Google Cloud Services Build distributed applications Images by Connie Zhou • In data-centers • In public/private cloud • Clients and servers across: • Mobile • Web • Cloud • Also • Embedded systems, IoT • From GCP • From Android and iOS devices • From everywhere else
  13. 13. HOW TO GET STARTED
  14. 14. ● 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 Typical development workflow
  15. 15. ● 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 Advanced Deployment...
  16. 16. ARCHITECTURE
  17. 17. gRPC Core Http 2.0 SSL Code Generated API Planned in: C/C++, Java, GoApplication Layer Framework Layer Transport Layer Architecture: Native Implementation in Language
  18. 18. Generic Low Level API in C Python Code-Generated Language Idiomatic API Obj-C, C#, C++, ... Ruby PHPPython gRPC Core in C Http 2.0 SSL Language Bindings Code Generated Ruby PHP Obj-C, C#, C++,... Application Layer Framework Layer Transport Layer Architecture: Derived Stack
  19. 19. Wire Implementation across languages gRPC Core Http 2.0 SSL Code Generated API Auth Architecture and API Credentials API Auth-Credentials Implementation AuthPluginAPI
  20. 20. ● Generic mechanism for attaching metadata to requests and responses ● Built into the gRPC protocol - always available ● Plugin API to attach “bearer tokens” to requests for Auth ○ OAuth2 access tokens ○ OIDC Id Tokens ● Session state for specific Auth mechanisms is encapsulated in an Auth- credentials object Metadata and Auth
  21. 21. ADVANCED FEATURES
  22. 22. gRPC: Naming client nameserver servers name addresses, ...
  23. 23. gRPC: LoadBalancing client LB Controller servers Control RPC address-list
  24. 24. ROADMAP..sorta !
  25. 25. Initial Alpha Release Beta Release Stability, Easy installation, 1.0 release Q1 ‘16 Roadmap: Timeline Q2 ‘15 Q3 ‘15, Q4’15 Q1 ‘15 Q2 ‘16 Q3 16 Additional Alpha Releases Load balancing, Naming, Performance Debugging and Tracing, Browser support
  26. 26. Thank you! Thank you! Twitter: @grpcio Site: grpc.io Group: grpc-io@googlegroups.com

×