Process automation technology progressed massively over the last years and can handle modern scalability and resiliency requirements. It is not the dinosaur some people think it is!
Now there are super interesting combinations between Kafka and a workflow engine possible, such as starting or influencing process instances upon certain events in a stream, orchestrating microservices by writing commands as Kafka records, or using Kafka to collect information about decentralized process executions.
In this talk, I will briefly walk you through these possibilities presenting real-life use cases and some sample code using open source tools.
3. There are pretty amazing use cases
@berndruecker
Order Management in Telco
5,000 process instances/s
Money Transfer
200 process instances/s
Perseverance Mars Rover
Nasa
10. A workflow engine
Or more scalable:
@berndruecker
Camunda
Platform
Camunda
Cloud
Two workflow engines:
- RDBMS / traditional & on-prem
- Event-Sourcing / cloud-native
14. Technical
Example
Java Spring Boot
Application
Camunda Cloud
Confluent Cloud
Kafka Topic
Zeebe
Worker
Via subscription
Publish record
Kafka
Listener
Via subscription
Correlate to process instance
https://github.com/berndruecker/kafka-camunda-spring-simple
@berndruecker
21. The danger is that it's very easy to make
nicely decoupled systems with event
notification, without realizing that you're
losing sight of that larger-scale flow, and
thus set yourself up for trouble in future
years.
https://martinfowler.com/articles/201701-event-driven.html
@berndruecker
22. The danger is that it's very easy to make
nicely decoupled systems with event
notification, without realizing that you're
losing sight of that larger-scale flow, and
thus set yourself up for trouble in future
years.
https://martinfowler.com/articles/201701-event-driven.html
@berndruecker
23. The danger is that it's very easy to make
nicely decoupled systems with event
notification, without realizing that you're
losing sight of that larger-scale flow, and
thus set yourself up for trouble in future
years.
https://martinfowler.com/articles/201701-event-driven.html
@berndruecker
26. What we wanted
Photo by Lijian Zhang, under Creative Commons SA 2.0 License and Wikimedia Commons / CC BY-SA 4.0
@berndruecker
Choreography
27. Why is it so tempting?
Service
A
Event Bus
A
B
Service
B
C
Service
C
D
E
F
Service
D
G
Service
âŠ
Service
âŠ
Service âŠ
Service
âŠ
Service âŠ
Service âŠ
Service
âŠ
@berndruecker
28. Why is it so tempting?
Service
A
Event Bus
A
B
Service
B
C
Service
C
D
E
F
Service
D
G
Service
âŠ
Service
âŠ
Service âŠ
Service
âŠ
Service âŠ
Service âŠ
Service
âŠ
Adding is easy!
You can âbuyâ a shorter
initial time-to-value
by choreography.
It yields in technical debt.
@berndruecker
32. ?
Event Command
Message Record Event
Fact,
happened in the past,
immutable
Intend,
Want s.th. to happen,
The intention itself is a fact
@berndruecker
34. Commands in disguise
The Customer Needs To Be
Sent A Message To Confirm
Address Change
Event
Send
Message
Wording of
Sender
Wording of
recipient
35. Checkout Order Payment
Event-driven:
Decision to couple is on the receiving side
Command-driven
Decision to couple is on the sending side
Direction of dependency
Retrieve
Payment
Order
placed
Payment
received
Direction of dependency
@berndruecker
48. Summary
âą A workflow engine is complementary to Apache Kafka
âą The technical integration is easy
âą There are tools that scale
âą Typical use cases
âą Microservices orchestration (balanced with choreography)
âą Business transactions
âą Actions resulting from streams
@berndruecker