SlideShare a Scribd company logo
1 of 22
Download to read offline
BBL Kappa /
CQRS-ES
Architecture
2018-05-16
Cédric Vidal, Quicksign CTO
@cedricvidal
@cedricvidal
@
http://quicksign.com
About Quicksign
QuickSign is the European leader in digital onboarding
for financial services. We provide KYC, OCR and
electronic signatures.
Our offer: customized workflows & OCR driven
back-office interfaces to remove operational burdens
for high volumes B2C contracts.
Currently moving from a monolithic product to a BPMN
orchestrated micro-services Kappa CQRS-ES based
plateform
• Quicksign CTO since January 2014
• Before that tech Lead then CTO at ProxiAD
since 2009
• Co-Organized the Eclipse Day Paris in 2010
and 2011
• Designing enterprise architectures since 2005
• Passionate about tech since I got my first
Macintosh SE in 1987
Architect of the new Quicksign Kappa platform
Who am I ? - Cédric VIDAL
@cedricvidal
@cedricvidal
Kappa Architecture
Kappa Architecture is a software architecture pattern.
Rather than using a relational DB like SQL or a key-value
store like Cassandra, the canonical data store in a Kappa
Architecture system is an append-only immutable log. From
the log, data is streamed through a computational system
and fed into auxiliary stores for serving.
http://www.kappa-architecture.com
Compared to Lambda Architecture ?
http://www.kappa-architecture.com
Kappa Architecture is a simplification of Lambda Architecture. A Kappa
Architecture system is like a Lambda Architecture system with the batch
processing system removed. To replace batch processing, data is simply fed
through the streaming system quickly.
LOG DATA STORES
An append-only immutable log store is the canonical store in a Kappa Architecture (or Lambda
Architecture) system. Some log databases:
• Apache Kafka
• DistributedLog
STREAMING COMPUTATION SYSTEMS
In Kappa Architecture, data is fed from the log store into a streaming computation system. Some
distributed streaming systems:
• Apache Samza
• Apache Storm
• Apache Spark
• Amazon Kinesis
• Kafka Streams
• Kafka KSQL (SQL DSL over Kafka Streams)
• Apache Flink
• Onyx
• Hazelcast Jet
http://www.kappa-architecture.com
What middlewares ?
• Analytics (predictive or not)
• Reporting
• Big data
• IoT
Known users
• Advertising (Criteo)
• ERDF Linky ? (not sure)
Working with numbers, statistics …
… what about business logic ?
Typical use cases and users
General observation
• Works for extremely massive big data use cases
• Should handle easily our CQRS ES based workloads …
Technical details of interest
• Sharding by design: with topic partitions, 1 FD / partition / topic
• RPC like low latency: direct socket to socket connection when
producer and consumer are connected at the same time
• Durability
• Replayability
• Topic replication
Why Kafka ?
Technical details of interest
• No central topology orchestrator
• No need to submit specific stream processors
• a simple static void main which joins the Kafka Stream cluster
• Very natural with the stateless Kubernetes deployment model
• Embedded ephemeral disk based KV Store to persist intermediate
stream states and query stores (Facebook’s RocksDB)
Why Kafka Streams ?
A SQL DSL over Kafka Streams
Generates Kafa Streams topologies
Maintains intermediate state and topics automatically
Gotchas
Very new ! First commit in Sept 2017
But a lot of potential !
A lot of activity in the repos
Already released versions
KSQL
Sept 2017
• Data ingestion
• CDC: Change Data Capture
Plus
• Allows to quickly bootstrap a data ingestion project
Gotchas
• Unlike Kafka Stream, requires to submit the Connect descriptor to the
orchestrator
• The data is RAW and WILL require some post-processing (using Kafka
Streams or KSQL) to make it usable
Kafka Connect
Business logic requires
• ordering
• consistency
amongst other things
=> CQRS (ES)
What about business logic and µS architectures ?
CQRS (ES)
action
Command
evaluation
Event
Event
Event
Aggregation
Root
apply events
on data
Event Store
Aggregation Root
Store
user
direct
modification
Command
Handler
Event
Handler
query
Command Query Responsibility Segregation (Event Sourcing)
Command Query Responsibility Segregation (Event Sourcing)
• Concepts and examples
– The user sends a Command to the application -> (PurgeCaseCommand,
UpdateCaseEtatEnvoiFtpCommand, …)
– The Command is evaluated by a CommandHandler (permissions,
business rules, cohesion, …) which yields (or not) one or many data
mutation Events (CasePurgedEvent, DocumentUploadedEvent, …)
– Each Event is applied by an EventHandler to the AggregationRoot which
is persisted into an auxiliary store for querying
CQRS (ES)
YES!
Kappa and CQRS (ES) a perfect match ?
The quest for CQRS-ES on Kafka
Quest for CQRS-ES on Kafka
• Jan 14 2016: Kafka a perfect fit for Axon ? Me on Axon Google group
http://bit.ly/axon-kafka-fit
• Sept 7 2016: Event sourcing, CQRS, stream processing and Apache Kafka:
What’s the connection? , Neha Narkhede, Confluent CTO
http://bit.ly/kafka-cqrs-es
• Devoxx 2017: Hands-on Kafka Streams, Hayssam Saleh, ebiznext Tech Lead
http://bit.ly/devoxx17-handson-kafka-streams
• all events concerning a given aggregation root must be handled
sequentially (actually a strength as it avoids all concurrency
headaches)
• requires a solid distributed event bus at the center of the
infrastructure
• must support guaranteed delivery and cluster wide sequential
processing of messages of a given message group (ie the
aggregation root)
• at most one delivery or better: idempotent consumers
http://bit.ly/axon-kafka-fit
CQRS-ES Challenges
How the F*** do I query my data ?
Take 1: Model application state as an external datastore
The output from a Kafka Streams topology is written
to an external datastore like a relational
database.
In this view of the world, the event handler is
modelled as a Kafka Streams topology and the
application state is modelled as an external
datastore that the user trusts and operates.
This option for doing CQRS advocates the use of
Kafka Streams to model just the event handler,
leaving the application state to live in an external
data store that is the final output of the Kafka
Streams topology.
Event sourcing, CQRS, stream processing and Apache Kafka: What’s the connection? , Neha Narkhede, Confluent CTO
http://bit.ly/kafka-cqrs-es
Kafka Streams also provides an efficient way to
model the application state — it supports local,
partitioned and durable state out-of-the-box.
This local state can be a RocksDB store, or simply,
an in-memory hashmap.
The way this works is that every instance of an
application which embeds the Kafka Streams library
to do stateful stream processing, hosts a subset of
the application’s state, modeled as shards or
partitions of the state store.
The state store is partitioned the same way as the
application’s key space. As a result, all the data
required to serve the queries that arrive at a
particular application instance are available locally
in the state store shards.
How the F*** do I query my data ?
Take 2: Model application state as local state in Kafka Streams
Fault tolerance for this local state store is provided by Kafka Streams by logging all updates
made to the state store, transparently, to a highly-available and durable Kafka topic. So if an
application instance dies and the local state store shards it hosted are lost, Kafka Streams can
recreate state store shards by simply reading from the highly-available Kafka topic and refilling
the data in the state store.
Event sourcing, CQRS, stream processing and Apache Kafka: What’s the connection? , Neha Narkhede, Confluent CTO
http://bit.ly/kafka-cqrs-es
How the F*** do I query my data ?
Interactive Queries
● state in Kafka Streams is sharded
● we don’t control on which nodes the data is hosted
● Kafka Streams exposes the information
● Try randomly a node, if available on it, read data and return it
● otherwise, forward request to the appropriate node and return it
● The forwarding mecanism is up to the application
○ REST server side forwarding
○ REST client side forwarding (using some error code)
Event Storming
How to design your domain with Kappa/CQRS-ES ?
Event storming is a workshop-based method to quickly find out
what is happening in the domain of a software program.[1]
The business process is "stormed out" as a series of domain
events which are denoted as orange stickies
Invented by Alberto Brandolini in the context of domain-driven
design.
Event Storming can be used as a means for business process
modelling and requirements engineering.
The basic idea is to bring together software developers and
domain experts and learn from each other.
https://en.wikipedia.org/wiki/Event_storming
Des questions ?
@cedricvidal
@cedricvidal

More Related Content

Similar to BBL KAPPA Lesfurets.com

Connecting kafka message systems with scylla
Connecting kafka message systems with scylla   Connecting kafka message systems with scylla
Connecting kafka message systems with scylla Maheedhar Gunturu
 
Kafka Streams for Java enthusiasts
Kafka Streams for Java enthusiastsKafka Streams for Java enthusiasts
Kafka Streams for Java enthusiastsSlim Baltagi
 
Introducing Kafka's Streams API
Introducing Kafka's Streams APIIntroducing Kafka's Streams API
Introducing Kafka's Streams APIconfluent
 
Applying ML on your Data in Motion with AWS and Confluent | Joseph Morais, Co...
Applying ML on your Data in Motion with AWS and Confluent | Joseph Morais, Co...Applying ML on your Data in Motion with AWS and Confluent | Joseph Morais, Co...
Applying ML on your Data in Motion with AWS and Confluent | Joseph Morais, Co...HostedbyConfluent
 
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...StreamNative
 
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...DataStax Academy
 
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...Kai Wähner
 
Streaming with Spring Cloud Stream and Apache Kafka - Soby Chacko
Streaming with Spring Cloud Stream and Apache Kafka - Soby ChackoStreaming with Spring Cloud Stream and Apache Kafka - Soby Chacko
Streaming with Spring Cloud Stream and Apache Kafka - Soby ChackoVMware Tanzu
 
Scala in increasingly demanding environments - DATABIZ
Scala in increasingly demanding environments - DATABIZScala in increasingly demanding environments - DATABIZ
Scala in increasingly demanding environments - DATABIZDATABIZit
 
Confluent Kafka and KSQL: Streaming Data Pipelines Made Easy
Confluent Kafka and KSQL: Streaming Data Pipelines Made EasyConfluent Kafka and KSQL: Streaming Data Pipelines Made Easy
Confluent Kafka and KSQL: Streaming Data Pipelines Made EasyKairo Tavares
 
Stefano Rocco, Roberto Bentivoglio - Scala in increasingly demanding environm...
Stefano Rocco, Roberto Bentivoglio - Scala in increasingly demanding environm...Stefano Rocco, Roberto Bentivoglio - Scala in increasingly demanding environm...
Stefano Rocco, Roberto Bentivoglio - Scala in increasingly demanding environm...Scala Italy
 
Kafka Streams: The Stream Processing Engine of Apache Kafka
Kafka Streams: The Stream Processing Engine of Apache KafkaKafka Streams: The Stream Processing Engine of Apache Kafka
Kafka Streams: The Stream Processing Engine of Apache KafkaEno Thereska
 
Apache Big Data Europe 2015: Selected Talks
Apache Big Data Europe 2015: Selected TalksApache Big Data Europe 2015: Selected Talks
Apache Big Data Europe 2015: Selected TalksAndrii Gakhov
 
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion Dubai
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion DubaiSMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion Dubai
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion DubaiCodemotion Dubai
 
Streaming Analytics with Spark, Kafka, Cassandra and Akka
Streaming Analytics with Spark, Kafka, Cassandra and AkkaStreaming Analytics with Spark, Kafka, Cassandra and Akka
Streaming Analytics with Spark, Kafka, Cassandra and AkkaHelena Edelson
 
Apache Kafka Use Cases_ When To Use It_ When Not To Use_.pdf
Apache Kafka Use Cases_ When To Use It_ When Not To Use_.pdfApache Kafka Use Cases_ When To Use It_ When Not To Use_.pdf
Apache Kafka Use Cases_ When To Use It_ When Not To Use_.pdfNoman Shaikh
 
Using the SDACK Architecture to Build a Big Data Product
Using the SDACK Architecture to Build a Big Data ProductUsing the SDACK Architecture to Build a Big Data Product
Using the SDACK Architecture to Build a Big Data ProductEvans Ye
 
Event Streaming Architectures with Confluent and ScyllaDB
Event Streaming Architectures with Confluent and ScyllaDBEvent Streaming Architectures with Confluent and ScyllaDB
Event Streaming Architectures with Confluent and ScyllaDBScyllaDB
 
Introduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matterIntroduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matterPaolo Castagna
 

Similar to BBL KAPPA Lesfurets.com (20)

Connecting kafka message systems with scylla
Connecting kafka message systems with scylla   Connecting kafka message systems with scylla
Connecting kafka message systems with scylla
 
Kafka Streams for Java enthusiasts
Kafka Streams for Java enthusiastsKafka Streams for Java enthusiasts
Kafka Streams for Java enthusiasts
 
Introducing Kafka's Streams API
Introducing Kafka's Streams APIIntroducing Kafka's Streams API
Introducing Kafka's Streams API
 
Applying ML on your Data in Motion with AWS and Confluent | Joseph Morais, Co...
Applying ML on your Data in Motion with AWS and Confluent | Joseph Morais, Co...Applying ML on your Data in Motion with AWS and Confluent | Joseph Morais, Co...
Applying ML on your Data in Motion with AWS and Confluent | Joseph Morais, Co...
 
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
 
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
 
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
 
Streaming with Spring Cloud Stream and Apache Kafka - Soby Chacko
Streaming with Spring Cloud Stream and Apache Kafka - Soby ChackoStreaming with Spring Cloud Stream and Apache Kafka - Soby Chacko
Streaming with Spring Cloud Stream and Apache Kafka - Soby Chacko
 
Scala in increasingly demanding environments - DATABIZ
Scala in increasingly demanding environments - DATABIZScala in increasingly demanding environments - DATABIZ
Scala in increasingly demanding environments - DATABIZ
 
Confluent Kafka and KSQL: Streaming Data Pipelines Made Easy
Confluent Kafka and KSQL: Streaming Data Pipelines Made EasyConfluent Kafka and KSQL: Streaming Data Pipelines Made Easy
Confluent Kafka and KSQL: Streaming Data Pipelines Made Easy
 
Stefano Rocco, Roberto Bentivoglio - Scala in increasingly demanding environm...
Stefano Rocco, Roberto Bentivoglio - Scala in increasingly demanding environm...Stefano Rocco, Roberto Bentivoglio - Scala in increasingly demanding environm...
Stefano Rocco, Roberto Bentivoglio - Scala in increasingly demanding environm...
 
Kafka Streams: The Stream Processing Engine of Apache Kafka
Kafka Streams: The Stream Processing Engine of Apache KafkaKafka Streams: The Stream Processing Engine of Apache Kafka
Kafka Streams: The Stream Processing Engine of Apache Kafka
 
Kafka presentation
Kafka presentationKafka presentation
Kafka presentation
 
Apache Big Data Europe 2015: Selected Talks
Apache Big Data Europe 2015: Selected TalksApache Big Data Europe 2015: Selected Talks
Apache Big Data Europe 2015: Selected Talks
 
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion Dubai
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion DubaiSMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion Dubai
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion Dubai
 
Streaming Analytics with Spark, Kafka, Cassandra and Akka
Streaming Analytics with Spark, Kafka, Cassandra and AkkaStreaming Analytics with Spark, Kafka, Cassandra and Akka
Streaming Analytics with Spark, Kafka, Cassandra and Akka
 
Apache Kafka Use Cases_ When To Use It_ When Not To Use_.pdf
Apache Kafka Use Cases_ When To Use It_ When Not To Use_.pdfApache Kafka Use Cases_ When To Use It_ When Not To Use_.pdf
Apache Kafka Use Cases_ When To Use It_ When Not To Use_.pdf
 
Using the SDACK Architecture to Build a Big Data Product
Using the SDACK Architecture to Build a Big Data ProductUsing the SDACK Architecture to Build a Big Data Product
Using the SDACK Architecture to Build a Big Data Product
 
Event Streaming Architectures with Confluent and ScyllaDB
Event Streaming Architectures with Confluent and ScyllaDBEvent Streaming Architectures with Confluent and ScyllaDB
Event Streaming Architectures with Confluent and ScyllaDB
 
Introduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matterIntroduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matter
 

More from Cedric Vidal

Camunda Days 2018 Building a digital on-boarding microservices platform using...
Camunda Days 2018 Building a digital on-boarding microservices platform using...Camunda Days 2018 Building a digital on-boarding microservices platform using...
Camunda Days 2018 Building a digital on-boarding microservices platform using...Cedric Vidal
 
Kubernetes and Gitops at Quicksign - Koncrete Kube Oct 2018
Kubernetes and Gitops at Quicksign - Koncrete Kube Oct 2018Kubernetes and Gitops at Quicksign - Koncrete Kube Oct 2018
Kubernetes and Gitops at Quicksign - Koncrete Kube Oct 2018Cedric Vidal
 
AgileTour Strasbourg 2011 BDD with jBehave
AgileTour Strasbourg 2011 BDD with jBehaveAgileTour Strasbourg 2011 BDD with jBehave
AgileTour Strasbourg 2011 BDD with jBehaveCedric Vidal
 
Rethinking Quicksign's Digital Onboarding - Confluent Streaming Days Paris
Rethinking Quicksign's Digital Onboarding - Confluent Streaming Days ParisRethinking Quicksign's Digital Onboarding - Confluent Streaming Days Paris
Rethinking Quicksign's Digital Onboarding - Confluent Streaming Days ParisCedric Vidal
 
Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed micros...
Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed micros...Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed micros...
Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed micros...Cedric Vidal
 
Eclipse Day Paris 2010 - ProxiAD - Cedric Vidal - 1.0
Eclipse Day Paris 2010 - ProxiAD - Cedric Vidal - 1.0Eclipse Day Paris 2010 - ProxiAD - Cedric Vidal - 1.0
Eclipse Day Paris 2010 - ProxiAD - Cedric Vidal - 1.0Cedric Vidal
 
MD Day 2009 - Cédric Vidal - 1.0
MD Day 2009 - Cédric Vidal - 1.0MD Day 2009 - Cédric Vidal - 1.0
MD Day 2009 - Cédric Vidal - 1.0Cedric Vidal
 
RMLL - Eclipse Acceleo Day - MDSD Scaffolding and Acceleo - Cédric Vidal - 1.1
RMLL - Eclipse Acceleo Day - MDSD Scaffolding and Acceleo - Cédric Vidal - 1.1RMLL - Eclipse Acceleo Day - MDSD Scaffolding and Acceleo - Cédric Vidal - 1.1
RMLL - Eclipse Acceleo Day - MDSD Scaffolding and Acceleo - Cédric Vidal - 1.1Cedric Vidal
 
Scaffolding MDSD par l’exemple - 1.0
Scaffolding MDSD par l’exemple - 1.0Scaffolding MDSD par l’exemple - 1.0
Scaffolding MDSD par l’exemple - 1.0Cedric Vidal
 

More from Cedric Vidal (11)

Camunda Days 2018 Building a digital on-boarding microservices platform using...
Camunda Days 2018 Building a digital on-boarding microservices platform using...Camunda Days 2018 Building a digital on-boarding microservices platform using...
Camunda Days 2018 Building a digital on-boarding microservices platform using...
 
Kubernetes and Gitops at Quicksign - Koncrete Kube Oct 2018
Kubernetes and Gitops at Quicksign - Koncrete Kube Oct 2018Kubernetes and Gitops at Quicksign - Koncrete Kube Oct 2018
Kubernetes and Gitops at Quicksign - Koncrete Kube Oct 2018
 
AgileTour Strasbourg 2011 BDD with jBehave
AgileTour Strasbourg 2011 BDD with jBehaveAgileTour Strasbourg 2011 BDD with jBehave
AgileTour Strasbourg 2011 BDD with jBehave
 
EMF Customizer
EMF CustomizerEMF Customizer
EMF Customizer
 
Rethinking Quicksign's Digital Onboarding - Confluent Streaming Days Paris
Rethinking Quicksign's Digital Onboarding - Confluent Streaming Days ParisRethinking Quicksign's Digital Onboarding - Confluent Streaming Days Paris
Rethinking Quicksign's Digital Onboarding - Confluent Streaming Days Paris
 
Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed micros...
Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed micros...Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed micros...
Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed micros...
 
EMF Scaffolding
EMF ScaffoldingEMF Scaffolding
EMF Scaffolding
 
Eclipse Day Paris 2010 - ProxiAD - Cedric Vidal - 1.0
Eclipse Day Paris 2010 - ProxiAD - Cedric Vidal - 1.0Eclipse Day Paris 2010 - ProxiAD - Cedric Vidal - 1.0
Eclipse Day Paris 2010 - ProxiAD - Cedric Vidal - 1.0
 
MD Day 2009 - Cédric Vidal - 1.0
MD Day 2009 - Cédric Vidal - 1.0MD Day 2009 - Cédric Vidal - 1.0
MD Day 2009 - Cédric Vidal - 1.0
 
RMLL - Eclipse Acceleo Day - MDSD Scaffolding and Acceleo - Cédric Vidal - 1.1
RMLL - Eclipse Acceleo Day - MDSD Scaffolding and Acceleo - Cédric Vidal - 1.1RMLL - Eclipse Acceleo Day - MDSD Scaffolding and Acceleo - Cédric Vidal - 1.1
RMLL - Eclipse Acceleo Day - MDSD Scaffolding and Acceleo - Cédric Vidal - 1.1
 
Scaffolding MDSD par l’exemple - 1.0
Scaffolding MDSD par l’exemple - 1.0Scaffolding MDSD par l’exemple - 1.0
Scaffolding MDSD par l’exemple - 1.0
 

Recently uploaded

University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 

Recently uploaded (20)

University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 

BBL KAPPA Lesfurets.com

  • 1. BBL Kappa / CQRS-ES Architecture 2018-05-16 Cédric Vidal, Quicksign CTO @cedricvidal @cedricvidal @ http://quicksign.com
  • 2. About Quicksign QuickSign is the European leader in digital onboarding for financial services. We provide KYC, OCR and electronic signatures. Our offer: customized workflows & OCR driven back-office interfaces to remove operational burdens for high volumes B2C contracts. Currently moving from a monolithic product to a BPMN orchestrated micro-services Kappa CQRS-ES based plateform
  • 3. • Quicksign CTO since January 2014 • Before that tech Lead then CTO at ProxiAD since 2009 • Co-Organized the Eclipse Day Paris in 2010 and 2011 • Designing enterprise architectures since 2005 • Passionate about tech since I got my first Macintosh SE in 1987 Architect of the new Quicksign Kappa platform Who am I ? - Cédric VIDAL @cedricvidal @cedricvidal
  • 4. Kappa Architecture Kappa Architecture is a software architecture pattern. Rather than using a relational DB like SQL or a key-value store like Cassandra, the canonical data store in a Kappa Architecture system is an append-only immutable log. From the log, data is streamed through a computational system and fed into auxiliary stores for serving. http://www.kappa-architecture.com
  • 5. Compared to Lambda Architecture ? http://www.kappa-architecture.com Kappa Architecture is a simplification of Lambda Architecture. A Kappa Architecture system is like a Lambda Architecture system with the batch processing system removed. To replace batch processing, data is simply fed through the streaming system quickly.
  • 6. LOG DATA STORES An append-only immutable log store is the canonical store in a Kappa Architecture (or Lambda Architecture) system. Some log databases: • Apache Kafka • DistributedLog STREAMING COMPUTATION SYSTEMS In Kappa Architecture, data is fed from the log store into a streaming computation system. Some distributed streaming systems: • Apache Samza • Apache Storm • Apache Spark • Amazon Kinesis • Kafka Streams • Kafka KSQL (SQL DSL over Kafka Streams) • Apache Flink • Onyx • Hazelcast Jet http://www.kappa-architecture.com What middlewares ?
  • 7. • Analytics (predictive or not) • Reporting • Big data • IoT Known users • Advertising (Criteo) • ERDF Linky ? (not sure) Working with numbers, statistics … … what about business logic ? Typical use cases and users
  • 8. General observation • Works for extremely massive big data use cases • Should handle easily our CQRS ES based workloads … Technical details of interest • Sharding by design: with topic partitions, 1 FD / partition / topic • RPC like low latency: direct socket to socket connection when producer and consumer are connected at the same time • Durability • Replayability • Topic replication Why Kafka ?
  • 9. Technical details of interest • No central topology orchestrator • No need to submit specific stream processors • a simple static void main which joins the Kafka Stream cluster • Very natural with the stateless Kubernetes deployment model • Embedded ephemeral disk based KV Store to persist intermediate stream states and query stores (Facebook’s RocksDB) Why Kafka Streams ?
  • 10. A SQL DSL over Kafka Streams Generates Kafa Streams topologies Maintains intermediate state and topics automatically Gotchas Very new ! First commit in Sept 2017 But a lot of potential ! A lot of activity in the repos Already released versions KSQL Sept 2017
  • 11. • Data ingestion • CDC: Change Data Capture Plus • Allows to quickly bootstrap a data ingestion project Gotchas • Unlike Kafka Stream, requires to submit the Connect descriptor to the orchestrator • The data is RAW and WILL require some post-processing (using Kafka Streams or KSQL) to make it usable Kafka Connect
  • 12. Business logic requires • ordering • consistency amongst other things => CQRS (ES) What about business logic and µS architectures ?
  • 13. CQRS (ES) action Command evaluation Event Event Event Aggregation Root apply events on data Event Store Aggregation Root Store user direct modification Command Handler Event Handler query Command Query Responsibility Segregation (Event Sourcing)
  • 14. Command Query Responsibility Segregation (Event Sourcing) • Concepts and examples – The user sends a Command to the application -> (PurgeCaseCommand, UpdateCaseEtatEnvoiFtpCommand, …) – The Command is evaluated by a CommandHandler (permissions, business rules, cohesion, …) which yields (or not) one or many data mutation Events (CasePurgedEvent, DocumentUploadedEvent, …) – Each Event is applied by an EventHandler to the AggregationRoot which is persisted into an auxiliary store for querying CQRS (ES)
  • 15. YES! Kappa and CQRS (ES) a perfect match ?
  • 16. The quest for CQRS-ES on Kafka Quest for CQRS-ES on Kafka • Jan 14 2016: Kafka a perfect fit for Axon ? Me on Axon Google group http://bit.ly/axon-kafka-fit • Sept 7 2016: Event sourcing, CQRS, stream processing and Apache Kafka: What’s the connection? , Neha Narkhede, Confluent CTO http://bit.ly/kafka-cqrs-es • Devoxx 2017: Hands-on Kafka Streams, Hayssam Saleh, ebiznext Tech Lead http://bit.ly/devoxx17-handson-kafka-streams
  • 17. • all events concerning a given aggregation root must be handled sequentially (actually a strength as it avoids all concurrency headaches) • requires a solid distributed event bus at the center of the infrastructure • must support guaranteed delivery and cluster wide sequential processing of messages of a given message group (ie the aggregation root) • at most one delivery or better: idempotent consumers http://bit.ly/axon-kafka-fit CQRS-ES Challenges
  • 18. How the F*** do I query my data ? Take 1: Model application state as an external datastore The output from a Kafka Streams topology is written to an external datastore like a relational database. In this view of the world, the event handler is modelled as a Kafka Streams topology and the application state is modelled as an external datastore that the user trusts and operates. This option for doing CQRS advocates the use of Kafka Streams to model just the event handler, leaving the application state to live in an external data store that is the final output of the Kafka Streams topology. Event sourcing, CQRS, stream processing and Apache Kafka: What’s the connection? , Neha Narkhede, Confluent CTO http://bit.ly/kafka-cqrs-es
  • 19. Kafka Streams also provides an efficient way to model the application state — it supports local, partitioned and durable state out-of-the-box. This local state can be a RocksDB store, or simply, an in-memory hashmap. The way this works is that every instance of an application which embeds the Kafka Streams library to do stateful stream processing, hosts a subset of the application’s state, modeled as shards or partitions of the state store. The state store is partitioned the same way as the application’s key space. As a result, all the data required to serve the queries that arrive at a particular application instance are available locally in the state store shards. How the F*** do I query my data ? Take 2: Model application state as local state in Kafka Streams Fault tolerance for this local state store is provided by Kafka Streams by logging all updates made to the state store, transparently, to a highly-available and durable Kafka topic. So if an application instance dies and the local state store shards it hosted are lost, Kafka Streams can recreate state store shards by simply reading from the highly-available Kafka topic and refilling the data in the state store. Event sourcing, CQRS, stream processing and Apache Kafka: What’s the connection? , Neha Narkhede, Confluent CTO http://bit.ly/kafka-cqrs-es
  • 20. How the F*** do I query my data ? Interactive Queries ● state in Kafka Streams is sharded ● we don’t control on which nodes the data is hosted ● Kafka Streams exposes the information ● Try randomly a node, if available on it, read data and return it ● otherwise, forward request to the appropriate node and return it ● The forwarding mecanism is up to the application ○ REST server side forwarding ○ REST client side forwarding (using some error code)
  • 21. Event Storming How to design your domain with Kappa/CQRS-ES ? Event storming is a workshop-based method to quickly find out what is happening in the domain of a software program.[1] The business process is "stormed out" as a series of domain events which are denoted as orange stickies Invented by Alberto Brandolini in the context of domain-driven design. Event Storming can be used as a means for business process modelling and requirements engineering. The basic idea is to bring together software developers and domain experts and learn from each other. https://en.wikipedia.org/wiki/Event_storming