SlideShare a Scribd company logo
1 of 69
Reacting to an
Event-Driven
world
Grace Jansen
IBM Developer Advocate @gracejansen27
Kate Stanley
IBM Software Engineer @ katestanley91
Let’s get some coffee…
© 2020 IBM Corporation
Barista Example:
© 2020 IBM Corporation
Coffee Shop
Barista
Coffee Lovers
HTTP
HTTP
https://github.com/cescoffier/quarkus-coffeeshop-demo
Event Driven Architecture
© 2020 IBM Corporation
S1
S3
S2
S4
Event-driven messaging backbone
Microservice
publishing
events
Microservice
consuming
events
Event-driven messaging backbone
http://ibm.biz/AdvantagesOfEDA
Barista Example:
© 2020 IBM Corporation
Coffee Shop
Coffee Shop
Barista
Barista
Board
Coffee Lovers
Coffee Lovers
HTTP
Orders,
Queue
HTTP
HTTP
https://github.com/cescoffier/quarkus-coffeeshop-demo
Event
Backbone
© 2020 IBM Corporation
Apache Kafka is an open source, distributed
streaming platform
Stream history Immutable data Highly available
Scalable
Scalable
consumption
© 2020 IBM Corporation
Q: Is your coffee shop non-blocking and
highly responsive?
© 2020 IBM Corporation
Q: Is your microservice system non-
blocking and highly responsive?
© 2020 IBM Corporation
Q: Is your microservice system non-
blocking and highly responsive?
A:Yes I’m using Kafka!
© 2020 IBM Corporation
Q: Is your microservice system non-
blocking and highly responsive?
A:Yes I’m using Kafka!
Reactive systems
© 2020 IBM Corporation
Reactive Manifesto
© 2020 IBM Corporation
Message-Driven
Reactive Manifesto
© 2020 IBM Corporation
Events
“A signal emitted by a component upon
reaching a given state.”
© 2020 IBM Corporation
A message can contain an encoded
event in its payload.
Messages
“An item of data sent to a specific location.”
© 2020 IBM Corporation
Apache Kafka is an open source, distributed
streaming platform
Publish and subscribe to streams of
records
Store records in durable way
Process streams of records as they
occur
Barista Example:
© 2020 IBM Corporation
Coffee Shop
Barista
Board
Coffee Lovers
Orders,
Queue
HTTP
https://github.com/cescoffier/quarkus-coffeeshop-demo
Event
Backbone
Barista Example:
© 2020 IBM Corporation
Coffee Shop
Barista
Board
Coffee Lovers
Orders,
Queue
HTTP
https://github.com/cescoffier/quarkus-coffeeshop-demo
Event
Backbone
Barista Example:
© 2020 IBM Corporation
Coffee Shop
Barista
Board
Coffee Lovers
Orders,
Queue
HTTP
https://github.com/cescoffier/quarkus-coffeeshop-demo
Event
Backbone
Elastic
Message-Driven
Reactive Manifesto
© 2020 IBM Corporation
Barista Example:
© 2020 IBM Corporation
Coffee Shop
Barista
Board
Coffee Lovers
Orders,
Queue
HTTP
https://github.com/cescoffier/quarkus-coffeeshop-demo
Event
Backbone
Barista Example:
© 2020 IBM Corporation
Coffee Shop
Barista
Board
Coffee Lovers
Orders,
Queue
HTTP
https://github.com/cescoffier/quarkus-coffeeshop-demo
Event
Backbone
Barista Example:
© 2020 IBM Corporation
Coffee Shop
Barista
Board
Coffee Lovers
Orders,
Queue
HTTP
https://github.com/cescoffier/quarkus-coffeeshop-demo
Event
Backbone
ResilientElastic
Message-Driven
Reactive Manifesto
© 2020 IBM Corporation
ResilientElastic
Responsive
Message-Driven
Reactive Manifesto
© 2020 IBM Corporation
ResilientElastic
Responsive
Message-Driven
Reactive Manifesto
© 2020 IBM Corporation
Building reactive
systems
© 2020 IBM Corporation
How do we make a highly responsive app?
Microservice 1
© 2020 IBM Corporation
Microservice 2
Microservice 3
How do we make a highly responsive app?
Microservice 1
© 2020 IBM Corporation
Microservice 2
Microservice 3
Reactive
Architecture
Patterns
Reactive Architecture design patterns
CQRS Circuit breaker Saga Back pressure
© 2020 IBM Corporation
APP
WRITE API
APP
READ API
APP
APPAPP
APP
APP
APP
APP
APP
How do we make a highly responsive app?
Microservice 1
© 2020 IBM Corporation
Microservice 2
Microservice 3
Futures
Reactive Streams
Libraries
Futures
Reactive Streams
Libraries
Futures
Reactive Streams
Libraries
Reactive
Programming
Reactive Programming
© 2020 IBM Corporation
A subset of asynchronous programming and a paradigm where the
availability of new information drives the logic forward rather than
having control flow driven by a thread-of-execution.
Reactive Programming Patterns
© 2020 IBM Corporation
Futures: a promise to hold the result of some operation once that operation completes
Reactive programming libraries: for composing asynchronous and event-based
programs. (e.g. RxJava, SmallRye Mutiny)
Reactive Streams: a programming concept for handling asynchronous data streams
in a non-blocking manner while providing backpressure to stream publishers
Configuring Kafka
for a reactive
system
© 2020 IBM Corporation
ResilientElastic
Responsive
Message-Driven
Resiliency in Kafka
© 2020 IBM Corporation
Resilient
© 2020 IBM Corporation
Resilient
© 2020 IBM Corporation
Resilient
© 2020 IBM Corporation
Resilient
Topic A
Partition 1
Broker 1
Topic A
Partition 1
Offline Leader
© 2020 IBM Corporation
Resilient producers
Delivery guarantees:
At most once
At least once
Configuration:
Acks
Retries
© 2020 IBM Corporation
Resilient consumers
© 2020 IBM Corporation
0 1 2 3 4 5
Offset
ResilientElastic
Responsive
Message-Driven
Scalability in Kafka
© 2020 IBM Corporation
Scalability in Kafka
© 2020 IBM Corporation
Elasticity in Consumers
© 2020 IBM Corporation
Consumer Groups
© 2020 IBM Corporation
Consumer groupA
Topic
0 1 2 3
0 1 2 3 4 5
Partition 0
Partition 1
Partition 2
0 1 2 3 4 5 6 7
Consumer
Consumer
Consumer
Consumer group B
Consumer
Consumer
Consumer Groups
© 2020 IBM Corporation
Consumer groupA
p0, offset 7
p1, offset 3
p2, offset 5
Topic
0 1 2 3
0 1 2 3 4 5
Partition 0
Partition 1
Partition 2
0 1 2 3 4 5 6 7
Consumer
Consumer
Consumer
Consumer group B
Consumer
Consumer
Consumer Groups
© 2020 IBM Corporation
Consumer groupA
p0, offset 7
p1, offset 3
p2, offset 5
Topic
0 1 2 3
0 1 2 3 4 5
Partition 0
Partition 1
Partition 2
0 1 2 3 4 5 6 7
Consumer
Consumer
Consumer
Consumer group B
p0, offset 7
p1, offset 3
p2, offset 5
Consumer
Consumer
Consumer Groups
© 2020 IBM Corporation
Consumer groupA
p0, offset 7
p1, offset 3
p2, offset 5
Topic
0 1 2 3
0 1 2 3 4 5
Partition 0
Partition 1
Partition 2
0 1 2 3 4 5 6 7
Consumer
Consumer
Consumer
Consumer
Consumer group B
p0, offset 7
p1, offset 3
p2, offset 5
Consumer
Consumer
Writing reactive
Kafka applications
© 2020 IBM Corporation
Reactive Frameworks for
Kafka
Alpakka Kafka Connector
MicroProfile Reactive Messaging
Vert.x Kafka Client
© 2020 IBM Corporation
Alpakka Kafka Connector API
© 2020 IBM Corporation
MicroProfile 3.3 Stack
© 2020 IBM Corporation
Reactive Streams
Operators 1.1
GraphQL
1.0
Standalone Projects
JSON-B 1.0JSON-P 1.1CDI 2.0
Config 1.4
Fault
Tolerance 2.1
JWT
Propagation
1.1
Health
Check 2.2
Metrics 2.3
OpenTracing
1.3
Open API 1.1
JAX-RS 2.1 Rest Client 1.4
Reactive
Messaging 1.0
Context
Propagation
1.0
Reactive
Streams
Not a MicroProfile spec
MicroProfile Reactive Messaging
Application’s beans contain methods annotated with @Incoming and @Outgoing annotations
The annotated methods are connected by named channels
A channel is a name indicating which source or destination of messages is used. Channels are opaque Strings.
@Incoming and @Outgoing annotations are matched up by channel names
© 2020 IBM Corporation
What is Eclipse Vert.x?
Polyglot Tool-kit
Based on Reactor pattern
Runs on the JVM
Non-blocking
Event-driven
Includes distributed event-bus
Code is single-threaded
© 2020 IBM Corporation
Vert.x Demo App
© 2020 IBM Corporation
Demo app
© 2020 IBM Corporation
https://github.com/ibm-messaging/kafka-java-vertx-starter
Vert.x app
produce
consume
Demo app
© 2020 IBM Corporation
Vert.x app
websocket
produce
consume
https://github.com/ibm-messaging/kafka-java-vertx-starter
© 2020 IBM Corporation
https://github.com/ibm-messaging/kafka-java-vertx-starter
© 2020 IBM Corporation
Apache Kafka Java Client
© 2020 IBM Corporation
Apache Kafka Java Client
© 2020 IBM Corporation
Apache Kafka Java Client
© 2020 IBM Corporation
Vert.x Client
© 2020 IBM Corporation
© 2020 IBM Corporation ibm.biz/ExperiencesWritingAReactiveKafkaApp
Summary
Non-reactive + Kafka != reactive
Consider Kafka configuration for the best
reactive system
The open-source reactive community is on
hand to help!
© 2020 IBM Corporation
MicroProfile Reactive labs
ibm.biz/reactive-java-labs
© 2020 IBM Corporation
Reactive Systems Explained
© 2020 IBM Corporation
ibm.biz/ReactiveReport
IBM Event Streams
Apache Kafka for the enterprise
© 2020 IBM Corporation
ibm.biz/aboutEventStreams
Powerful Ops Tooling
Award Winning User Experience
Connector Catalog
Support you can Trust
Unrivalled MQ connectivity
Schema Registry
Geo-replication for DR
Thank you
Grace Jansen | @gracejansen27
Kate Stanley | @katestanley91
© 2020 IBM Corporation IBM Event Streams: ibm.biz/aboutEventStreams
Reactive resources:
https://ibm.biz/IntroToReactive
https://ibm.biz/GettingStartedWithReactive
Getting started with Kafka:
https://kafka.apache.org/quickstart
https://strimzi.io
Reactive Kafka libraries
https://vertx.io/docs/vertx-kafka-client/java/
https://github.com/eclipse/microprofile-reactive-
messaging
https://projectreactor.io/docs/kafka
https://github.com/akka/alpakka-kafka

More Related Content

What's hot

What's hot (20)

M10: How to implement mq in a containerized architecture ITC 2019
M10: How to implement mq in a containerized architecture ITC 2019M10: How to implement mq in a containerized architecture ITC 2019
M10: How to implement mq in a containerized architecture ITC 2019
 
IBM MQ on cloud and containers
IBM MQ on cloud and containersIBM MQ on cloud and containers
IBM MQ on cloud and containers
 
IBM Think 2018: IBM MQ Appliance
IBM Think 2018: IBM MQ ApplianceIBM Think 2018: IBM MQ Appliance
IBM Think 2018: IBM MQ Appliance
 
IBM MQ High Availability 2019
IBM MQ High Availability 2019IBM MQ High Availability 2019
IBM MQ High Availability 2019
 
What's new in IBM MQ
What's new in IBM MQWhat's new in IBM MQ
What's new in IBM MQ
 
IBM MQ cloud architecture blueprint
IBM MQ cloud architecture blueprintIBM MQ cloud architecture blueprint
IBM MQ cloud architecture blueprint
 
M14: MQ security deep dive ITC 2019
M14: MQ security deep dive ITC 2019M14: MQ security deep dive ITC 2019
M14: MQ security deep dive ITC 2019
 
Running IBM MQ in the Cloud
Running IBM MQ in the CloudRunning IBM MQ in the Cloud
Running IBM MQ in the Cloud
 
M08 protecting your message data in IBM MQ with encryption
M08 protecting your message data in IBM MQ with encryptionM08 protecting your message data in IBM MQ with encryption
M08 protecting your message data in IBM MQ with encryption
 
IBM MQ - What's new in 9.2
IBM MQ - What's new in 9.2IBM MQ - What's new in 9.2
IBM MQ - What's new in 9.2
 
Whats new in MQ V9.1
Whats new in MQ V9.1Whats new in MQ V9.1
Whats new in MQ V9.1
 
Building an Active-Active IBM MQ System
Building an Active-Active IBM MQ SystemBuilding an Active-Active IBM MQ System
Building an Active-Active IBM MQ System
 
M11 - Securing your MQ environment. Integration technical conference 2019
M11 - Securing your MQ environment. Integration technical conference 2019M11 - Securing your MQ environment. Integration technical conference 2019
M11 - Securing your MQ environment. Integration technical conference 2019
 
MQ Guide France - IBM MQ and Containers
MQ Guide France - IBM MQ and ContainersMQ Guide France - IBM MQ and Containers
MQ Guide France - IBM MQ and Containers
 
IBM MQ and Kafka, what is the difference?
IBM MQ and Kafka, what is the difference?IBM MQ and Kafka, what is the difference?
IBM MQ and Kafka, what is the difference?
 
531: Controlling access to your IBM MQ system
531: Controlling access to your IBM MQ system531: Controlling access to your IBM MQ system
531: Controlling access to your IBM MQ system
 
Running IBM MQ in Containers
Running IBM MQ in ContainersRunning IBM MQ in Containers
Running IBM MQ in Containers
 
Securing your IBM MQ environment.
Securing your IBM MQ environment.Securing your IBM MQ environment.
Securing your IBM MQ environment.
 
IBM MQ Security Overview MQTC 2017
IBM MQ Security Overview MQTC 2017IBM MQ Security Overview MQTC 2017
IBM MQ Security Overview MQTC 2017
 
IBM MQ security deep dive including AMS MQTC 2017
IBM MQ security deep dive including AMS MQTC 2017IBM MQ security deep dive including AMS MQTC 2017
IBM MQ security deep dive including AMS MQTC 2017
 

Similar to JLove conference 2020 - Reacting to an Event-Driven World

Similar to JLove conference 2020 - Reacting to an Event-Driven World (20)

Jfokus - Reacting to an event-driven world
Jfokus - Reacting to an event-driven worldJfokus - Reacting to an event-driven world
Jfokus - Reacting to an event-driven world
 
Virtual Meetup Sweden - Reacting to an event driven world
Virtual Meetup Sweden - Reacting to an event driven worldVirtual Meetup Sweden - Reacting to an event driven world
Virtual Meetup Sweden - Reacting to an event driven world
 
GIDS Architecture Live: Reacting to an event-driven world
GIDS Architecture Live: Reacting to an event-driven worldGIDS Architecture Live: Reacting to an event-driven world
GIDS Architecture Live: Reacting to an event-driven world
 
DevNexus - Reacting to an event driven world
DevNexus - Reacting to an event driven worldDevNexus - Reacting to an event driven world
DevNexus - Reacting to an event driven world
 
VJUG - Reacting to an event driven world
VJUG - Reacting to an event driven worldVJUG - Reacting to an event driven world
VJUG - Reacting to an event driven world
 
JSpring Virtual 2020 - Reacting to an event-driven world
JSpring Virtual 2020 - Reacting to an event-driven worldJSpring Virtual 2020 - Reacting to an event-driven world
JSpring Virtual 2020 - Reacting to an event-driven world
 
JavaBin: Reacting to an event driven world
 JavaBin: Reacting to an event driven world JavaBin: Reacting to an event driven world
JavaBin: Reacting to an event driven world
 
Reacting to an Event-Driven World (Kate Stanley & Grace Jansen, IBM) Kafka Su...
Reacting to an Event-Driven World (Kate Stanley & Grace Jansen, IBM) Kafka Su...Reacting to an Event-Driven World (Kate Stanley & Grace Jansen, IBM) Kafka Su...
Reacting to an Event-Driven World (Kate Stanley & Grace Jansen, IBM) Kafka Su...
 
Developer Week - Reacting to an event-driven world
Developer Week - Reacting to an event-driven worldDeveloper Week - Reacting to an event-driven world
Developer Week - Reacting to an event-driven world
 
Seriously Open Cloud Native Java Microservices
Seriously Open Cloud Native Java MicroservicesSeriously Open Cloud Native Java Microservices
Seriously Open Cloud Native Java Microservices
 
CICDforModernApplications-Oslo.pdf
CICDforModernApplications-Oslo.pdfCICDforModernApplications-Oslo.pdf
CICDforModernApplications-Oslo.pdf
 
Running Kafka in Kubernetes: A Practical Guide (Katherine Stanley, IBM United...
Running Kafka in Kubernetes: A Practical Guide (Katherine Stanley, IBM United...Running Kafka in Kubernetes: A Practical Guide (Katherine Stanley, IBM United...
Running Kafka in Kubernetes: A Practical Guide (Katherine Stanley, IBM United...
 
Revolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere ConnectRevolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere Connect
 
AWS Accra Meetup - Developing Modern Applications in the Cloud
AWS Accra Meetup - Developing Modern Applications in the CloudAWS Accra Meetup - Developing Modern Applications in the Cloud
AWS Accra Meetup - Developing Modern Applications in the Cloud
 
[CPT DevOps Meetup] Developing Modern Applications in the Cloud
[CPT DevOps Meetup] Developing Modern Applications in the Cloud[CPT DevOps Meetup] Developing Modern Applications in the Cloud
[CPT DevOps Meetup] Developing Modern Applications in the Cloud
 
AWS Jozi Meetup Developing Modern Applications in the Cloud
AWS Jozi Meetup Developing Modern Applications in the CloudAWS Jozi Meetup Developing Modern Applications in the Cloud
AWS Jozi Meetup Developing Modern Applications in the Cloud
 
Building Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonBuilding Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and Tekton
 
2019 ibm io t exchange - meeting safety-related software audits
2019   ibm io t exchange - meeting safety-related software audits2019   ibm io t exchange - meeting safety-related software audits
2019 ibm io t exchange - meeting safety-related software audits
 
AWS networking fundamentals - SVC303 - Santa Clara AWS Summit
AWS networking fundamentals - SVC303 - Santa Clara AWS SummitAWS networking fundamentals - SVC303 - Santa Clara AWS Summit
AWS networking fundamentals - SVC303 - Santa Clara AWS Summit
 
TechTalk: Accelerate Mobile Development using SDKs and Open APIs With CA API ...
TechTalk: Accelerate Mobile Development using SDKs and Open APIs With CA API ...TechTalk: Accelerate Mobile Development using SDKs and Open APIs With CA API ...
TechTalk: Accelerate Mobile Development using SDKs and Open APIs With CA API ...
 

More from Grace Jansen

More from Grace Jansen (20)

JPrime_JITServer.pptx
JPrime_JITServer.pptxJPrime_JITServer.pptx
JPrime_JITServer.pptx
 
SwissJUG_15_factor_app.pptx
SwissJUG_15_factor_app.pptxSwissJUG_15_factor_app.pptx
SwissJUG_15_factor_app.pptx
 
SwissJUG_Bringing the cloud back down to earth.pptx
SwissJUG_Bringing the cloud back down to earth.pptxSwissJUG_Bringing the cloud back down to earth.pptx
SwissJUG_Bringing the cloud back down to earth.pptx
 
ThroughTheLookingGlass_EffectiveObservability.pptx
ThroughTheLookingGlass_EffectiveObservability.pptxThroughTheLookingGlass_EffectiveObservability.pptx
ThroughTheLookingGlass_EffectiveObservability.pptx
 
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earthPittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
 
Javaland_JITServerTalk.pptx
Javaland_JITServerTalk.pptxJavaland_JITServerTalk.pptx
Javaland_JITServerTalk.pptx
 
JavaLand_To InstantOn and Beyond.pptx
JavaLand_To InstantOn and Beyond.pptxJavaLand_To InstantOn and Beyond.pptx
JavaLand_To InstantOn and Beyond.pptx
 
Jfokus_Bringing the cloud back down to earth.pptx
Jfokus_Bringing the cloud back down to earth.pptxJfokus_Bringing the cloud back down to earth.pptx
Jfokus_Bringing the cloud back down to earth.pptx
 
FooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptxFooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptx
 
DevoxxBelgium_StatefulCloud.pptx
DevoxxBelgium_StatefulCloud.pptxDevoxxBelgium_StatefulCloud.pptx
DevoxxBelgium_StatefulCloud.pptx
 
UtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptx
UtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptxUtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptx
UtrechtJUG_Exploring statefulmicroservices in a cloud-native world.pptx
 
JCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptxJCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptx
 
JCON_Adressing the transaction challenge in a cloud-native world.pptx
JCON_Adressing the transaction challenge in a cloud-native world.pptxJCON_Adressing the transaction challenge in a cloud-native world.pptx
JCON_Adressing the transaction challenge in a cloud-native world.pptx
 
JavaZone_Addressing the transaction challenge in a cloud-native world.pptx
JavaZone_Addressing the transaction challenge in a cloud-native world.pptxJavaZone_Addressing the transaction challenge in a cloud-native world.pptx
JavaZone_Addressing the transaction challenge in a cloud-native world.pptx
 
JavaZone_Mother Nature vs Java – the security face off.pptx
JavaZone_Mother Nature vs Java – the security face off.pptxJavaZone_Mother Nature vs Java – the security face off.pptx
JavaZone_Mother Nature vs Java – the security face off.pptx
 
Boost developer productivity with EE, MP and OL (Devoxx Ukraine 22).pptx
Boost developer productivity with EE, MP and OL (Devoxx Ukraine 22).pptxBoost developer productivity with EE, MP and OL (Devoxx Ukraine 22).pptx
Boost developer productivity with EE, MP and OL (Devoxx Ukraine 22).pptx
 
Addressing the transaction challenge in a cloud-native world Devoxx Ukraine 2022
Addressing the transaction challenge in a cloud-native world Devoxx Ukraine 2022Addressing the transaction challenge in a cloud-native world Devoxx Ukraine 2022
Addressing the transaction challenge in a cloud-native world Devoxx Ukraine 2022
 
JBCNConf_Addressing_The_Transaction_Challenge_LRA.pptx
JBCNConf_Addressing_The_Transaction_Challenge_LRA.pptxJBCNConf_Addressing_The_Transaction_Challenge_LRA.pptx
JBCNConf_Addressing_The_Transaction_Challenge_LRA.pptx
 
2022-Devnexus-StatefulMicroservices.pptx.pdf
2022-Devnexus-StatefulMicroservices.pptx.pdf2022-Devnexus-StatefulMicroservices.pptx.pdf
2022-Devnexus-StatefulMicroservices.pptx.pdf
 
How to become a superhero without even leaving your desk!
How to become a superhero without even leaving your desk!How to become a superhero without even leaving your desk!
How to become a superhero without even leaving your desk!
 

Recently uploaded

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 

JLove conference 2020 - Reacting to an Event-Driven World

Editor's Notes

  1. Use this as an example -> there are plenty of existing demos showing that using event driven vs e.g. http is much better Clement’s session C3 – 4pm It is possible to do http requests without blocking the thread, but even with that switch you are still approaching from a request/response perspective
  2. Event Driven Architecture (EDA) is a popular architectural approach that enables events to be placed at the heart of our systems Consists of Events Events are records of something that has happened, a change in state - immutable and are ordered in sequence of their creation. Interested parties can be notified of these state changes by subscribing to published events and then acting on information using their chosen business logic. An event-driven architecture, refers to a system of loosely coupled microservices that exchange information between each other through the production and consumption of events.
  3. Use this as an example -> there are plenty of existing demos showing that using event driven vs e.g. http is much better
  4. No! This isn’t reasonable! Kafka is a good tool, but it isn’t enough to have a good tool, you need to use it in the right way You also need to think about your applications and other services, Kafka isn’t your whole architecture – integration between components is key! Can we just use Kafka to create a Reactive application? Short answer: NO While Kafka look after the messaging part, we still need a Reactive Microservice implementation, for instance, using the actor model to replace thread synchronization with queued message processing or the supervisor model to handle failures and self-healing. We definitely need both Akka and Kafka to build Reactive Microservices based responsive, resilient and elastic systems.
  5. No! This isn’t reasonable! Kafka is a good tool, but it isn’t enough to have a good tool, you need to use it in the right way You also need to think about your applications and other services, Kafka isn’t your whole architecture – integration between components is key! Can we just use Kafka to create a Reactive application? Short answer: NO While Kafka look after the messaging part, we still need a Reactive Microservice implementation, for instance, using the actor model to replace thread synchronization with queued message processing or the supervisor model to handle failures and self-healing. We definitely need both Akka and Kafka to build Reactive Microservices based responsive, resilient and elastic systems.
  6. No! This isn’t reasonable! Kafka is a good tool, but it isn’t enough to have a good tool, you need to use it in the right way You also need to think about your applications and other services, Kafka isn’t your whole architecture – integration between components is key! Can we just use Kafka to create a Reactive application? Short answer: NO While Kafka look after the messaging part, we still need a Reactive Microservice implementation, for instance, using the actor model to replace thread synchronization with queued message processing or the supervisor model to handle failures and self-healing. We definitely need both Akka and Kafka to build Reactive Microservices based responsive, resilient and elastic systems.
  7. No! This isn’t reasonable! Kafka is a good tool, but it isn’t enough to have a good tool, you need to use it in the right way You also need to think about your applications and other services, Kafka isn’t your whole architecture – integration between components is key! Can we just use Kafka to create a Reactive application? Short answer: NO While Kafka look after the messaging part, we still need a Reactive Microservice implementation, for instance, using the actor model to replace thread synchronization with queued message processing or the supervisor model to handle failures and self-healing. We definitely need both Akka and Kafka to build Reactive Microservices based responsive, resilient and elastic systems.
  8. So Kafka claims to have scalable consumption and resiliency, do I just get that for free when I start Kafka? How does it work?
  9. Talking about message driven vs event driven
  10. Talking about message driven vs event driven
  11. Open sourced distributed streaming platform, often being adopted as the “de-facto” event streaming technology Arrived at the right time, captured mindshare among developers and so exploded in popularity Kafka has deliberately moved away from the word “events”… instead uses records now
  12. Use this as an example -> there are plenty of existing demos showing that using event driven vs e.g. http is much better
  13. Use this as an example -> there are plenty of existing demos showing that using event driven vs e.g. http is much better
  14. Use this as an example -> there are plenty of existing demos showing that using event driven vs e.g. http is much better
  15. Talking about message driven vs event driven
  16. Use this as an example -> there are plenty of existing demos showing that using event driven vs e.g. http is much better
  17. Use this as an example -> there are plenty of existing demos showing that using event driven vs e.g. http is much better
  18. Use this as an example -> there are plenty of existing demos showing that using event driven vs e.g. http is much better
  19. Talking about message driven vs event driven
  20. Talking about message driven vs event driven
  21. Talking about message driven vs event driven
  22. Kafka = gives us reactive data layer G Reactive architecture patterns = give us reactivity in the architecture of the system Reactive programming = gives us reactivity within the microservices A reactive system is an architectural style that allows multiple individual applications to coalesce as a single unit, reacting to its surroundings, while remaining aware of each other—this could manifest as being able to scale up/down, load balancing, and even taking some of these steps proactively. It’s possible to write a single application in a reactive style (i.e. using reactive programming); however, that’s merely one piece of the puzzle. Though each of the above aspects may seem to qualify as “reactive,” in and of themselves they do not make a system reactive. (Designed well together)
  23. Kafka = gives us reactive data layer G Reactive architecture patterns = give us reactivity in the architecture of the system Reactive programming = gives us reactivity within the microservices A reactive system is an architectural style that allows multiple individual applications to coalesce as a single unit, reacting to its surroundings, while remaining aware of each other—this could manifest as being able to scale up/down, load balancing, and even taking some of these steps proactively. It’s possible to write a single application in a reactive style (i.e. using reactive programming); however, that’s merely one piece of the puzzle. Though each of the above aspects may seem to qualify as “reactive,” in and of themselves they do not make a system reactive. (Designed well together)
  24. Reactive adopts a set of design patterns such as: - CQRS – separates the reads and writes - Event Sourcing - persists the state of a business entity such an Order or a Customer as a sequence of state-changing events. Whenever the state of a business entity changes, a new event is appended to the list of events. - SAGA - a mechanism to take traditional transactions that we would have done in a monolithic architecture and do it in a distributed way. We create multi “micro” transactions that have fallback behaviour to account for things going wrong part way through. It’s a sequence of local transactions where each transaction updates data within a single service - Sharding - distributes and replicates the data across a pool of databases that do not share hardware or software. Each individual database is known as a shard. Java applications can linearly scale up or scale down by adding databases (shard) to the pool or by removing databases (shards) from the pool. These patterns trade off eventual consistency, availability and scalability for strong consistency (CAP Theorem). Kafka is a perfect fit for those design patterns.
  25. Kafka = gives us reactive data layer G Reactive architecture patterns = give us reactivity in the architecture of the system Reactive programming = gives us reactivity within the microservices A reactive system is an architectural style that allows multiple individual applications to coalesce as a single unit, reacting to its surroundings, while remaining aware of each other—this could manifest as being able to scale up/down, load balancing, and even taking some of these steps proactively. It’s possible to write a single application in a reactive style (i.e. using reactive programming); however, that’s merely one piece of the puzzle. Though each of the above aspects may seem to qualify as “reactive,” in and of themselves they do not make a system reactive. (Designed well together)
  26. Asynchronous code allows independent IO operations to run concurrently, resulting in efficient code. However, this improved efficiency comes at a cost — straightforward synchronous code may become a mess of nested callbacks. Futures - Enables us to combine the simplicity of synchronous code with the efficiency of the asynchronous approach. Future represents the result of an asynchronous computation. Methods are provided to check if the computation is complete, to wait for its completion, and to retrieve the result of the computation. A Publisher is the source of events T in the stream, and a Subscriber is a consumer for those events. A Subscriber subscribes to a Publisher by invoking a “factory method” in the Publisher that will push the stream items <T> starting a new Subscription. This is also called Reactor Pattern.
  27. Asynchronous code allows independent IO operations to run concurrently, resulting in efficient code. However, this improved efficiency comes at a cost — straightforward synchronous code may become a mess of nested callbacks. Futures - Enables us to combine the simplicity of synchronous code with the efficiency of the asynchronous approach. Future represents the result of an asynchronous computation. Methods are provided to check if the computation is complete, to wait for its completion, and to retrieve the result of the computation. A Publisher is the source of events T in the stream, and a Subscriber is a consumer for those events. A Subscriber subscribes to a Publisher by invoking a “factory method” in the Publisher that will push the stream items <T> starting a new Subscription. This is also called Reactor Pattern.
  28. So Kafka claims to have scalable consumption and resiliency, do I just get that for free when I start Kafka? How does it work?
  29. Talking about message driven vs event driven
  30. A Kafka cluster consists of a set of brokers. A cluster has a minimum of 3 brokers.
  31. Kafka broken down into topics Records on a topic split into different partitions Partitions distributed across Kafka brokers
  32. For each partition, one of the brokers is the leader, and the other brokers are the followers. Replication works by the followers repeatedly fetching messages from the leader. This is done automatically by Kafka. For production we recommend at least 3 replicas: you’ll see why in a minute.
  33. Imagine a broker goes down, this means the leader of Topic A, partition 1 is offline
  34. Can’t do fire and forget if you want full resiliency cause if the broker goes down your messages get lost Two different guarantees, way you get them is through confirguartion At most once, you may lose some messages (not completely relisient) At least once, guaranteed delivery but may get duplicates Retries is if acks times out/fails – how many times do you retry producing the event (how will the retry affect ordering)
  35. Talking about message driven vs event driven
  36. Elasticity in Kafka itself Scale out brokers, can’t scale down (where do events go if you did?) Can scale out partitions but can’t scale them down again Can add topics, and delete topics if you don’t care about them
  37. To allow scalability of consumers, consumers are grouped into consumer groups. Consumer declare what group they are in using a group id For consumers we use Consumer groups to enable elasticity
  38. Elasticity in Kafka itself Scale out brokers, can’t scale down (where do events go if you did?) Can scale out partitions but can’t scale them down again Can add topics, and delete topics if you don’t care about them
  39. Elasticity in Kafka itself Scale out brokers, can’t scale down (where do events go if you did?) Can scale out partitions but can’t scale them down again Can add topics, and delete topics if you don’t care about them
  40. Elasticity in Kafka itself Scale out brokers, can’t scale down (where do events go if you did?) Can scale out partitions but can’t scale them down again Can add topics, and delete topics if you don’t care about them
  41. Elasticity in Kafka itself Scale out brokers, can’t scale down (where do events go if you did?) Can scale out partitions but can’t scale them down again Can add topics, and delete topics if you don’t care about them
  42. All of these frameworks take the role of handling polling, then provide different ways for us to handle the processing and flow. MicroProfile and Alpakka provide a more constrained way of doing backpressure and flow control, whereas vertx provides the tools for doing that separation but leaves it up to the developer to decide exactly how to implement it. We will describe flow control for MP and alpakka, “how they improve flow control and allow application to follow reactive streams spec”
  43. The actor model is a conceptual model to deal with concurrent computation. An actor is the primitive unit of computation. It’s the thing that receives a message and do some kind of computation based on it. Messages are sent asynchronously to an actor, that needs to store them somewhere while it’s processing another message. The mailbox is the place where these messages are stored. Actors communicate with each other by sending asynchronous messages. Those messages are stored in other actors' mailboxes until they're processed. It allows consuming/producing from Kafka with Akka Streams, leveraging the reactive interface of this streaming library, its backpressure, and resource safety. It hides a lot of complexity, especially when your streaming logic is non-trivial like sub-streaming per partition and handling commits in custom ways.
  44. The MicroProfile Reactive Messaging specifiMicroProfile Reactive Messaging makes use of and interoperates with two other specifications: Reactive Streams is a specification for doing asynchronous stream processing with back pressure. It defines a minimal set of interfaces to allow components which do this sort of stream processing to be connected together. MicroProfile Reactive Streams Operators is a MicroProfile specification which builds on Reactive Streams to provide a set of basic operators to link different reactive components together and to perform processing on the data which passes between them. When you use the MicroProfile Reactive Messaging @Incoming and @Outgoing annotations, Open Liberty creates a Reactive Streams component for each method and joins them up by matching the channel names. cation aims to deliver applications embracing the characteristics of reactive systems
  45. A method with an @Incoming annotation consumes messages from a channel. A method with an @Outgoing annotation publishes messages to a channel. A method with both an @Incoming and an @Outgoing annotation is a message processor, it consumes messages from a channel, does some transformation to them, and publishes messages to another channel. When you use the MicroProfile Reactive Messaging @Incoming and @Outgoing annotations, Open Liberty creates a Reactive Streams component for each method and joins them up by matching the channel names.
  46. Polyglot Java, Javascript, Groovy, Ceylon, Scala and Kotlin The reactor pattern is one implementation technique of event-driven architecture. In simple terms, it uses a single threaded event loop blocking on resource-emitting events and dispatches them to corresponding handlers and callbacks. It receives messages, requests, and connections coming from multiple concurrent clients and processes these posts sequentially using event handlers. The purpose of the Reactor design pattern is to avoid the common problem of creating a thread for each message, request, and connection. Then it receives events from a set of handlers and distributes them sequentially to the corresponding event handlers. It’s single-threaded – so you must not block the thread! The Kafka client is becoming more popular and e.g. it is used by SmallRye Reactive messaging
  47. So Kafka claims to have scalable consumption and resiliency, do I just get that for free when I start Kafka? How does it work?
  48. Demo the starter app working Key takeaways: Choosing a reactive framework makes it easier to work with Kafka Strimzi, cool open source project that provides a Kubernetes operator for Kafka, just been accepted into CNCF (Cloud Native Computer Foundation) Kate active contributer to Strimzi and I was interested in Vert.x
  49. Demo the starter app working Key takeaways: Choosing a reactive framework makes it easier to work with Kafka Strimzi, cool open source project that provides a Kubernetes operator for Kafka, just been accepted into CNCF (Cloud Native Computer Foundation) Kate active contributer to Strimzi and I was interested in Vert.x
  50. Show/talk about the normal way to use the Kafka clients
  51. Show/talk about the normal way to use the Kafka clients
  52. Show/talk about the normal way to use the Kafka clients
  53. Show/talk about the normal way to use the Kafka clients
  54. IBM Event Streams is fully supported Apache Kafka® with value-add capabilities