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

A day in a coffee shop: Building event-driven systems with structure

A day in a coffee shop: Building event-driven systems with structure

Red Hat Webinars, Jul 29th 2021

https://www.redhat.com/en/events/webinar/a-day-in-a-coffee-shop-building-event-driven-systems-with-structure

Follow me on twitter (@systemcraftsman) or subscribe to https://www.systemcraftsman.com/join/ to get any updates from me.

E3afc47cd48ab5a032c7e2078c0d3ce7?s=128

Aykut Bulgu

July 29, 2021
Tweet

Transcript

  1. Building event-driven systems with structure A day in a coffee

    shop Aykut Bulgu Services Content Architect 1
  2. Me as Code 2 #oc apply -f aykutbulgu.yaml apiVersion: redhat/v3.2

    kind: Services Content Architect metadata: name: Aykut Bulgu namespace: Red Hat Global Learning Services annotations: twitter: @systemcraftsman email: - aykut@systemcraftsman.com - abulgu@redhat.com organizer: Software Craftsmanship Turkey founder: System Craftsman labels: married: yes children: 1 interests: - tech (mostly kafka) - aikido - gamification - stoicism spec: replicas: 1 containers: - image: aykut:latest
  3. Agenda 3 • HTTP-request based architecture and its drawbacks. •

    Event-driven Architecture with Red Hat AMQ streams and how it solves problems by reducing the coupling between services. • Schema types like JSON, protobuf, Avro. • Contract-based, event-driven architecture with Red Hat Service Registry and its capabilities.
  4. 4 The “Kaffe” Shop

  5. The Coffee Shop 5

  6. The Coffee Shop 6

  7. 8 Truth behind the baristas Kaffe shop rule: Prepare in

    1.5 seconds or not Barista capacity: 0-5 seconds preparation time
  8. How the coffee shop works 9

  9. 10 Request-Driven Architecture

  10. Request-Driven Architecture 11

  11. Request-Driven Architecture 12 Latency Availability Performance No fault tolerance Tightly

    coupled
  12. Request-Driven Architecture 13

  13. Who you are gonna call? Who you are gonna call?

    14
  14. Mysterious man comes 15

  15. Mr. Kafka 16

  16. Mr. Kafka has a solution 17

  17. 18 Event-Driven Architecture and Messaging

  18. Event-Driven Architecture and Messaging 19

  19. Event-Driven Architecture and Messaging 20

  20. Event-Driven Architecture and Messaging 21

  21. 22 Apache Kafka with AMQ Streams

  22. Apache Kafka Apache Kafka with AMQ Streams 23 Kafka Topic

    Producer Consumer 1 2 3 1 2 3 Time-based message retention model by default Messages are retained according to topic config (time or capacity) Also “compacted topic” – like a “last-value topic” “Dumb broker, smart client” Client maintains position in message stream Message stream can be replayed Throughput up to 1 million mes./sec.
  23. Apache Kafka with AMQ Streams 24 AMQ Streams on RHEL

    AMQ Streams on OpenShift OpenShift Streams Apache Kafka with AMQ Streams
  24. Apache Kafka with AMQ Streams 25 Cluster Operator Kafka CR

    Kafka Zookeeper Deploys & manages cluster Topic Operator User Operator Topic CR User CR Manages topics & users
  25. Everybody is happy with the changes 29

  26. 30 Marshmallow Problem

  27. Marshmallow Problem 31

  28. Marshmallow Problem 32

  29. Marshmallow Problem 33

  30. Marshmallow Problem 34

  31. Marshmallow Problem 35

  32. Marshmallow Problem 36

  33. Marshmallow Problem 37

  34. Marshmallow Problem 38

  35. Marshmallow Problem 39

  36. The Contract 42

  37. The Contract 43

  38. 44 Schemas as the Contract

  39. Schemas as the Contract 45 • JSON Schema • Google

    Protocol Buffer • Apache Avro
  40. Schemas as the Contract 46

  41. Schemas as the Contract 47

  42. 48 Red Hat Service Registry

  43. Red Hat Service Registry 49 • Based on the upstream

    Apicurio project. • Handles following data formats: ◦ Apache Avro ◦ JSON Schema ◦ Protobuf (protocol buffers) • Storage options ◦ Kafka ◦ PostgreSQL
  44. Red Hat Service Registry 50 Schema management with service registry

    Producer Consumer Deserializer Serializer Service Registry | | | | | | | | | | | | | | | | | | | | | Apache Kafka Get or Register Schema by Id Retrieve Schema by Id Topic B (JSON) Topic C (Protobuf) Topic A (Avro) Send Serialized Data Retrieve Serialized Data
  45. Schema contract on the wall 51

  46. Schema contract on the wall 52

  47. CONFIDENTIAL Designator Resources 55 https://github.com/RedHatTraining/AD482-ToT-CoffeeShop

  48. CONFIDENTIAL Designator Developing Event-Driven Applications with Apache Kafka and Red

    Hat AMQ Streams (AD482) Designing and developing event-driven applications using Kafka and Red Hat AMQ Streams. New course 56 LEARN MORE This course will be available next month, but the hands-on labs are available now in the Red Hat Learning Subscription. You can access the Early Access content by logging into your account and clicking the “Early Access” button in the top menu bar. If you’re not a subscriber, learn more about the Red Hat Learning Subscription.
  49. linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHat 57 Red Hat is the world’s

    leading provider of enterprise open source software solutions. Award-winning support, training, and consulting services make Red Hat a trusted adviser to the Fortune 500. Thank you