SlideShare a Scribd company logo
1 of 32
Download to read offline
Asynchronicity in Microservices
Three Main Forms of Asynchronicity – Understanding the Patterns
O’Reilly SACon, London, October 2018
Irakli Nadareishvili
Sr. Director, Shared Technology, Capital One.
Irakli Nadareishvili
Senior Director, SharedTech, Capital One
• API & Microservices Governance
• Capital One’s Developer Tooling
• Co-author of “Microservice Architecture”
inadarei
11
“Speed and Safety at Scale and in Harmony”
Need for coordination is why we constantly
compromise between speed and safety.
Microservices Way:
inadarei
Microservicesclosethealignmentloop!
AgileProcess:
Operations:
Product:
DevOps & CI/CID
Lean Product Dev
Pattern: Thinking In Small Batches
Architecture: Microservices
inadarei
Data:Batch-sizeIsaStrongPredictorofPerformance
Source: Accelerate, by Nicole Forsgren, PhD, Jez Humble, and Gene Kim
6Confidential
Async + #Microservices =
Internet’s favorite pastime
7
There is actually more than
one type of asynchronicity,
and the proper usage patterns
are significantly different,
when and if applied properly.
Asynchronous Flows
Data Streams
Event-Sourcing (and CQRS)
AGENDA
9
1. Asynchronous Flows
1010Confidential
Any type of asynchronous job execution, where
caller doesn’t have to wait for a response in a
blocking way, increases scalability and resiliency
of the system, granted: typically at the expense
of increased complexity.
Common solutions:
• Promises, async/await & coroutines
• Publish/Subscribe Queues
• Webhooks
• Reactive Programming
• Akka Actor Model
Promises (Node.js)
11Example code from: http://promises123.com.
Async/Await (Python)
12Example code from: http://promises123.com.
Goroutines (Go)
13Example code from: http://promises123.com.
Reactive Programming
14
Higher-level abstraction over messaging using Observables and functional programming.
Publish/Subscribe Queues
15
Senders generate events, receivers are workers able and interested in processing those
Graphics source: https://docs.microsoft.com/en-us/previous-versions/msp-n-p/dn589781(v=pandp.10)
Pub/Sub provides significantly superior level of flexibility, in
that: multiple kinds of receivers, implemented with
heterogenous tech stack can subscribe to the same events
using a uniform approach and implementation.
Example:
1. Message: loan application submitted
2. Received by fraud-check worker
3. Received by credit-check worker
4. Received by AML-check worker
5. Received by OFAC-check worker
6. …
Webhooks – HTTP Callbacks with Payload
16
W3C Standard: WebSub https://www.w3.org/TR/websub/
Graphics source: https://www.w3.org/TR/websub/#high-level-protocol-flow
WebSub allows abstracting Pub/Sub model away from
specific, non-web protocols used by concrete message
broker systems and projecting the interactions onto the
standard HTTP layer, with main benefit being ubiquitous
familiarity with the protocol, built-in caching and internet-
level scalability features.
Akka Actor Model
17
Actor Model-based abstraction for concurrent and distributed systems, primarily in Scala and Java
Diagram source: https://doc.akka.io/docs/akka/2.5/guide/actors-intro.html
“Everything is an Actor” model to concurrency by
Carl Hewitt (1973).
Actor is an entity that, in response to a
message, can:
1. Send messages to other actors
2. Create new actors
3. Define message-processing
behavior.
Akka Actor Model - Clustering
18
Akka provides gossip-based HA cluster impl. with advanced features like sharding & persistence.
Diagram source: https://doc.akka.io/docs/akka/2.5/common/cluster.html#intro
19
2. Data Streams
Data Analytics & Machine Learning Applications
20
Could be powered by Kafka Streams configured/optimized differently from their pub/sub usage
Diagram source: https://www.confluent.io/blog/build-deploy-scalable-machine-learning-production-apache-kafka/
Data Lake
21
Business-relevant data streamed into a Data Lake from all data/event sources
Diagram source: https://aws.amazon.com/big-data/datalakes-and-analytics/what-is-a-data-lake/
22
3. Event Sourcing (and CQRS)
Command Query Responsibility Segregation (CQRS)
23
Separating actions (state changes) from perceptions (reads, notification) in system architecture
EventStore
Alexa
VoiceSkill
BFFAPI
…
Microservice 1
…
…
Microservice 2
…
…
Microservice 4
…
MobileWebApp
…
Microservice 3
…
BFFAPIBFFAPI
Topic 1
Topic 2.1
Topic 2.2
Topic 4.1
Topic 4.2
Topic 4.3
Subscribe
publish
publish
publish
Subscribe
Subscribe
Subscribe
Query
Query
Query
Query
24
Event-Sourcing Explained
25
“Current state”-oriented, relational model – favors data-sharing, toxic for microservices
Customer Demographics
Credit-Worthiness Data
Deposits (10)
Accounts (3)
Withdrawals (10)
Documents (7)
Event-Sourcing Explained
26
Events-Based Data Model – solves data-sharing issues in Microservices
Credit Data
Received
Customer
Created
Checking
Account
Added
Credit Card
Acc. Added
Mortgage Acc.
Added
Money
Deposited
Money
Deposited
Money
Withdrawn
Money
Withdrawn
Money
Withdrawn
Document
Added
Money
Deposited
Money
Deposited
Document
Generated
Money
Withdrawn
Document
Added
Money
Withdrawn
Event “Shape”
27
Source: https://eventstore.org/docs/introduction/
Projections
28
Give us current state based on events, and are as simple as: function (state, event)
“In Event Sourcing, current state is a left-fold of previous behaviors” – Greg Young
Tooling
29
Event Store:
1. EventStore https://eventstore.org/
2. Cassandra
3. Any DB capable of storing many
rows of data .
Read Model:
1. ElasticSearch
2. PostgreSQL
3. Anything optimized for the kind of queries you want to run.
Command Query Responsibility Segregation (CQRS)
30
Separating actions (state changes) from perceptions (reads, notification) in system architecture
EventStore
Alexa
VoiceSkill
BFFAPI
…
Microservice 1
…
…
Microservice 2
…
…
Microservice 4
…
MobileWebApp
…
Microservice 3
…
BFFAPIBFFAPI
Topic 1
Topic 2.1
Topic 2.2
Topic 4.1
Topic 4.2
Topic 4.3
Subscribe
publish
publish
publish
Subscribe
Subscribe
Subscribe
Query
Query
Query
Query
Asynchronous Flows
Data Streams
Event-Sourcing (and CQRS)
ASYNC TYPES
inadarei
11
Questions?
Thank you!
inadarei

More Related Content

What's hot

2019 04 seattle_meetup___kafka_machine_learning___kai_waehner
2019 04 seattle_meetup___kafka_machine_learning___kai_waehner2019 04 seattle_meetup___kafka_machine_learning___kai_waehner
2019 04 seattle_meetup___kafka_machine_learning___kai_waehnerNitin Kumar
 
INTERFACE, by apidays - Apache Cassandra now speaks developer with Stargate ...
INTERFACE, by apidays  - Apache Cassandra now speaks developer with Stargate ...INTERFACE, by apidays  - Apache Cassandra now speaks developer with Stargate ...
INTERFACE, by apidays - Apache Cassandra now speaks developer with Stargate ...apidays
 
Building scalable applications for the cloud
Building scalable applications for the cloudBuilding scalable applications for the cloud
Building scalable applications for the cloudNemesisSoftware
 
Event mesh api meetup AsyncAPI Singapore
Event mesh api meetup AsyncAPI SingaporeEvent mesh api meetup AsyncAPI Singapore
Event mesh api meetup AsyncAPI SingaporePhil Scanlon
 
Getting Started on Edge Computing with AWS IoT Greengrass
Getting Started on Edge Computing with AWS IoT GreengrassGetting Started on Edge Computing with AWS IoT Greengrass
Getting Started on Edge Computing with AWS IoT GreengrassHisyam Kamil
 
Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolithAgile integration: Decomposing the monolith
Agile integration: Decomposing the monolithJudy Breedlove
 
FIWARE Global Summit - Edge/Fog Computing in “Powered by FIWARE” Architectures
FIWARE Global Summit - Edge/Fog Computing in “Powered by FIWARE” ArchitecturesFIWARE Global Summit - Edge/Fog Computing in “Powered by FIWARE” Architectures
FIWARE Global Summit - Edge/Fog Computing in “Powered by FIWARE” ArchitecturesFIWARE
 
Microservice: the phanot menace. Istio Service Mesh: the new hope. JEEConf 2019
Microservice: the phanot menace. Istio Service Mesh: the new hope. JEEConf 2019Microservice: the phanot menace. Istio Service Mesh: the new hope. JEEConf 2019
Microservice: the phanot menace. Istio Service Mesh: the new hope. JEEConf 2019Sergii Bishyr
 
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...FIWARE
 
[DevDay2019] Hands-on Machine Learning on Google Cloud Platform - By Thanh Le...
[DevDay2019] Hands-on Machine Learning on Google Cloud Platform - By Thanh Le...[DevDay2019] Hands-on Machine Learning on Google Cloud Platform - By Thanh Le...
[DevDay2019] Hands-on Machine Learning on Google Cloud Platform - By Thanh Le...DevDay.org
 
apidays LIVE London 2021 - Securing PII at runtime by Rob Dickinson, Resurfac...
apidays LIVE London 2021 - Securing PII at runtime by Rob Dickinson, Resurfac...apidays LIVE London 2021 - Securing PII at runtime by Rob Dickinson, Resurfac...
apidays LIVE London 2021 - Securing PII at runtime by Rob Dickinson, Resurfac...apidays
 
Smart Contracts: Opportunities and Challenges
Smart Contracts: Opportunities and ChallengesSmart Contracts: Opportunities and Challenges
Smart Contracts: Opportunities and ChallengesCasey Kuhlman
 
[APIdays INTERFACE 2021] Now that we have K8s, can we stop re-inventing API p...
[APIdays INTERFACE 2021] Now that we have K8s, can we stop re-inventing API p...[APIdays INTERFACE 2021] Now that we have K8s, can we stop re-inventing API p...
[APIdays INTERFACE 2021] Now that we have K8s, can we stop re-inventing API p...WSO2
 
Democratizing Apache Spark for the Enterprise with Jonathan Gole
Democratizing Apache Spark for the Enterprise with Jonathan GoleDemocratizing Apache Spark for the Enterprise with Jonathan Gole
Democratizing Apache Spark for the Enterprise with Jonathan GoleDatabricks
 
Take Your Business to the Next Level with Blockchain - Codit Webinar
Take Your Business to the Next Level with Blockchain - Codit WebinarTake Your Business to the Next Level with Blockchain - Codit Webinar
Take Your Business to the Next Level with Blockchain - Codit WebinarCodit
 
FIWARE Global Summit - A Multi-database Plugin for the Orion FIWARE Context B...
FIWARE Global Summit - A Multi-database Plugin for the Orion FIWARE Context B...FIWARE Global Summit - A Multi-database Plugin for the Orion FIWARE Context B...
FIWARE Global Summit - A Multi-database Plugin for the Orion FIWARE Context B...FIWARE
 
Over-Engineering: Causes, Symptoms, and Treatment
Over-Engineering: Causes, Symptoms, and TreatmentOver-Engineering: Causes, Symptoms, and Treatment
Over-Engineering: Causes, Symptoms, and TreatmentAltoros
 
Re-architecting the Data Center for the digital services economy
Re-architecting the Data Center for the digital services economyRe-architecting the Data Center for the digital services economy
Re-architecting the Data Center for the digital services economyRed Hat India Pvt. Ltd.
 
Blockchain in Practice
Blockchain in PracticeBlockchain in Practice
Blockchain in PracticeCodit
 
KPI definition with Business Activity Monitor 2.0
KPI definition with Business Activity Monitor 2.0KPI definition with Business Activity Monitor 2.0
KPI definition with Business Activity Monitor 2.0WSO2
 

What's hot (20)

2019 04 seattle_meetup___kafka_machine_learning___kai_waehner
2019 04 seattle_meetup___kafka_machine_learning___kai_waehner2019 04 seattle_meetup___kafka_machine_learning___kai_waehner
2019 04 seattle_meetup___kafka_machine_learning___kai_waehner
 
INTERFACE, by apidays - Apache Cassandra now speaks developer with Stargate ...
INTERFACE, by apidays  - Apache Cassandra now speaks developer with Stargate ...INTERFACE, by apidays  - Apache Cassandra now speaks developer with Stargate ...
INTERFACE, by apidays - Apache Cassandra now speaks developer with Stargate ...
 
Building scalable applications for the cloud
Building scalable applications for the cloudBuilding scalable applications for the cloud
Building scalable applications for the cloud
 
Event mesh api meetup AsyncAPI Singapore
Event mesh api meetup AsyncAPI SingaporeEvent mesh api meetup AsyncAPI Singapore
Event mesh api meetup AsyncAPI Singapore
 
Getting Started on Edge Computing with AWS IoT Greengrass
Getting Started on Edge Computing with AWS IoT GreengrassGetting Started on Edge Computing with AWS IoT Greengrass
Getting Started on Edge Computing with AWS IoT Greengrass
 
Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolithAgile integration: Decomposing the monolith
Agile integration: Decomposing the monolith
 
FIWARE Global Summit - Edge/Fog Computing in “Powered by FIWARE” Architectures
FIWARE Global Summit - Edge/Fog Computing in “Powered by FIWARE” ArchitecturesFIWARE Global Summit - Edge/Fog Computing in “Powered by FIWARE” Architectures
FIWARE Global Summit - Edge/Fog Computing in “Powered by FIWARE” Architectures
 
Microservice: the phanot menace. Istio Service Mesh: the new hope. JEEConf 2019
Microservice: the phanot menace. Istio Service Mesh: the new hope. JEEConf 2019Microservice: the phanot menace. Istio Service Mesh: the new hope. JEEConf 2019
Microservice: the phanot menace. Istio Service Mesh: the new hope. JEEConf 2019
 
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
 
[DevDay2019] Hands-on Machine Learning on Google Cloud Platform - By Thanh Le...
[DevDay2019] Hands-on Machine Learning on Google Cloud Platform - By Thanh Le...[DevDay2019] Hands-on Machine Learning on Google Cloud Platform - By Thanh Le...
[DevDay2019] Hands-on Machine Learning on Google Cloud Platform - By Thanh Le...
 
apidays LIVE London 2021 - Securing PII at runtime by Rob Dickinson, Resurfac...
apidays LIVE London 2021 - Securing PII at runtime by Rob Dickinson, Resurfac...apidays LIVE London 2021 - Securing PII at runtime by Rob Dickinson, Resurfac...
apidays LIVE London 2021 - Securing PII at runtime by Rob Dickinson, Resurfac...
 
Smart Contracts: Opportunities and Challenges
Smart Contracts: Opportunities and ChallengesSmart Contracts: Opportunities and Challenges
Smart Contracts: Opportunities and Challenges
 
[APIdays INTERFACE 2021] Now that we have K8s, can we stop re-inventing API p...
[APIdays INTERFACE 2021] Now that we have K8s, can we stop re-inventing API p...[APIdays INTERFACE 2021] Now that we have K8s, can we stop re-inventing API p...
[APIdays INTERFACE 2021] Now that we have K8s, can we stop re-inventing API p...
 
Democratizing Apache Spark for the Enterprise with Jonathan Gole
Democratizing Apache Spark for the Enterprise with Jonathan GoleDemocratizing Apache Spark for the Enterprise with Jonathan Gole
Democratizing Apache Spark for the Enterprise with Jonathan Gole
 
Take Your Business to the Next Level with Blockchain - Codit Webinar
Take Your Business to the Next Level with Blockchain - Codit WebinarTake Your Business to the Next Level with Blockchain - Codit Webinar
Take Your Business to the Next Level with Blockchain - Codit Webinar
 
FIWARE Global Summit - A Multi-database Plugin for the Orion FIWARE Context B...
FIWARE Global Summit - A Multi-database Plugin for the Orion FIWARE Context B...FIWARE Global Summit - A Multi-database Plugin for the Orion FIWARE Context B...
FIWARE Global Summit - A Multi-database Plugin for the Orion FIWARE Context B...
 
Over-Engineering: Causes, Symptoms, and Treatment
Over-Engineering: Causes, Symptoms, and TreatmentOver-Engineering: Causes, Symptoms, and Treatment
Over-Engineering: Causes, Symptoms, and Treatment
 
Re-architecting the Data Center for the digital services economy
Re-architecting the Data Center for the digital services economyRe-architecting the Data Center for the digital services economy
Re-architecting the Data Center for the digital services economy
 
Blockchain in Practice
Blockchain in PracticeBlockchain in Practice
Blockchain in Practice
 
KPI definition with Business Activity Monitor 2.0
KPI definition with Business Activity Monitor 2.0KPI definition with Business Activity Monitor 2.0
KPI definition with Business Activity Monitor 2.0
 

Similar to Irakli Nadareishvili - O'Reilly SACon 2018, London

Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsAraf Karsh Hamid
 
Tech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning productsTech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning productsGianmario Spacagna
 
Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Jav...
Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Jav...Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Jav...
Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Jav...Lightbend
 
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...apidays
 
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...apidays
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Araf Karsh Hamid
 
ODSC East 2020 Accelerate ML Lifecycle with Kubernetes and Containerized Da...
ODSC East 2020   Accelerate ML Lifecycle with Kubernetes and Containerized Da...ODSC East 2020   Accelerate ML Lifecycle with Kubernetes and Containerized Da...
ODSC East 2020 Accelerate ML Lifecycle with Kubernetes and Containerized Da...Abhinav Joshi
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREAraf Karsh Hamid
 
Distributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerDistributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerTracy Kuhrt
 
Databricks Meetup @ Los Angeles Apache Spark User Group
Databricks Meetup @ Los Angeles Apache Spark User GroupDatabricks Meetup @ Los Angeles Apache Spark User Group
Databricks Meetup @ Los Angeles Apache Spark User GroupPaco Nathan
 
HINC – Harmonizing Diverse Resource Information Across IoT, Network Functions...
HINC – Harmonizing Diverse Resource Information Across IoT, Network Functions...HINC – Harmonizing Diverse Resource Information Across IoT, Network Functions...
HINC – Harmonizing Diverse Resource Information Across IoT, Network Functions...Hong-Linh Truong
 
Serverless machine learning architectures at Helixa
Serverless machine learning architectures at HelixaServerless machine learning architectures at Helixa
Serverless machine learning architectures at HelixaData Science Milan
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud ComputingAnimesh Chaturvedi
 
CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018Krishna-Kumar
 
Big data + cloud computing glossary for community
Big data + cloud computing glossary for communityBig data + cloud computing glossary for community
Big data + cloud computing glossary for communityKumar Chinnakali
 
MicroServices-Part-1.pdf
MicroServices-Part-1.pdfMicroServices-Part-1.pdf
MicroServices-Part-1.pdfchanhluc2112
 
Cytoscape CI Chapter 2
Cytoscape CI Chapter 2Cytoscape CI Chapter 2
Cytoscape CI Chapter 2bdemchak
 
Simplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptxSimplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptxssuser5faa791
 
OpenStack and Cloud Foundry - Pair the leading open source IaaS and PaaS
OpenStack and Cloud Foundry - Pair the leading open source IaaS and PaaSOpenStack and Cloud Foundry - Pair the leading open source IaaS and PaaS
OpenStack and Cloud Foundry - Pair the leading open source IaaS and PaaSDaniel Krook
 

Similar to Irakli Nadareishvili - O'Reilly SACon 2018, London (20)

Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration Patterns
 
Tech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning productsTech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning products
 
Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Jav...
Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Jav...Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Jav...
Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Jav...
 
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...
 
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
 
ODSC East 2020 Accelerate ML Lifecycle with Kubernetes and Containerized Da...
ODSC East 2020   Accelerate ML Lifecycle with Kubernetes and Containerized Da...ODSC East 2020   Accelerate ML Lifecycle with Kubernetes and Containerized Da...
ODSC East 2020 Accelerate ML Lifecycle with Kubernetes and Containerized Da...
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Distributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerDistributed:Health Code Camp Hyperledger
Distributed:Health Code Camp Hyperledger
 
Databricks Meetup @ Los Angeles Apache Spark User Group
Databricks Meetup @ Los Angeles Apache Spark User GroupDatabricks Meetup @ Los Angeles Apache Spark User Group
Databricks Meetup @ Los Angeles Apache Spark User Group
 
HINC – Harmonizing Diverse Resource Information Across IoT, Network Functions...
HINC – Harmonizing Diverse Resource Information Across IoT, Network Functions...HINC – Harmonizing Diverse Resource Information Across IoT, Network Functions...
HINC – Harmonizing Diverse Resource Information Across IoT, Network Functions...
 
Serverless machine learning architectures at Helixa
Serverless machine learning architectures at HelixaServerless machine learning architectures at Helixa
Serverless machine learning architectures at Helixa
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud Computing
 
CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018
 
Big data + cloud computing glossary for community
Big data + cloud computing glossary for communityBig data + cloud computing glossary for community
Big data + cloud computing glossary for community
 
MicroServices-Part-1.pdf
MicroServices-Part-1.pdfMicroServices-Part-1.pdf
MicroServices-Part-1.pdf
 
Cytoscape CI Chapter 2
Cytoscape CI Chapter 2Cytoscape CI Chapter 2
Cytoscape CI Chapter 2
 
Simplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptxSimplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptx
 
Cisco project ideas
Cisco   project ideasCisco   project ideas
Cisco project ideas
 
OpenStack and Cloud Foundry - Pair the leading open source IaaS and PaaS
OpenStack and Cloud Foundry - Pair the leading open source IaaS and PaaSOpenStack and Cloud Foundry - Pair the leading open source IaaS and PaaS
OpenStack and Cloud Foundry - Pair the leading open source IaaS and PaaS
 

More from Irakli Nadareishvili

APIDays 2020 - SEED(S) API Design Methodology
APIDays 2020 - SEED(S) API Design MethodologyAPIDays 2020 - SEED(S) API Design Methodology
APIDays 2020 - SEED(S) API Design MethodologyIrakli Nadareishvili
 
Building Fintech with Microservices and Kubernetes @ API World 2018
Building Fintech with Microservices and Kubernetes @ API World 2018Building Fintech with Microservices and Kubernetes @ API World 2018
Building Fintech with Microservices and Kubernetes @ API World 2018Irakli Nadareishvili
 
Microservices Architecture - The Blind Spots
Microservices Architecture - The Blind SpotsMicroservices Architecture - The Blind Spots
Microservices Architecture - The Blind SpotsIrakli Nadareishvili
 
AnsibleBuilding a Docker-ized Microservice In Node, Using Ansible - AnsibleF...
AnsibleBuilding a Docker-ized Microservice  In Node, Using Ansible - AnsibleF...AnsibleBuilding a Docker-ized Microservice  In Node, Using Ansible - AnsibleF...
AnsibleBuilding a Docker-ized Microservice In Node, Using Ansible - AnsibleF...Irakli Nadareishvili
 
Hypermedia-Driven Orchestration in Microservices
Hypermedia-Driven Orchestration in MicroservicesHypermedia-Driven Orchestration in Microservices
Hypermedia-Driven Orchestration in MicroservicesIrakli Nadareishvili
 
Document Databases In Online Publishing
Document  Databases In  Online Publishing Document  Databases In  Online Publishing
Document Databases In Online Publishing Irakli Nadareishvili
 
DrupalCon DC: Busines Analytics with Views
DrupalCon DC: Busines Analytics with ViewsDrupalCon DC: Busines Analytics with Views
DrupalCon DC: Busines Analytics with ViewsIrakli Nadareishvili
 

More from Irakli Nadareishvili (10)

APIDays 2020 - SEED(S) API Design Methodology
APIDays 2020 - SEED(S) API Design MethodologyAPIDays 2020 - SEED(S) API Design Methodology
APIDays 2020 - SEED(S) API Design Methodology
 
Building Fintech with Microservices and Kubernetes @ API World 2018
Building Fintech with Microservices and Kubernetes @ API World 2018Building Fintech with Microservices and Kubernetes @ API World 2018
Building Fintech with Microservices and Kubernetes @ API World 2018
 
Reuse or Not and Microservices
Reuse or Not and MicroservicesReuse or Not and Microservices
Reuse or Not and Microservices
 
Microservices Architecture - The Blind Spots
Microservices Architecture - The Blind SpotsMicroservices Architecture - The Blind Spots
Microservices Architecture - The Blind Spots
 
Microservices In Practice
Microservices In PracticeMicroservices In Practice
Microservices In Practice
 
AnsibleBuilding a Docker-ized Microservice In Node, Using Ansible - AnsibleF...
AnsibleBuilding a Docker-ized Microservice  In Node, Using Ansible - AnsibleF...AnsibleBuilding a Docker-ized Microservice  In Node, Using Ansible - AnsibleF...
AnsibleBuilding a Docker-ized Microservice In Node, Using Ansible - AnsibleF...
 
Hypermedia-Driven Orchestration in Microservices
Hypermedia-Driven Orchestration in MicroservicesHypermedia-Driven Orchestration in Microservices
Hypermedia-Driven Orchestration in Microservices
 
trends in online publishing
trends in online publishingtrends in online publishing
trends in online publishing
 
Document Databases In Online Publishing
Document  Databases In  Online Publishing Document  Databases In  Online Publishing
Document Databases In Online Publishing
 
DrupalCon DC: Busines Analytics with Views
DrupalCon DC: Busines Analytics with ViewsDrupalCon DC: Busines Analytics with Views
DrupalCon DC: Busines Analytics with Views
 

Recently uploaded

Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 

Recently uploaded (20)

Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 

Irakli Nadareishvili - O'Reilly SACon 2018, London

  • 1. Asynchronicity in Microservices Three Main Forms of Asynchronicity – Understanding the Patterns O’Reilly SACon, London, October 2018 Irakli Nadareishvili Sr. Director, Shared Technology, Capital One.
  • 2. Irakli Nadareishvili Senior Director, SharedTech, Capital One • API & Microservices Governance • Capital One’s Developer Tooling • Co-author of “Microservice Architecture” inadarei
  • 3. 11 “Speed and Safety at Scale and in Harmony” Need for coordination is why we constantly compromise between speed and safety. Microservices Way: inadarei
  • 4. Microservicesclosethealignmentloop! AgileProcess: Operations: Product: DevOps & CI/CID Lean Product Dev Pattern: Thinking In Small Batches Architecture: Microservices inadarei
  • 5. Data:Batch-sizeIsaStrongPredictorofPerformance Source: Accelerate, by Nicole Forsgren, PhD, Jez Humble, and Gene Kim
  • 6. 6Confidential Async + #Microservices = Internet’s favorite pastime
  • 7. 7 There is actually more than one type of asynchronicity, and the proper usage patterns are significantly different, when and if applied properly.
  • 10. 1010Confidential Any type of asynchronous job execution, where caller doesn’t have to wait for a response in a blocking way, increases scalability and resiliency of the system, granted: typically at the expense of increased complexity. Common solutions: • Promises, async/await & coroutines • Publish/Subscribe Queues • Webhooks • Reactive Programming • Akka Actor Model
  • 11. Promises (Node.js) 11Example code from: http://promises123.com.
  • 12. Async/Await (Python) 12Example code from: http://promises123.com.
  • 13. Goroutines (Go) 13Example code from: http://promises123.com.
  • 14. Reactive Programming 14 Higher-level abstraction over messaging using Observables and functional programming.
  • 15. Publish/Subscribe Queues 15 Senders generate events, receivers are workers able and interested in processing those Graphics source: https://docs.microsoft.com/en-us/previous-versions/msp-n-p/dn589781(v=pandp.10) Pub/Sub provides significantly superior level of flexibility, in that: multiple kinds of receivers, implemented with heterogenous tech stack can subscribe to the same events using a uniform approach and implementation. Example: 1. Message: loan application submitted 2. Received by fraud-check worker 3. Received by credit-check worker 4. Received by AML-check worker 5. Received by OFAC-check worker 6. …
  • 16. Webhooks – HTTP Callbacks with Payload 16 W3C Standard: WebSub https://www.w3.org/TR/websub/ Graphics source: https://www.w3.org/TR/websub/#high-level-protocol-flow WebSub allows abstracting Pub/Sub model away from specific, non-web protocols used by concrete message broker systems and projecting the interactions onto the standard HTTP layer, with main benefit being ubiquitous familiarity with the protocol, built-in caching and internet- level scalability features.
  • 17. Akka Actor Model 17 Actor Model-based abstraction for concurrent and distributed systems, primarily in Scala and Java Diagram source: https://doc.akka.io/docs/akka/2.5/guide/actors-intro.html “Everything is an Actor” model to concurrency by Carl Hewitt (1973). Actor is an entity that, in response to a message, can: 1. Send messages to other actors 2. Create new actors 3. Define message-processing behavior.
  • 18. Akka Actor Model - Clustering 18 Akka provides gossip-based HA cluster impl. with advanced features like sharding & persistence. Diagram source: https://doc.akka.io/docs/akka/2.5/common/cluster.html#intro
  • 20. Data Analytics & Machine Learning Applications 20 Could be powered by Kafka Streams configured/optimized differently from their pub/sub usage Diagram source: https://www.confluent.io/blog/build-deploy-scalable-machine-learning-production-apache-kafka/
  • 21. Data Lake 21 Business-relevant data streamed into a Data Lake from all data/event sources Diagram source: https://aws.amazon.com/big-data/datalakes-and-analytics/what-is-a-data-lake/
  • 22. 22 3. Event Sourcing (and CQRS)
  • 23. Command Query Responsibility Segregation (CQRS) 23 Separating actions (state changes) from perceptions (reads, notification) in system architecture EventStore Alexa VoiceSkill BFFAPI … Microservice 1 … … Microservice 2 … … Microservice 4 … MobileWebApp … Microservice 3 … BFFAPIBFFAPI Topic 1 Topic 2.1 Topic 2.2 Topic 4.1 Topic 4.2 Topic 4.3 Subscribe publish publish publish Subscribe Subscribe Subscribe Query Query Query Query
  • 24. 24
  • 25. Event-Sourcing Explained 25 “Current state”-oriented, relational model – favors data-sharing, toxic for microservices Customer Demographics Credit-Worthiness Data Deposits (10) Accounts (3) Withdrawals (10) Documents (7)
  • 26. Event-Sourcing Explained 26 Events-Based Data Model – solves data-sharing issues in Microservices Credit Data Received Customer Created Checking Account Added Credit Card Acc. Added Mortgage Acc. Added Money Deposited Money Deposited Money Withdrawn Money Withdrawn Money Withdrawn Document Added Money Deposited Money Deposited Document Generated Money Withdrawn Document Added Money Withdrawn
  • 28. Projections 28 Give us current state based on events, and are as simple as: function (state, event) “In Event Sourcing, current state is a left-fold of previous behaviors” – Greg Young
  • 29. Tooling 29 Event Store: 1. EventStore https://eventstore.org/ 2. Cassandra 3. Any DB capable of storing many rows of data . Read Model: 1. ElasticSearch 2. PostgreSQL 3. Anything optimized for the kind of queries you want to run.
  • 30. Command Query Responsibility Segregation (CQRS) 30 Separating actions (state changes) from perceptions (reads, notification) in system architecture EventStore Alexa VoiceSkill BFFAPI … Microservice 1 … … Microservice 2 … … Microservice 4 … MobileWebApp … Microservice 3 … BFFAPIBFFAPI Topic 1 Topic 2.1 Topic 2.2 Topic 4.1 Topic 4.2 Topic 4.3 Subscribe publish publish publish Subscribe Subscribe Subscribe Query Query Query Query
  • 31. Asynchronous Flows Data Streams Event-Sourcing (and CQRS) ASYNC TYPES inadarei