SlideShare una empresa de Scribd logo
1 de 24
2018-10-30
Cédric Vidal, CTO
Do Microservices dream about
CQRS, Kafka Stream and BPMN ?
@cedricvidal
#VoxxedMicroservices #QuickSign #Kafka #Camunda
First, why BPMN ?
Bad press
• Dusty
• Scary
• Complicated
• Is it like UML ??
• “I’d rather code it using my favorite language”
Digital onboarding
• European leader in digital onboarding for financial services
• B2B2C SAAS solution in white label
All our customers are different
• Specific to each customer/product/country
• Business requirements
• Integration requirements
• Different maturity levels, business wise and technical wise
Progressive onboarding of our customers
• Start small
• Optimize progressively
• Gain maturity, business wise and technical wise
Hence BPMN!
• A process for each
customer/product
• State and transitions
• XML file stored in git
• Multiple versions in prod
Kafka is the backbone of
microservices architecture
DIGITAL ONBOARDING: A NEW POWER FOR FINANCIAL
SERVICES
Why Kafka and
streams ?
~500 million tweets per day
~1,3 million trace entries per day
We are not twitter ...
But we grow!
+70% more
transactions
each year
Millions of
digital
subscriptions
per year
Critical
channel
Traceability
● Regulated business
● Qualified signature ETSI 319 411
● Be able to prove conformance
● Non-repudiation
=> we need to keep logs of everything
Query
View
apply events
on data
Query
Query Store
Event
Handler
Query
Handler
CQRS-ES using Kafka Streams
user
Command Query Responsibility Segregation (Event Sourcing)
Aggregation Root
Store
direct modification
commands & queries
Controller
reads
Pre-computed views
action
evaluates
Command
Event
EventEvent
Event Store
stores
produces
Command
Handler
reads
Event
EventEvent
Aggregation
Root
Event
Handler
Streams
Streams
Streams
Streams
OrderService
BPMN - Saga pattern - Orchestration style
CustomerService
RPC
OrderService
BPMN - Saga pattern - Choreography style
BPMN in our architecture
REST APIWrite Interface Read Interface
Commands
Activities are
µ-services
OCR
Fraud
Signature
History stream
History SPI
append only immutable log
Queries
Extremely fast read access
StreamsKV StorePre-computed JSON
representations
Case µS
stream
processors
Async replies
Avro
Why Kafka ?
General observation
• Works for extremely massive big data use
cases
• Should handle easily our CQRS ES based
workloads …
Important for CQRS-ES
• At least once guaranteed delivery
• Sequential processing per topic partition
• RPC like low latency
• Durability
• Replayability
but isn’t quite enough!
Important for CQRS-ES
• Automatic offset tracking (inherited from
Consumer API)
• Embedded ephemeral disk based KV Store to
persist intermediate stream states and query
stores (Facebook’s RocksDB)
• Rich streaming DSL with operators
(aggregates, joins, …)
• Interactive Queries
Kafka Streams - The key
Can be tricky to grasp at first
• The trick is to make sure all messages related to a
given aggregation root end up on the same partition
How do you route your events?
ConsumergroupAConsumergroupB
C1
C2
C3
C4
C5
Kafka Cluster
Server 1
Server 2
Topic A
P0
P1
P2
P3
Aggregation
D1
D2 D3
D4 D5
root
partition = nextValue(topic) % numPartitions
Messages
M3
key=null
M2
key=null
M1
key=null
Streams
Event routing - Aggregation root id as key
– All messages belonging to a given aggregation root are given the
aggregation root id
partition = hash(key) % numPartitions
ConsumergroupAConsumergroupB
C1
C2
C3
C4
C5
Kafka Cluster
Server 1
Server 2
Topic A
P0
P1
P2
P3
Aggregation
D1
D2 D3
D4 D5
rootMessages
M2M3 M1
key=M1 key=M1 key=M1
Simple but … ⚠️ Warning : Loose consistency if compacting
Streams
– Use another composite id from which you can extract the aggregation
root id with a custom strategy
Event routing - Composite key
Custom Partitioner strategy :
rootkey = extractRootFrom(key)
partition = hash(rootkey) % numPartitions
ConsumergroupAConsumergroupB
C1
C2
C3
C4
C5
Kafka Cluster
Server 1
Server 2
Topic A
P0
P1
P2
P3
Aggregation
D1
D2 D3
D4 D5
rootMessages
M2M3 M1
key=M1M3 key=M1M2 key=M1
Streams
How do you query your data ?
Take 1: Application state as an external datastore
Read interface
Full Text Search Index forward
3
ask Kafka Stream
(using “Interactive Queries”)
2
Take 2: Application state in embedded RocksDB KV Store
1
round-robin
Read interface
C1
P1
P2
C2
P3
C3
P4
How do I return state after a command?
• Status 2xx/5xx anyone?
• Materialize the outcome to a kafka topic
• Wait for a specific correlation id
• Using Kafka Streams Interactive Queries and KV non blocking get
Crazy ?
● Quite a ride
● One API per customer
● API “generated” from BPMN
● Sync or Async
● Push or polling
Cédric Vidal
CTO
@cedricvidal
#VoxxedMicroservices #QuickSign #Kafka #Camunda
Multiple free photographies from Unsplash.com

Más contenido relacionado

La actualidad más candente

Architecture réparties et les services web
Architecture réparties et les services webArchitecture réparties et les services web
Architecture réparties et les services webCHOUAIB EL HACHIMI
 
Openstack glance
Openstack glanceOpenstack glance
Openstack glanceSHAMEEM F
 
Chp3 - Les Services Web
Chp3 - Les Services WebChp3 - Les Services Web
Chp3 - Les Services WebLilia Sfaxi
 
Windows virtual desktop l100 presentation
Windows virtual desktop l100 presentationWindows virtual desktop l100 presentation
Windows virtual desktop l100 presentationkiefter
 
Informatique pervasive et usages en contextes
Informatique pervasive et usages en contextesInformatique pervasive et usages en contextes
Informatique pervasive et usages en contextesDavid Bihanic
 
Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Claus Ibsen
 
Service-Oriented Architecture (SOA)
Service-Oriented Architecture (SOA)Service-Oriented Architecture (SOA)
Service-Oriented Architecture (SOA)WSO2
 
Microsoft Azure Technical Overview
Microsoft Azure Technical OverviewMicrosoft Azure Technical Overview
Microsoft Azure Technical Overviewgjuljo
 
eServices-Tp1: Web Services
eServices-Tp1: Web ServiceseServices-Tp1: Web Services
eServices-Tp1: Web ServicesLilia Sfaxi
 
CloudSim : Introduction and Basic Programming Syntax
CloudSim : Introduction and Basic Programming SyntaxCloudSim : Introduction and Basic Programming Syntax
CloudSim : Introduction and Basic Programming SyntaxVikas Chouhan
 
Grafana and AWS - Implementation and Usage
Grafana and AWS - Implementation and UsageGrafana and AWS - Implementation and Usage
Grafana and AWS - Implementation and UsageManish Chopra
 
comment realiser un Service Web
comment realiser un Service Web comment realiser un Service Web
comment realiser un Service Web Nazih Heni
 
Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01Eric Bourdet
 
LinkedIn - A highly scalable Architecture on Java!
LinkedIn - A highly scalable Architecture on Java!LinkedIn - A highly scalable Architecture on Java!
LinkedIn - A highly scalable Architecture on Java!manivannan57
 
Benefits of the Azure cloud
Benefits of the Azure cloudBenefits of the Azure cloud
Benefits of the Azure cloudJames Serra
 

La actualidad más candente (20)

Hadoop Oozie
Hadoop OozieHadoop Oozie
Hadoop Oozie
 
Architecture réparties et les services web
Architecture réparties et les services webArchitecture réparties et les services web
Architecture réparties et les services web
 
Openstack glance
Openstack glanceOpenstack glance
Openstack glance
 
Chp3 - Les Services Web
Chp3 - Les Services WebChp3 - Les Services Web
Chp3 - Les Services Web
 
Windows virtual desktop l100 presentation
Windows virtual desktop l100 presentationWindows virtual desktop l100 presentation
Windows virtual desktop l100 presentation
 
Informatique pervasive et usages en contextes
Informatique pervasive et usages en contextesInformatique pervasive et usages en contextes
Informatique pervasive et usages en contextes
 
Partie3BI-DW-OLAP2019
Partie3BI-DW-OLAP2019Partie3BI-DW-OLAP2019
Partie3BI-DW-OLAP2019
 
Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...
 
Service-Oriented Architecture (SOA)
Service-Oriented Architecture (SOA)Service-Oriented Architecture (SOA)
Service-Oriented Architecture (SOA)
 
Microsoft Azure Technical Overview
Microsoft Azure Technical OverviewMicrosoft Azure Technical Overview
Microsoft Azure Technical Overview
 
eServices-Tp1: Web Services
eServices-Tp1: Web ServiceseServices-Tp1: Web Services
eServices-Tp1: Web Services
 
OOP Basics
OOP BasicsOOP Basics
OOP Basics
 
CloudSim : Introduction and Basic Programming Syntax
CloudSim : Introduction and Basic Programming SyntaxCloudSim : Introduction and Basic Programming Syntax
CloudSim : Introduction and Basic Programming Syntax
 
Grafana and AWS - Implementation and Usage
Grafana and AWS - Implementation and UsageGrafana and AWS - Implementation and Usage
Grafana and AWS - Implementation and Usage
 
comment realiser un Service Web
comment realiser un Service Web comment realiser un Service Web
comment realiser un Service Web
 
Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01
 
LinkedIn - A highly scalable Architecture on Java!
LinkedIn - A highly scalable Architecture on Java!LinkedIn - A highly scalable Architecture on Java!
LinkedIn - A highly scalable Architecture on Java!
 
Web services SOAP
Web services SOAPWeb services SOAP
Web services SOAP
 
Benefits of the Azure cloud
Benefits of the Azure cloudBenefits of the Azure cloud
Benefits of the Azure cloud
 
Fundamental Cloud Computing
Fundamental Cloud ComputingFundamental Cloud Computing
Fundamental Cloud Computing
 

Similar a Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed microservices paris 2018

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
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Guido Schmutz
 
Real-time Customer Impact Calculation on a Telecom Scale Knowledge Graph
Real-time Customer Impact Calculation on a Telecom Scale Knowledge GraphReal-time Customer Impact Calculation on a Telecom Scale Knowledge Graph
Real-time Customer Impact Calculation on a Telecom Scale Knowledge GraphHostedbyConfluent
 
Lightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend
 
Lightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend
 
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)Kai Wähner
 
Open Standards Enabling Digital Transformation
Open Standards Enabling Digital TransformationOpen Standards Enabling Digital Transformation
Open Standards Enabling Digital TransformationSolace
 
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
 
Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...StreamNative
 
Capital One Delivers Risk Insights in Real Time with Stream Processing
Capital One Delivers Risk Insights in Real Time with Stream ProcessingCapital One Delivers Risk Insights in Real Time with Stream Processing
Capital One Delivers Risk Insights in Real Time with Stream Processingconfluent
 
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at DatabricksLessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at DatabricksDatabricks
 
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networkingIntro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networkingPacket
 
Azure tales: a real world CQRS and ES Deep Dive - Andrea Saltarello
Azure tales: a real world CQRS and ES Deep Dive - Andrea SaltarelloAzure tales: a real world CQRS and ES Deep Dive - Andrea Saltarello
Azure tales: a real world CQRS and ES Deep Dive - Andrea SaltarelloITCamp
 
APAC Kafka Summit - Best Of
APAC Kafka Summit - Best Of APAC Kafka Summit - Best Of
APAC Kafka Summit - Best Of confluent
 
Confluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVAConfluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVAconfluent
 
James Watters Kafka Summit NYC 2019 Keynote
James Watters Kafka Summit NYC 2019 KeynoteJames Watters Kafka Summit NYC 2019 Keynote
James Watters Kafka Summit NYC 2019 KeynoteJames Watters
 
... No it's Apache Kafka!
... No it's Apache Kafka!... No it's Apache Kafka!
... No it's Apache Kafka!makker_nl
 
Evolving from Messaging to Event Streaming
Evolving from Messaging to Event StreamingEvolving from Messaging to Event Streaming
Evolving from Messaging to Event Streamingconfluent
 

Similar a Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed microservices paris 2018 (20)

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
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
Real-time Customer Impact Calculation on a Telecom Scale Knowledge Graph
Real-time Customer Impact Calculation on a Telecom Scale Knowledge GraphReal-time Customer Impact Calculation on a Telecom Scale Knowledge Graph
Real-time Customer Impact Calculation on a Telecom Scale Knowledge Graph
 
Lightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend Fast Data Platform
Lightbend Fast Data Platform
 
Lightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend Fast Data Platform
Lightbend Fast Data Platform
 
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
 
Complex made bearable Clojure conj 2019
Complex made bearable Clojure conj 2019Complex made bearable Clojure conj 2019
Complex made bearable Clojure conj 2019
 
Open Standards Enabling Digital Transformation
Open Standards Enabling Digital TransformationOpen Standards Enabling Digital Transformation
Open Standards Enabling Digital Transformation
 
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...
 
Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...
 
Capital One Delivers Risk Insights in Real Time with Stream Processing
Capital One Delivers Risk Insights in Real Time with Stream ProcessingCapital One Delivers Risk Insights in Real Time with Stream Processing
Capital One Delivers Risk Insights in Real Time with Stream Processing
 
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at DatabricksLessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
 
QQCOS
QQCOSQQCOS
QQCOS
 
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networkingIntro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networking
 
Azure tales: a real world CQRS and ES Deep Dive - Andrea Saltarello
Azure tales: a real world CQRS and ES Deep Dive - Andrea SaltarelloAzure tales: a real world CQRS and ES Deep Dive - Andrea Saltarello
Azure tales: a real world CQRS and ES Deep Dive - Andrea Saltarello
 
APAC Kafka Summit - Best Of
APAC Kafka Summit - Best Of APAC Kafka Summit - Best Of
APAC Kafka Summit - Best Of
 
Confluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVAConfluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVA
 
James Watters Kafka Summit NYC 2019 Keynote
James Watters Kafka Summit NYC 2019 KeynoteJames Watters Kafka Summit NYC 2019 Keynote
James Watters Kafka Summit NYC 2019 Keynote
 
... No it's Apache Kafka!
... No it's Apache Kafka!... No it's Apache Kafka!
... No it's Apache Kafka!
 
Evolving from Messaging to Event Streaming
Evolving from Messaging to Event StreamingEvolving from Messaging to Event Streaming
Evolving from Messaging to Event Streaming
 

Más de 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
 
BBL KAPPA Lesfurets.com
BBL KAPPA Lesfurets.comBBL KAPPA Lesfurets.com
BBL KAPPA Lesfurets.comCedric 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
 

Más de Cedric Vidal (10)

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
 
BBL KAPPA Lesfurets.com
BBL KAPPA Lesfurets.comBBL KAPPA Lesfurets.com
BBL KAPPA Lesfurets.com
 
EMF Customizer
EMF CustomizerEMF Customizer
EMF Customizer
 
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
 

Último

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
(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
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
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
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
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
 
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
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
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
 

Último (20)

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(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...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
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
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
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
 
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
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
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...
 

Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed microservices paris 2018

  • 1. 2018-10-30 Cédric Vidal, CTO Do Microservices dream about CQRS, Kafka Stream and BPMN ? @cedricvidal #VoxxedMicroservices #QuickSign #Kafka #Camunda
  • 2. First, why BPMN ? Bad press • Dusty • Scary • Complicated • Is it like UML ?? • “I’d rather code it using my favorite language”
  • 3. Digital onboarding • European leader in digital onboarding for financial services • B2B2C SAAS solution in white label
  • 4. All our customers are different • Specific to each customer/product/country • Business requirements • Integration requirements • Different maturity levels, business wise and technical wise
  • 5. Progressive onboarding of our customers • Start small • Optimize progressively • Gain maturity, business wise and technical wise
  • 6. Hence BPMN! • A process for each customer/product • State and transitions • XML file stored in git • Multiple versions in prod
  • 7. Kafka is the backbone of microservices architecture
  • 8. DIGITAL ONBOARDING: A NEW POWER FOR FINANCIAL SERVICES Why Kafka and streams ?
  • 9. ~500 million tweets per day ~1,3 million trace entries per day We are not twitter ...
  • 10. But we grow! +70% more transactions each year Millions of digital subscriptions per year Critical channel
  • 11. Traceability ● Regulated business ● Qualified signature ETSI 319 411 ● Be able to prove conformance ● Non-repudiation => we need to keep logs of everything
  • 12. Query View apply events on data Query Query Store Event Handler Query Handler CQRS-ES using Kafka Streams user Command Query Responsibility Segregation (Event Sourcing) Aggregation Root Store direct modification commands & queries Controller reads Pre-computed views action evaluates Command Event EventEvent Event Store stores produces Command Handler reads Event EventEvent Aggregation Root Event Handler Streams Streams Streams Streams
  • 13. OrderService BPMN - Saga pattern - Orchestration style CustomerService RPC
  • 14. OrderService BPMN - Saga pattern - Choreography style
  • 15. BPMN in our architecture REST APIWrite Interface Read Interface Commands Activities are µ-services OCR Fraud Signature History stream History SPI append only immutable log Queries Extremely fast read access StreamsKV StorePre-computed JSON representations Case µS stream processors Async replies Avro
  • 16. Why Kafka ? General observation • Works for extremely massive big data use cases • Should handle easily our CQRS ES based workloads … Important for CQRS-ES • At least once guaranteed delivery • Sequential processing per topic partition • RPC like low latency • Durability • Replayability but isn’t quite enough!
  • 17. Important for CQRS-ES • Automatic offset tracking (inherited from Consumer API) • Embedded ephemeral disk based KV Store to persist intermediate stream states and query stores (Facebook’s RocksDB) • Rich streaming DSL with operators (aggregates, joins, …) • Interactive Queries Kafka Streams - The key
  • 18. Can be tricky to grasp at first • The trick is to make sure all messages related to a given aggregation root end up on the same partition How do you route your events? ConsumergroupAConsumergroupB C1 C2 C3 C4 C5 Kafka Cluster Server 1 Server 2 Topic A P0 P1 P2 P3 Aggregation D1 D2 D3 D4 D5 root partition = nextValue(topic) % numPartitions Messages M3 key=null M2 key=null M1 key=null Streams
  • 19. Event routing - Aggregation root id as key – All messages belonging to a given aggregation root are given the aggregation root id partition = hash(key) % numPartitions ConsumergroupAConsumergroupB C1 C2 C3 C4 C5 Kafka Cluster Server 1 Server 2 Topic A P0 P1 P2 P3 Aggregation D1 D2 D3 D4 D5 rootMessages M2M3 M1 key=M1 key=M1 key=M1 Simple but … ⚠️ Warning : Loose consistency if compacting Streams
  • 20. – Use another composite id from which you can extract the aggregation root id with a custom strategy Event routing - Composite key Custom Partitioner strategy : rootkey = extractRootFrom(key) partition = hash(rootkey) % numPartitions ConsumergroupAConsumergroupB C1 C2 C3 C4 C5 Kafka Cluster Server 1 Server 2 Topic A P0 P1 P2 P3 Aggregation D1 D2 D3 D4 D5 rootMessages M2M3 M1 key=M1M3 key=M1M2 key=M1 Streams
  • 21. How do you query your data ? Take 1: Application state as an external datastore Read interface Full Text Search Index forward 3 ask Kafka Stream (using “Interactive Queries”) 2 Take 2: Application state in embedded RocksDB KV Store 1 round-robin Read interface C1 P1 P2 C2 P3 C3 P4
  • 22. How do I return state after a command? • Status 2xx/5xx anyone? • Materialize the outcome to a kafka topic • Wait for a specific correlation id • Using Kafka Streams Interactive Queries and KV non blocking get
  • 23. Crazy ? ● Quite a ride ● One API per customer ● API “generated” from BPMN ● Sync or Async ● Push or polling
  • 24. Cédric Vidal CTO @cedricvidal #VoxxedMicroservices #QuickSign #Kafka #Camunda Multiple free photographies from Unsplash.com