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 full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  6. 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 full-size slide

  7. Introduction to gRPC

    View full-size slide

  8. 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 full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  12. 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 full-size slide

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

    View full-size slide

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

    View full-size slide