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

Einführung in gRPC: Das moderne Toolkit für Microservices-Kommunikation

Einführung in gRPC: Das moderne Toolkit für Microservices-Kommunikation

gRPC ist ein modernes, leistungsstarkes Open Source RPC (Remote Procedure Call) Framework, das auf jeder Plattform eingesetzt werden kann. Es verbindet effizient Services in und zwischen Rechenzentren und bietet Erweiterungen für Load Balancing, Tracing, Health Checking und Authentifizierung. Diese Session ist eine Einführung in gRPC, die Ihnen die Werkzeuge an die Hand gibt, um Ihre Anwendungen mit gRPC für die Zukunft bereit zu machen. Sie erfahren, wie gRPC funktioniert, wozu es in der Lage ist, und lernen, wie es in Produktionssystemen eingesetzt werden kann.

Thomas Bandixen

September 25, 2019
Tweet

Other Decks in Technology

Transcript

  1. Einführung in gRPC
    Das moderne Toolkit für Microservices-Kommunikation

    View Slide

  2. Thomas Bandixen
    • Senior Consultant
    • Trivadis AG
    [email protected]

    View Slide

  3. Agenda
    • Initial situation
    • Introduction to gRPC
    • gRPC live in action
    • Why gRPC
    • Conclusion.

    View Slide

  4. Initial situation
    • Distributed systems
    • Polyglot services
    • Load balanced.
    Source: SecuriGate

    View Slide

  5. Initial situation
    • ~1’000 ACUs
    • 4 Communication Servers
    (load balanced)
    • A lot of traffic
    • High CPU usage.
    Source: SecuriGate

    View Slide

  6. View Slide

  7. Introduction to gRPC
    • Pronounced as “Jee-Arr-Pee-See”
    • Is a high performance, open source RPC framework
    • It helps in eliminating boilerplate code
    • It helps in connecting polyglot services.

    View Slide

  8. Introduction to gRPC

    View Slide

  9. Protocol Buffers
    • Structure the data in .proto files
    • Methods are structured as services
    • Protocol buffer data is structured
    as messages
    • “protoc” generates your code to:
    • Populating
    • Serializing
    • retrieving message types
    • Java, C++, Python, Objective-C,
    C#, Android Java, Ruby,
    JavaScript and Go.

    View Slide

  10. gRPC Concepts
    • gRPC has four kinds of service method
    • Unary RPC
    • Server streaming RPC
    • Client streaming RPC
    • Bidirectional streaming RPC.

    View Slide

  11. gRPC Concepts
    • Deadlines/Timeouts
    • RPC termination
    • Cancelling RPCs
    • Metadata
    • Channels.

    View Slide

  12. gRPC live in action
    Demo
    https://github.com/tbandixen/Basta-2019-gRPC-Demo

    View Slide

  13. Why gRPC
    REST
    • Since about 2000
    • Design concept
    • JSON (text)
    • HTTP 1.1
    gRPC
    • Since about 2015
    • Contract-based communication
    • Protobuf (binary)
    • HTTP/2

    View Slide

  14. Conclusion
    • Significantly lower traffic
    • CPU load strongly reduced.
    Source: SecuriGate

    View Slide

  15. Thank you for your attention
    and enjoy the Basta!
    Thomas Bandixen
    [email protected]

    View Slide