1 of 21

<YOUR NAME>

<YOUR TITLE>

2 of 21

Moving to Microservices

getUserInfo()

getDirections()

renderMap()

analytics()

https://pixabay.com/en/laptop-computer-open-screen-blank-310098/

3 of 21

Moving to Microservices

getUserInfo()

Server

getDirections()

Server

Stub

renderMap()

Stub

analytics()

Server

Stub

4 of 21

Challenges

with Microservices

  • ..and more
  • Debugging
  • Monitoring
  • Streaming Data
  • Language Interoperability
  • Security / Authentication
  • Data De/Serialisation
  • Network Communication Speed

5 of 21

Image: http://www.google.com/about/datacenters/gallery/#/tech/20

gRPC is the next generation of Stubby

6 of 21

7 of 21

Protocol Buffers

8 of 21

Protocol Buffers

IDL (Interface definition language)�Describe once and generate interfaces for any language.

Data Model�Structure of the request and response.

Wire Format�Binary format for network transmission.

syntax = proto3”;��message Person {

string name = 1;� int32 id = 2;� string email = 3;�� enum PhoneType {� MOBILE = 0;� HOME = 1;� WORK = 2;}�� message PhoneNumber {� string number = 1;PhoneType type = 2;}�� repeated PhoneNumber phone = 4;}

9 of 21

Service Definitions

service RouteGuide {� rpc GetFeature(Point) returns (Feature);� rpc RouteChat(stream RouteNote) returns (stream RouteNote);}

message Point {� int32 Latitude = 1; int32 Longitude = 2;}

message RouteNote {Point location = 1;� string message = 2;}

message Feature {� string name = 1;Point location = 2;}

10 of 21

Protocol Buffers

HTTP/2

11 of 21

HTTP/1.1

HTTP/2

HTTP/2

https://blog.golang.org/go-programming-language-turns-two_gophers.jpg

12 of 21

HTTP/2

HTTP/2

HTTP/1.x

  • Multiplexing
  • Bidirectional Streaming
  • HTTPS

Dominik Brygier - Essem - Traffic at Night

https://www.flickr.com/photos/80857060@N05/11341378133 (Cropped)�https://creativecommons.org/licenses/by/2.0/

13 of 21

HTTP/2

  • Multiplexing
  • Bidirectional Streaming
  • HTTPS

14 of 21

HTTP/2

  • Multiplexing
  • Bidirectional Streaming
  • HTTPS

15 of 21

Protocol Buffers

HTTP/2

Multiple Languages

16 of 21

C/C++

Java is a registered trademark of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

17 of 21

Multiple Language Support

Ruby Service

gRPC server

Go Service

gRPC server

gRPC Stub

Java Service

gRPC Stub

Python Service

gRPC server

gRPC Stub

Java is a registered trademark of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

18 of 21

Who is using gRPC

19 of 21

Want to learn more?

Documentation and Code

Help and Support

20 of 21

STOP!

21 of 21

Common Questions