SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
SIMPLE MACHINES
Sagas in Kafka
SAGAS IN KAFKA !1
Stephen Zoio — Principal Consultant
SIMPLE MACHINES SAGAS IN KAFKA
!2
Journey to Sagas
Coordinating microservices Sagas
Kafka as a database
Events
A protocol for distributed and long running transactions
SIMPLE MACHINES SAGAS IN KAFKA
!3
Microservice Transactions
www.
Flight Booking
Hotel Booking
Car Rental Payment
Trips
?
SIMPLE MACHINES SAGAS IN KAFKA
!4
Two Phase Commit
www.
Flight Booking
Hotel Booking
Car Rental Payment
Trips
Prepare
Response
Confirm
Acknowledgement
• Too strict
• Too slow
• Too complex
Not that popular in practice…
SIMPLE MACHINES SAGAS IN KAFKA
!5
Saga Transaction
www.
Flight Booking
Hotel Booking
Car Rental Payment
Trips
Action
Success Response
• Much simpler protocol
• Minimises latency and comms
• Services don’t need to care
about sagas
SIMPLE MACHINES SAGAS IN KAFKA
!6
Saga Failure
www.
Flight Booking
Hotel Booking
Car Rental Payment
Trips
Action
Success Response
Compensation
Failure
work backwards, executing
compensating actions
Compensation Response
SIMPLE MACHINES SAGAS IN KAFKA
!7
Saga Data Consistency
SQL Database
A Atomicity
C Consistency
I Isolation
D Durability
Sagas
A Atomicity
C Consistency
I Isolation
D Durability
We give up isolation, but we
can live without it…
SIMPLE MACHINES SAGAS IN KAFKA
!8
Kafka and Event Sourcing
Kafka as a database?
Event sourcing
Event processingKafka
Events
WHY NOT STORE
THE DATA LIKE WE
USE IT?
WE’RE ALREADY
USING KAFKA FOR
MESSAGING
SIMPLE MACHINES SAGAS IN KAFKA
!9
Event Log Consistency
e.g. Bank Account
Events
Simple Sourcing
• Balance always positive
• Account never debited twice
Taking advantage of
• Kafka exactly once processing
• Per topic-partition ordering guarantee
An API to support
these consistency
requirements
SIMPLE MACHINES SAGAS IN KAFKA
!11
Simple Sourcing Concepts
Type Represents Example
C Command Intent debit Bob’s account $100
E Event Outcome Bob’s account debited $100
A Aggregate State Bob’s account balance=$700, available=$650
K Key Identity Bob’s account number
Based on CQRS (Command query responsibility segregation)
SIMPLE MACHINES SAGAS IN KAFKA
!12
Simple Sourcing Data Flow
Kafka
Command request
Aggregate state
Command response
Event
Bob’s
balance
>$100?
Debit Bob’s account $100
Return Success
Publish event
AccountDebited(bob, 100)
Return error response
Debit Bob’s account $100
Yes
No
Everything happens in a single atomic transaction
SIMPLE MACHINES SAGAS IN KAFKA
!13
Simple Sourcing Programming Model
In Scala types
(Command, Aggregate) => Either[Error, List[Event]]
(Event, Aggregate) => Aggregate
Key => Aggregate
COMMAND HANDLER
EVENT AGGREGATOR
INITIAL VALUE
SIMPLE MACHINES SAGAS IN KAFKA
!14
Event Sourced Apps
Coordinating between aggregates: Bike auction scenario
Account Aggregate
Key Total Reserved
Bob’s a/c 400 200
Charlie’s a/c 500 –
Auction Aggregate
Key Bidder Amount
Bicycle Bob 200
Reserve Charlie’s account $250
Bid $250 for Charlie
Release $200 for Bob
$200 Current bid: Bob $200
Bob
$250 Next bid: Charlie $250
Charlie
250
Auction Aggregate
Key Bidder Amount
Bicycle Charlie 250
–
SIMPLE MACHINES SAGAS IN KAFKA
!15
Auction App
Coordinating between aggregates
Charlie
$250
Account Aggregate
Key Total Reserved
Bob’s a/c 400 –
Charlie’s a/c 500
Alice’s a/c 500
Auction Aggregate
Key Bidder Amount
Bicycle Charlie 250
Reserve Bob’s account $300
Bid $300 for Bob
Undo Bob’s reservation
Reserve Alice’s account $350
Bid $350 for Alice
Release $250 for Charlie
Charlie has the current best bid of $250
Bob
$300 Bob bid’s again, this time $300
Alice
$350 Meanwhile Alice arrives and bids $350
300
350
300
350Alice
Sagas are suitable for synchronising between
multiple aggregates in an event sourced application
-
-250
SIMPLE MACHINES SAGAS IN KAFKA
!16
Representing Sagas
A stateful directed acyclic graph (DAG)
a undo
A
b c undo
C
d undo
D
e
a
undo
A
Saga actions
Undo (compensation) actions
SIMPLE MACHINES SAGAS IN KAFKA
!17
Representing Sagas
Auction bid saga
reserve
account
cancel
reservation
bid on auction
cancel
previous
reservation
SIMPLE MACHINES
(Event, Aggregate) => Aggregate
(Command, Aggregate) => Either[Error, List[Event]]
Key => Aggregate
COMMAND HANDLER
EVENT AGGREGATOR
INITIAL VALUE
(_, _) => true
(_, aggregate) => if (aggregate) Error("email taken") else List(EventClaimed)
_ => false
SAGAS IN KAFKA
!18
Useful Patterns
Enforcing uniqueness
Claim Email
Type Example
C Command
claim email address, rejects command if
aggregate is set
A Aggregate either true or false
K Key email address
*Each user must have a unique email
Claim email address:
bob@xyz.com
Create user with email address:
bob@xyz.com
Claim
email
Create
user
release
email
SIMPLE MACHINES SAGAS IN KAFKA
!19
Useful Patterns
Pessimistic lock
Claim lock
Perform action on resource
Release lock
Claim lock Create user
release lock
Create userDo actions Release lock
SIMPLE MACHINES SAGAS IN KAFKA
!20
Saga State a undo
A
b c undo
C
d undo
D
e
Pending
In progress
Completed
Failed
N/A
• Saga state (in progress, in failure)
• Action state (pending, in progress)
• The actions themselves (for dynamic actions)
a undo
A
b c undo
C
d undo
D
e
a undo
A
b c undo
C
d undo
D
e
a undo
A
b c undo
C
d undo
D
e
a undo
A
b c undo
C
d undo
D
e
a undo
A
b c undo
C
d undo
D
e
a undo
A
b c undo
C
d undo
D
e
a undo
A
b c undo
C
d undo
D
e
a undo
A
b c undo
C
d undo
D
e
a undo
A
b c undo
C
d undo
D
e
SIMPLE MACHINES SAGAS IN KAFKA
!21
Saga State a undo
A
b c undo
C
d undo
D
e
Pending
In progress
Completed
Failed
N/A
Failure mode
saga into switches into undo mode
a undo
A
b c undo
C
d undo
D
e
undo
A
b undo
C
undo
D
undo
E
undo
A
b undo
C
undo
D
undo
E
undo
A
b undo
C
undo
D
undo
E
undo
A
b undo
C
undo
D
undo
E
undo
A
b undo
C
undo
D
undo
E
SIMPLE MACHINES SAGAS IN KAFKA
!22
Saga DSL
Scala DSL loosely based on Akka Streams
a
b
c
a ~> b ~> c
SIMPLE MACHINES SAGAS IN KAFKA
!23
Saga DSL
with undo (compensation) actions
a ~> b.withUndo(undoB) ~> c
a
b
c
undo
B
SIMPLE MACHINES SAGAS IN KAFKA
!24
Saga DSL
parallel execution
a undo
A
b c undo
C
d undo
D
e
a.withUndo(undoA) ~> parallel(b, c.withUndo(undoC)) ~> d.withUndo(undoD) ~> e
SIMPLE MACHINES SAGAS IN KAFKA
!25
Saga DSL
These are all equivalent:
(a ~> b ~> c) ~> d ~> e
a ~> (b ~> c ~> d) ~> e
a ~> List(b, c, d).inSeries ~> e
(a ~> b) ~> c ~> (d ~> e)
~> is associative
This enables a building
block approach to
constructing sagas
SIMPLE MACHINES SAGAS IN KAFKA
!26
Simple Sagas
A simple Kafka-based Sagas framework
Saga coordinator
Action processors
Client
SIMPLE MACHINES SAGAS IN KAFKA
!27
Saga Coordinator
Saga request Saga response
Action request Action response
Saga coordinator
{
"sagaId": 12,
"actions": [
{"actionId": 1, "command": "BookFlight(...)"},
{"actionId": 2, "command": "BookCar(...)"}
],
"dependencies": {"2": [1], "4": [2, 3]}
}
{
"sagaId": 12,
"success": true
}
{
"actionId": 1,
"command": "BookFlight(...)"}
}
{
"actionId": 1,
"success": true
}
SIMPLE MACHINES SAGAS IN KAFKA
!28
Saga Coordinator Saga request
Saga(A, B, C, D, E)
Saga state transition
Start(saga=Saga(A, B, C, D, E))
ActionStarted(action=A)
ActionFinished(action=A)
ActionStarted(action=B,C)
ActionFinished(action=C)
Saga state
Saga(A, B, C, D, E)
Saga(A=started, B, C, D, E)
Saga(A=finished, B, C, D, E)
Saga(A=finished, B=started, C=started,..)
Saga(A=finished, B=finished, C=started,..)
Saga
Saga Client
Saga request Saga response
Saga state transition
Aggregate state
Event processor Saga state machine
Action request Action response
Action processor
Saga coordinator
SIMPLE MACHINES SAGAS IN KAFKA
!29
Saga Coordinator Apps
Application main method
SagaApp<SpecificRecord> sagaApp = SagaApp.of(
sagaSpec,
actionSpec,
topicBuilder -> topicBuilder.withTopicPrefix("saga-"));
sagaApp.withActions(
"account_action",
"auction_action",
"payment_action");
sagaApp.run(properties);
SIMPLE MACHINES SAGAS IN KAFKA
!30
Action Processor
{
"sagaId": 1,
"commandId": 34,
"command": "BookFlight(...)",
"actionType": "book_flight"
}
{
"sagaId": 1,
"commandId": 34,
"success": true,
"undo": {
"command": "CancelFlight(...)",
"actionType": "cancel_flight"
}
}
Action request Action response
Action processor
Idempotent effect
Use the built in ones, or roll your own
?
SIMPLE MACHINES SAGAS IN KAFKA
!31
Event Sourcing Action Processor
Action request
Key Value
Saga ID DebitAccount(amount=100)
Saga Coordinator
Command processor Event Aggregator
Action request
Simple Sourcing
Command request
Aggregate state
Event
Action response
Command request
Key Value
Bob’s a/c DebitAccount(amount=100)
Event
Key Value
Bob’s a/c DebitAccount(amount=100)
Aggregate state
Key Value
Bob’s a/c Account(balance=500)
Bob’s a/c DebitAccount(amount=100)
Command response
Key Value
Bob’s a/c DebitAccount(amount=100)
Action response
Key Value
Bob’s a/c DebitAccount(amount=100)
Command response
Event sourcing action
processor
saga-long per-aggregate
consistency guarantee
SIMPLE MACHINES SAGAS IN KAFKA
!32
Async Action Processor
Action request
Key Value
Saga id ThirdPartyPayment(amount=50)
Saga Coordinator
Action request Action response
Async output
Key Value
? Payment(token=XXX)
Action response
Key Value
Saga id Response(success=true,
undoCommand=CancelPayment(X
XX))
Action output
Async action processor
Microservice
{
"success": true,
“booking_reference": “XXX"
}
Callback
Async / http invoke
undo actions can also be
defined dynamically from
web service result
update saga with new
undo action
SIMPLE MACHINES
streamApp
.withActionProcessor(EventSourcingBuilder.apply(
accountCommandSpec,
topicBuilder -> topicBuilder.withTopicPrefix("action-"),
topicBuilder -> topicBuilder.withTopicPrefix("command-")
.withActionProcessor(EventSourcingBuilder.apply(
auctionCommandSpec,
topicBuilder -> topicBuilder.withTopicPrefix("action-"),
topicBuilder -> topicBuilder.withTopicPrefix("command-")
streamApp.run(configProperties);
SAGAS IN KAFKA
!33
Action Processor Apps
EventSourcingSpec<SpecificRecord, AccountCommand, AccountId, AccountCommand> accountCommandSpec =
EventSourcingSpec.builder()
.actionType("account_action")
.aggregateName("account")
.decode(a -> Result.success((AccountCommand) a))
.commandMapper(c -> c)
.keyMapper(AccountCommand::getId)
.sequenceMapper(c -> Sequence.position(c.getSequence()))
.timeout(Duration.ofSeconds(30))
.build();
Application main method
EventSourcingSpec<SpecificRecord, AuctionCommand, AuctionId, AuctionCommand> auctionCommandSpec = ...;
SIMPLE MACHINES SAGAS IN KAFKA
!34
Saga Client
public interface SagaAPI<A> {
FutureResult<SagaError, SagaId> submitSaga(SagaRequest<A> request);
FutureResult<SagaError, SagaResponse> getSagaResponse(
SagaId requestId,
Duration timeout);
}
submitSaga
Saga request
Saga response
Saga Coordinator
getSagaResponse
Consumer
Private response topic
COMPLETES FUTURE
client is typically another service,
such as a web application
SIMPLE MACHINES SAGAS IN KAFKA
!35
Deployment
Single node
Application Instance
Saga coordinator
Action processor 1
Action processor 2
Kafka broker
Kafka broker
SIMPLE MACHINES SAGAS IN KAFKA
!36
Deployment
Application Instance 1
Separate sagas and actions
Application Instance 2
Kafka broker
Kafka broker
Microservice
Saga coordinator
Action processor 1 (event sourcing)
Action processor 2 (event sourcing)
Action processor 3 (async)
SIMPLE MACHINES
Action processors
SAGAS IN KAFKA
!37
Deployment
Saga coordinators
Kafka brokers
Resilient cluster setup
application instance failureapplication instance recovery
Kafka broker failureKafka broker recovery
SIMPLE MACHINES SAGAS IN KAFKA
!38
Saga coordinators
Kafka brokers
Event Sourcing
Hybrid Architectures
Async / Http
Simple Sourcing Other microservices
SIMPLE MACHINES
Questions…
SAGAS IN KAFKA !39
https://simplesource.io/

Contenu connexe

Tendances

Stream processing using Kafka
Stream processing using KafkaStream processing using Kafka
Stream processing using KafkaKnoldus Inc.
 
Apache Kafka® Security Overview
Apache Kafka® Security OverviewApache Kafka® Security Overview
Apache Kafka® Security Overviewconfluent
 
Kafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityKafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityJean-Paul Azar
 
When Kafka Meets the Scaling and Reliability needs of World's Largest Retaile...
When Kafka Meets the Scaling and Reliability needs of World's Largest Retaile...When Kafka Meets the Scaling and Reliability needs of World's Largest Retaile...
When Kafka Meets the Scaling and Reliability needs of World's Largest Retaile...confluent
 
ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!Guido Schmutz
 
Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics Araf Karsh Hamid
 
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and PinotExactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and PinotFlink Forward
 
Kafka 101 and Developer Best Practices
Kafka 101 and Developer Best PracticesKafka 101 and Developer Best Practices
Kafka 101 and Developer Best Practicesconfluent
 
Exactly-once Stream Processing with Kafka Streams
Exactly-once Stream Processing with Kafka StreamsExactly-once Stream Processing with Kafka Streams
Exactly-once Stream Processing with Kafka StreamsGuozhang Wang
 
Kafka At Scale in the Cloud
Kafka At Scale in the CloudKafka At Scale in the Cloud
Kafka At Scale in the Cloudconfluent
 
ksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database SystemksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database Systemconfluent
 
Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...
Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...
Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...confluent
 
Data Pipelines with Kafka Connect
Data Pipelines with Kafka ConnectData Pipelines with Kafka Connect
Data Pipelines with Kafka ConnectKaufman Ng
 
Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...
Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...
Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...HostedbyConfluent
 
A Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiA Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiDatabricks
 
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...HostedbyConfluent
 
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...HostedbyConfluent
 
Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)
Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)
Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)Kai Wähner
 

Tendances (20)

Stream processing using Kafka
Stream processing using KafkaStream processing using Kafka
Stream processing using Kafka
 
Apache Kafka® Security Overview
Apache Kafka® Security OverviewApache Kafka® Security Overview
Apache Kafka® Security Overview
 
Kafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityKafka Tutorial: Kafka Security
Kafka Tutorial: Kafka Security
 
When Kafka Meets the Scaling and Reliability needs of World's Largest Retaile...
When Kafka Meets the Scaling and Reliability needs of World's Largest Retaile...When Kafka Meets the Scaling and Reliability needs of World's Largest Retaile...
When Kafka Meets the Scaling and Reliability needs of World's Largest Retaile...
 
ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!
 
Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics
 
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and PinotExactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
 
Kafka 101 and Developer Best Practices
Kafka 101 and Developer Best PracticesKafka 101 and Developer Best Practices
Kafka 101 and Developer Best Practices
 
Exactly-once Stream Processing with Kafka Streams
Exactly-once Stream Processing with Kafka StreamsExactly-once Stream Processing with Kafka Streams
Exactly-once Stream Processing with Kafka Streams
 
Kafka At Scale in the Cloud
Kafka At Scale in the CloudKafka At Scale in the Cloud
Kafka At Scale in the Cloud
 
ksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database SystemksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database System
 
Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...
Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...
Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...
 
Data Pipelines with Kafka Connect
Data Pipelines with Kafka ConnectData Pipelines with Kafka Connect
Data Pipelines with Kafka Connect
 
Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...
Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...
Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...
 
A Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiA Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and Hudi
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
 
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...
 
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...
Building an Interactive Query Service in Kafka Streams With Bill Bejeck | Cur...
 
AWS Real-Time Event Processing
AWS Real-Time Event ProcessingAWS Real-Time Event Processing
AWS Real-Time Event Processing
 
Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)
Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)
Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)
 

Similaire à Simplifying Distributed Transactions with Sagas in Kafka (Stephen Zoio, Simple Machines) Kafka Summit London 2019

Socket applications
Socket applicationsSocket applications
Socket applicationsJoão Moura
 
#u-wardley-mapping Wardley Maps: practical session - 2 hour
#u-wardley-mapping Wardley Maps: practical session - 2 hour#u-wardley-mapping Wardley Maps: practical session - 2 hour
#u-wardley-mapping Wardley Maps: practical session - 2 hourOpen Security Summit
 
OSDC 2019 | The Benefits of Orchestration in Distributed Systems by Niall Deehan
OSDC 2019 | The Benefits of Orchestration in Distributed Systems by Niall DeehanOSDC 2019 | The Benefits of Orchestration in Distributed Systems by Niall Deehan
OSDC 2019 | The Benefits of Orchestration in Distributed Systems by Niall DeehanNETWAYS
 
A dive into akka streams: from the basics to a real-world scenario
A dive into akka streams: from the basics to a real-world scenarioA dive into akka streams: from the basics to a real-world scenario
A dive into akka streams: from the basics to a real-world scenarioGioia Ballin
 
Creating Custom Actions in SharePoint 2010
Creating Custom Actions in SharePoint 2010Creating Custom Actions in SharePoint 2010
Creating Custom Actions in SharePoint 2010Geoff Varosky
 
Geoff Varosky: Creating Custom Actions in SharePoint 2010
Geoff Varosky: Creating Custom Actions in SharePoint 2010Geoff Varosky: Creating Custom Actions in SharePoint 2010
Geoff Varosky: Creating Custom Actions in SharePoint 2010SharePoint Saturday NY
 
RH_QCon_Preso_v3_compressed.pptx
RH_QCon_Preso_v3_compressed.pptxRH_QCon_Preso_v3_compressed.pptx
RH_QCon_Preso_v3_compressed.pptxChris Stetson
 
Abusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and ProfitAbusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and ProfitAlan Pinstein
 
A reviravolta do desenvolvimento web
A reviravolta do desenvolvimento webA reviravolta do desenvolvimento web
A reviravolta do desenvolvimento webWallace Reis
 
SAP Workflow Po create workflow by pavan golesar
SAP Workflow Po create workflow by pavan golesarSAP Workflow Po create workflow by pavan golesar
SAP Workflow Po create workflow by pavan golesarPavan Golesar
 
JCon Live 2023 - Lice coding some integration problems
JCon Live 2023 - Lice coding some integration problemsJCon Live 2023 - Lice coding some integration problems
JCon Live 2023 - Lice coding some integration problemsBernd Ruecker
 
Kafka Summit SF 2017 - Riot's Journey to Global Kafka Aggregation
Kafka Summit SF 2017 - Riot's Journey to Global Kafka AggregationKafka Summit SF 2017 - Riot's Journey to Global Kafka Aggregation
Kafka Summit SF 2017 - Riot's Journey to Global Kafka Aggregationconfluent
 
Case study: Carleton University – managing 600+ single installs
Case study: Carleton University – managing 600+ single installsCase study: Carleton University – managing 600+ single installs
Case study: Carleton University – managing 600+ single installsMichael Corkum
 
Heroku 101 py con 2015 - David Gouldin
Heroku 101   py con 2015 - David GouldinHeroku 101   py con 2015 - David Gouldin
Heroku 101 py con 2015 - David GouldinHeroku
 
Deliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step FunctionsDeliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step FunctionsDaniel Zivkovic
 
Why Agile Works But Isn't Working For You
Why Agile Works But Isn't Working For YouWhy Agile Works But Isn't Working For You
Why Agile Works But Isn't Working For YouDavid Harvey
 
Microservies Vienna - Lost in transactions
Microservies Vienna - Lost in transactionsMicroservies Vienna - Lost in transactions
Microservies Vienna - Lost in transactionsNiallDeehan
 
Patterns and Practices for Building Resilient Serverless Applications
Patterns and Practices for Building Resilient Serverless ApplicationsPatterns and Practices for Building Resilient Serverless Applications
Patterns and Practices for Building Resilient Serverless ApplicationsYan Cui
 
Patterns and practices for building resilient serverless applications
Patterns and practices for building resilient serverless applicationsPatterns and practices for building resilient serverless applications
Patterns and practices for building resilient serverless applicationsYan Cui
 
Essential ingredients for real time stream processing @Scale by Kartik pParam...
Essential ingredients for real time stream processing @Scale by Kartik pParam...Essential ingredients for real time stream processing @Scale by Kartik pParam...
Essential ingredients for real time stream processing @Scale by Kartik pParam...Big Data Spain
 

Similaire à Simplifying Distributed Transactions with Sagas in Kafka (Stephen Zoio, Simple Machines) Kafka Summit London 2019 (20)

Socket applications
Socket applicationsSocket applications
Socket applications
 
#u-wardley-mapping Wardley Maps: practical session - 2 hour
#u-wardley-mapping Wardley Maps: practical session - 2 hour#u-wardley-mapping Wardley Maps: practical session - 2 hour
#u-wardley-mapping Wardley Maps: practical session - 2 hour
 
OSDC 2019 | The Benefits of Orchestration in Distributed Systems by Niall Deehan
OSDC 2019 | The Benefits of Orchestration in Distributed Systems by Niall DeehanOSDC 2019 | The Benefits of Orchestration in Distributed Systems by Niall Deehan
OSDC 2019 | The Benefits of Orchestration in Distributed Systems by Niall Deehan
 
A dive into akka streams: from the basics to a real-world scenario
A dive into akka streams: from the basics to a real-world scenarioA dive into akka streams: from the basics to a real-world scenario
A dive into akka streams: from the basics to a real-world scenario
 
Creating Custom Actions in SharePoint 2010
Creating Custom Actions in SharePoint 2010Creating Custom Actions in SharePoint 2010
Creating Custom Actions in SharePoint 2010
 
Geoff Varosky: Creating Custom Actions in SharePoint 2010
Geoff Varosky: Creating Custom Actions in SharePoint 2010Geoff Varosky: Creating Custom Actions in SharePoint 2010
Geoff Varosky: Creating Custom Actions in SharePoint 2010
 
RH_QCon_Preso_v3_compressed.pptx
RH_QCon_Preso_v3_compressed.pptxRH_QCon_Preso_v3_compressed.pptx
RH_QCon_Preso_v3_compressed.pptx
 
Abusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and ProfitAbusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and Profit
 
A reviravolta do desenvolvimento web
A reviravolta do desenvolvimento webA reviravolta do desenvolvimento web
A reviravolta do desenvolvimento web
 
SAP Workflow Po create workflow by pavan golesar
SAP Workflow Po create workflow by pavan golesarSAP Workflow Po create workflow by pavan golesar
SAP Workflow Po create workflow by pavan golesar
 
JCon Live 2023 - Lice coding some integration problems
JCon Live 2023 - Lice coding some integration problemsJCon Live 2023 - Lice coding some integration problems
JCon Live 2023 - Lice coding some integration problems
 
Kafka Summit SF 2017 - Riot's Journey to Global Kafka Aggregation
Kafka Summit SF 2017 - Riot's Journey to Global Kafka AggregationKafka Summit SF 2017 - Riot's Journey to Global Kafka Aggregation
Kafka Summit SF 2017 - Riot's Journey to Global Kafka Aggregation
 
Case study: Carleton University – managing 600+ single installs
Case study: Carleton University – managing 600+ single installsCase study: Carleton University – managing 600+ single installs
Case study: Carleton University – managing 600+ single installs
 
Heroku 101 py con 2015 - David Gouldin
Heroku 101   py con 2015 - David GouldinHeroku 101   py con 2015 - David Gouldin
Heroku 101 py con 2015 - David Gouldin
 
Deliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step FunctionsDeliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step Functions
 
Why Agile Works But Isn't Working For You
Why Agile Works But Isn't Working For YouWhy Agile Works But Isn't Working For You
Why Agile Works But Isn't Working For You
 
Microservies Vienna - Lost in transactions
Microservies Vienna - Lost in transactionsMicroservies Vienna - Lost in transactions
Microservies Vienna - Lost in transactions
 
Patterns and Practices for Building Resilient Serverless Applications
Patterns and Practices for Building Resilient Serverless ApplicationsPatterns and Practices for Building Resilient Serverless Applications
Patterns and Practices for Building Resilient Serverless Applications
 
Patterns and practices for building resilient serverless applications
Patterns and practices for building resilient serverless applicationsPatterns and practices for building resilient serverless applications
Patterns and practices for building resilient serverless applications
 
Essential ingredients for real time stream processing @Scale by Kartik pParam...
Essential ingredients for real time stream processing @Scale by Kartik pParam...Essential ingredients for real time stream processing @Scale by Kartik pParam...
Essential ingredients for real time stream processing @Scale by Kartik pParam...
 

Plus de confluent

Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flinkconfluent
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsconfluent
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flinkconfluent
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...confluent
 
AWS Immersion Day Mapfre - Confluent
AWS Immersion Day Mapfre   -   ConfluentAWS Immersion Day Mapfre   -   Confluent
AWS Immersion Day Mapfre - Confluentconfluent
 
Eventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkEventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkconfluent
 
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloudconfluent
 
Citi TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Diveconfluent
 
Build real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with ConfluentBuild real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with Confluentconfluent
 
Q&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service MeshQ&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service Meshconfluent
 
Citi Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka MicroservicesCiti Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka Microservicesconfluent
 
Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3confluent
 
Citi Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging ModernizationCiti Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging Modernizationconfluent
 
Citi Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataCiti Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataconfluent
 
Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2confluent
 
Data In Motion Paris 2023
Data In Motion Paris 2023Data In Motion Paris 2023
Data In Motion Paris 2023confluent
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesisconfluent
 
The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023confluent
 
The Playful Bond Between REST And Data Streams
The Playful Bond Between REST And Data StreamsThe Playful Bond Between REST And Data Streams
The Playful Bond Between REST And Data Streamsconfluent
 

Plus de confluent (20)

Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flink
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flink
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
 
AWS Immersion Day Mapfre - Confluent
AWS Immersion Day Mapfre   -   ConfluentAWS Immersion Day Mapfre   -   Confluent
AWS Immersion Day Mapfre - Confluent
 
Eventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkEventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalk
 
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
 
Citi TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
 
Build real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with ConfluentBuild real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with Confluent
 
Q&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service MeshQ&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service Mesh
 
Citi Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka MicroservicesCiti Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka Microservices
 
Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3
 
Citi Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging ModernizationCiti Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging Modernization
 
Citi Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataCiti Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time data
 
Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2
 
Data In Motion Paris 2023
Data In Motion Paris 2023Data In Motion Paris 2023
Data In Motion Paris 2023
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesis
 
The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023
 
The Playful Bond Between REST And Data Streams
The Playful Bond Between REST And Data StreamsThe Playful Bond Between REST And Data Streams
The Playful Bond Between REST And Data Streams
 

Dernier

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Dernier (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Simplifying Distributed Transactions with Sagas in Kafka (Stephen Zoio, Simple Machines) Kafka Summit London 2019

  • 1. SIMPLE MACHINES Sagas in Kafka SAGAS IN KAFKA !1 Stephen Zoio — Principal Consultant
  • 2. SIMPLE MACHINES SAGAS IN KAFKA !2 Journey to Sagas Coordinating microservices Sagas Kafka as a database Events A protocol for distributed and long running transactions
  • 3. SIMPLE MACHINES SAGAS IN KAFKA !3 Microservice Transactions www. Flight Booking Hotel Booking Car Rental Payment Trips ?
  • 4. SIMPLE MACHINES SAGAS IN KAFKA !4 Two Phase Commit www. Flight Booking Hotel Booking Car Rental Payment Trips Prepare Response Confirm Acknowledgement • Too strict • Too slow • Too complex Not that popular in practice…
  • 5. SIMPLE MACHINES SAGAS IN KAFKA !5 Saga Transaction www. Flight Booking Hotel Booking Car Rental Payment Trips Action Success Response • Much simpler protocol • Minimises latency and comms • Services don’t need to care about sagas
  • 6. SIMPLE MACHINES SAGAS IN KAFKA !6 Saga Failure www. Flight Booking Hotel Booking Car Rental Payment Trips Action Success Response Compensation Failure work backwards, executing compensating actions Compensation Response
  • 7. SIMPLE MACHINES SAGAS IN KAFKA !7 Saga Data Consistency SQL Database A Atomicity C Consistency I Isolation D Durability Sagas A Atomicity C Consistency I Isolation D Durability We give up isolation, but we can live without it…
  • 8. SIMPLE MACHINES SAGAS IN KAFKA !8 Kafka and Event Sourcing Kafka as a database? Event sourcing Event processingKafka Events WHY NOT STORE THE DATA LIKE WE USE IT? WE’RE ALREADY USING KAFKA FOR MESSAGING
  • 9. SIMPLE MACHINES SAGAS IN KAFKA !9 Event Log Consistency e.g. Bank Account Events Simple Sourcing • Balance always positive • Account never debited twice Taking advantage of • Kafka exactly once processing • Per topic-partition ordering guarantee
  • 10. An API to support these consistency requirements
  • 11. SIMPLE MACHINES SAGAS IN KAFKA !11 Simple Sourcing Concepts Type Represents Example C Command Intent debit Bob’s account $100 E Event Outcome Bob’s account debited $100 A Aggregate State Bob’s account balance=$700, available=$650 K Key Identity Bob’s account number Based on CQRS (Command query responsibility segregation)
  • 12. SIMPLE MACHINES SAGAS IN KAFKA !12 Simple Sourcing Data Flow Kafka Command request Aggregate state Command response Event Bob’s balance >$100? Debit Bob’s account $100 Return Success Publish event AccountDebited(bob, 100) Return error response Debit Bob’s account $100 Yes No Everything happens in a single atomic transaction
  • 13. SIMPLE MACHINES SAGAS IN KAFKA !13 Simple Sourcing Programming Model In Scala types (Command, Aggregate) => Either[Error, List[Event]] (Event, Aggregate) => Aggregate Key => Aggregate COMMAND HANDLER EVENT AGGREGATOR INITIAL VALUE
  • 14. SIMPLE MACHINES SAGAS IN KAFKA !14 Event Sourced Apps Coordinating between aggregates: Bike auction scenario Account Aggregate Key Total Reserved Bob’s a/c 400 200 Charlie’s a/c 500 – Auction Aggregate Key Bidder Amount Bicycle Bob 200 Reserve Charlie’s account $250 Bid $250 for Charlie Release $200 for Bob $200 Current bid: Bob $200 Bob $250 Next bid: Charlie $250 Charlie 250 Auction Aggregate Key Bidder Amount Bicycle Charlie 250 –
  • 15. SIMPLE MACHINES SAGAS IN KAFKA !15 Auction App Coordinating between aggregates Charlie $250 Account Aggregate Key Total Reserved Bob’s a/c 400 – Charlie’s a/c 500 Alice’s a/c 500 Auction Aggregate Key Bidder Amount Bicycle Charlie 250 Reserve Bob’s account $300 Bid $300 for Bob Undo Bob’s reservation Reserve Alice’s account $350 Bid $350 for Alice Release $250 for Charlie Charlie has the current best bid of $250 Bob $300 Bob bid’s again, this time $300 Alice $350 Meanwhile Alice arrives and bids $350 300 350 300 350Alice Sagas are suitable for synchronising between multiple aggregates in an event sourced application - -250
  • 16. SIMPLE MACHINES SAGAS IN KAFKA !16 Representing Sagas A stateful directed acyclic graph (DAG) a undo A b c undo C d undo D e a undo A Saga actions Undo (compensation) actions
  • 17. SIMPLE MACHINES SAGAS IN KAFKA !17 Representing Sagas Auction bid saga reserve account cancel reservation bid on auction cancel previous reservation
  • 18. SIMPLE MACHINES (Event, Aggregate) => Aggregate (Command, Aggregate) => Either[Error, List[Event]] Key => Aggregate COMMAND HANDLER EVENT AGGREGATOR INITIAL VALUE (_, _) => true (_, aggregate) => if (aggregate) Error("email taken") else List(EventClaimed) _ => false SAGAS IN KAFKA !18 Useful Patterns Enforcing uniqueness Claim Email Type Example C Command claim email address, rejects command if aggregate is set A Aggregate either true or false K Key email address *Each user must have a unique email Claim email address: bob@xyz.com Create user with email address: bob@xyz.com Claim email Create user release email
  • 19. SIMPLE MACHINES SAGAS IN KAFKA !19 Useful Patterns Pessimistic lock Claim lock Perform action on resource Release lock Claim lock Create user release lock Create userDo actions Release lock
  • 20. SIMPLE MACHINES SAGAS IN KAFKA !20 Saga State a undo A b c undo C d undo D e Pending In progress Completed Failed N/A • Saga state (in progress, in failure) • Action state (pending, in progress) • The actions themselves (for dynamic actions) a undo A b c undo C d undo D e a undo A b c undo C d undo D e a undo A b c undo C d undo D e a undo A b c undo C d undo D e a undo A b c undo C d undo D e a undo A b c undo C d undo D e a undo A b c undo C d undo D e a undo A b c undo C d undo D e a undo A b c undo C d undo D e
  • 21. SIMPLE MACHINES SAGAS IN KAFKA !21 Saga State a undo A b c undo C d undo D e Pending In progress Completed Failed N/A Failure mode saga into switches into undo mode a undo A b c undo C d undo D e undo A b undo C undo D undo E undo A b undo C undo D undo E undo A b undo C undo D undo E undo A b undo C undo D undo E undo A b undo C undo D undo E
  • 22. SIMPLE MACHINES SAGAS IN KAFKA !22 Saga DSL Scala DSL loosely based on Akka Streams a b c a ~> b ~> c
  • 23. SIMPLE MACHINES SAGAS IN KAFKA !23 Saga DSL with undo (compensation) actions a ~> b.withUndo(undoB) ~> c a b c undo B
  • 24. SIMPLE MACHINES SAGAS IN KAFKA !24 Saga DSL parallel execution a undo A b c undo C d undo D e a.withUndo(undoA) ~> parallel(b, c.withUndo(undoC)) ~> d.withUndo(undoD) ~> e
  • 25. SIMPLE MACHINES SAGAS IN KAFKA !25 Saga DSL These are all equivalent: (a ~> b ~> c) ~> d ~> e a ~> (b ~> c ~> d) ~> e a ~> List(b, c, d).inSeries ~> e (a ~> b) ~> c ~> (d ~> e) ~> is associative This enables a building block approach to constructing sagas
  • 26. SIMPLE MACHINES SAGAS IN KAFKA !26 Simple Sagas A simple Kafka-based Sagas framework Saga coordinator Action processors Client
  • 27. SIMPLE MACHINES SAGAS IN KAFKA !27 Saga Coordinator Saga request Saga response Action request Action response Saga coordinator { "sagaId": 12, "actions": [ {"actionId": 1, "command": "BookFlight(...)"}, {"actionId": 2, "command": "BookCar(...)"} ], "dependencies": {"2": [1], "4": [2, 3]} } { "sagaId": 12, "success": true } { "actionId": 1, "command": "BookFlight(...)"} } { "actionId": 1, "success": true }
  • 28. SIMPLE MACHINES SAGAS IN KAFKA !28 Saga Coordinator Saga request Saga(A, B, C, D, E) Saga state transition Start(saga=Saga(A, B, C, D, E)) ActionStarted(action=A) ActionFinished(action=A) ActionStarted(action=B,C) ActionFinished(action=C) Saga state Saga(A, B, C, D, E) Saga(A=started, B, C, D, E) Saga(A=finished, B, C, D, E) Saga(A=finished, B=started, C=started,..) Saga(A=finished, B=finished, C=started,..) Saga Saga Client Saga request Saga response Saga state transition Aggregate state Event processor Saga state machine Action request Action response Action processor Saga coordinator
  • 29. SIMPLE MACHINES SAGAS IN KAFKA !29 Saga Coordinator Apps Application main method SagaApp<SpecificRecord> sagaApp = SagaApp.of( sagaSpec, actionSpec, topicBuilder -> topicBuilder.withTopicPrefix("saga-")); sagaApp.withActions( "account_action", "auction_action", "payment_action"); sagaApp.run(properties);
  • 30. SIMPLE MACHINES SAGAS IN KAFKA !30 Action Processor { "sagaId": 1, "commandId": 34, "command": "BookFlight(...)", "actionType": "book_flight" } { "sagaId": 1, "commandId": 34, "success": true, "undo": { "command": "CancelFlight(...)", "actionType": "cancel_flight" } } Action request Action response Action processor Idempotent effect Use the built in ones, or roll your own ?
  • 31. SIMPLE MACHINES SAGAS IN KAFKA !31 Event Sourcing Action Processor Action request Key Value Saga ID DebitAccount(amount=100) Saga Coordinator Command processor Event Aggregator Action request Simple Sourcing Command request Aggregate state Event Action response Command request Key Value Bob’s a/c DebitAccount(amount=100) Event Key Value Bob’s a/c DebitAccount(amount=100) Aggregate state Key Value Bob’s a/c Account(balance=500) Bob’s a/c DebitAccount(amount=100) Command response Key Value Bob’s a/c DebitAccount(amount=100) Action response Key Value Bob’s a/c DebitAccount(amount=100) Command response Event sourcing action processor saga-long per-aggregate consistency guarantee
  • 32. SIMPLE MACHINES SAGAS IN KAFKA !32 Async Action Processor Action request Key Value Saga id ThirdPartyPayment(amount=50) Saga Coordinator Action request Action response Async output Key Value ? Payment(token=XXX) Action response Key Value Saga id Response(success=true, undoCommand=CancelPayment(X XX)) Action output Async action processor Microservice { "success": true, “booking_reference": “XXX" } Callback Async / http invoke undo actions can also be defined dynamically from web service result update saga with new undo action
  • 33. SIMPLE MACHINES streamApp .withActionProcessor(EventSourcingBuilder.apply( accountCommandSpec, topicBuilder -> topicBuilder.withTopicPrefix("action-"), topicBuilder -> topicBuilder.withTopicPrefix("command-") .withActionProcessor(EventSourcingBuilder.apply( auctionCommandSpec, topicBuilder -> topicBuilder.withTopicPrefix("action-"), topicBuilder -> topicBuilder.withTopicPrefix("command-") streamApp.run(configProperties); SAGAS IN KAFKA !33 Action Processor Apps EventSourcingSpec<SpecificRecord, AccountCommand, AccountId, AccountCommand> accountCommandSpec = EventSourcingSpec.builder() .actionType("account_action") .aggregateName("account") .decode(a -> Result.success((AccountCommand) a)) .commandMapper(c -> c) .keyMapper(AccountCommand::getId) .sequenceMapper(c -> Sequence.position(c.getSequence())) .timeout(Duration.ofSeconds(30)) .build(); Application main method EventSourcingSpec<SpecificRecord, AuctionCommand, AuctionId, AuctionCommand> auctionCommandSpec = ...;
  • 34. SIMPLE MACHINES SAGAS IN KAFKA !34 Saga Client public interface SagaAPI<A> { FutureResult<SagaError, SagaId> submitSaga(SagaRequest<A> request); FutureResult<SagaError, SagaResponse> getSagaResponse( SagaId requestId, Duration timeout); } submitSaga Saga request Saga response Saga Coordinator getSagaResponse Consumer Private response topic COMPLETES FUTURE client is typically another service, such as a web application
  • 35. SIMPLE MACHINES SAGAS IN KAFKA !35 Deployment Single node Application Instance Saga coordinator Action processor 1 Action processor 2 Kafka broker Kafka broker
  • 36. SIMPLE MACHINES SAGAS IN KAFKA !36 Deployment Application Instance 1 Separate sagas and actions Application Instance 2 Kafka broker Kafka broker Microservice Saga coordinator Action processor 1 (event sourcing) Action processor 2 (event sourcing) Action processor 3 (async)
  • 37. SIMPLE MACHINES Action processors SAGAS IN KAFKA !37 Deployment Saga coordinators Kafka brokers Resilient cluster setup application instance failureapplication instance recovery Kafka broker failureKafka broker recovery
  • 38. SIMPLE MACHINES SAGAS IN KAFKA !38 Saga coordinators Kafka brokers Event Sourcing Hybrid Architectures Async / Http Simple Sourcing Other microservices
  • 39. SIMPLE MACHINES Questions… SAGAS IN KAFKA !39 https://simplesource.io/