Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Protobuf & GRPC

Protobuf & GRPC

Avatar for Sinan Ülker

Sinan Ülker

May 18, 2019
Tweet

More Decks by Sinan Ülker

Other Decks in Technology

Transcript

  1. What is Protocol Buffers? • Data serialization mechanism • Like

    JSON or XML but smaller and faster • Strongly Typed Variables • Java, Python, Objective-C, Dart, Go, Ruby, and C# • Column index ◦ 1-15 → 1 byte ◦ 16 - 2047 → 2 byte ◦ 19000 - 19999 rezerve
  2. Good for? • Fast communication • Structured Message Definitions •

    Backward Compatibility ◦ Can Add/Remove fields
  3. A Silver Bullet? • Not human-readable and human-editable • Not

    recommended for larger datasets • Only meaningful with the proto file
  4. GRPC • gRPC is a modern open source high performance

    RPC framework that can run in any environment. • Binary Serialization • HTTP/2 • Using Protobuf 3
  5. Supported RPC Types • Unary RPC ◦ the client sends

    a single request and gets back a single response. • Server streaming RPC ◦ the server sends back a stream of responses after getting the client’s request message. • Client streaming RPC ◦ the client sends a stream of requests to the server instead of a single request. • Bidirectional streaming RPC ◦ the client and server can read and write in any order.
  6. Q/A