Upgrade to Pro — share decks privately, control downloads, hide ads and more …

gRPC

 gRPC

Regular Procedure Call
RPC ?
What is gRPC ?
✔ Open source RPC framework
✔ Bandwidth & CPU efficient
✔ Low latency
✔ Way to create massively distributed systems
gRPC C Core & Wrapped Language Stack
Role of C Core?
✔ Full HTTP/2 implementation with
authentication
✔ Manages interactions with system
✔ Provides interface to wrapped-language stack
Why gRPC ?
Streaming
✔ Server-side streaming
✔ Client-side streaming
✔ Bidirectional streaming
Remote Procedure Calls
✔ RPC setup is easy
✔ All the classes related for request & response are provided
✔ Using a client = calling a function in the code
Architecture

https://www.adroitlogic.com
https://developer.adroitlogic.com

AdroitLogic

October 15, 2017
Tweet

More Decks by AdroitLogic

Other Decks in Programming

Transcript

  1. Regular Procedure Call class GreeterService { String SayHello(String txt); }

    class GreeterClient { var greeter = new GreeterService(); greeter.SayHello(“World”); }
  2. RPC ? RPC Wikipedia definition RPC is a protocol that

    one program can use to request a service from a program located in another computer in a network without having to understand network details
  3. Basic RPC MACHINE2 / SERVER class GreeterService { String SayHello(String

    txt); } MACHINE1 / CLIENT class GreeterClient { }
  4. Questions ! 1. How does a client call a service

    on a remote machine ? 2. How do you expose a service on a remote machine for consumption ? 3. How data is serialized & deserialized over the wire ? 4. What is the nature of the call ? 5. Authentication
  5. Choices 1. Build your own custom RPC framework 2. Use

    gRPC : A high performance, open- source universal RPC framework
  6. What is gRPC ? ✔ Open source RPC framework ✔

    Bandwidth & CPU efficient ✔ Low latency ✔ Way to create massively distributed systems
  7. Role of C Core? ✔ Full HTTP/2 implementation with authentication

    ✔ Manages interactions with system ✔ Provides interface to wrapped-language stack
  8. Why gRPC ? Remote Procedure Calls ✔ RPC setup is

    easy All the classes related for request & response are provided ✔ Using a client = calling a function in the code ✔
  9. Getting Started… 1. Define a service in a .proto file

    using Protocol Buffers IDL 2. Generate server and client stub code using the protocol buffer compiler 3. Extend the generated server class & fill the logic