SlideShare a Scribd company logo
1 of 46
Download to read offline
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Essential Capabilities behind
Microservices
Kim Kao
Solutions Architect
Amazon Web Services
D e v D a y - 2
Domain Driven Design(DDD Taiwan)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
The new normal: companies are increasingly
global and products are increasingly digital
47%
of CEOs said they are
being challenged by
the board of directors
to make progress in
digital business
Source: Gartner
79%
of CIOs believe that
digital business is
making their IT
organizations better
prepared to change
67%
of all business leaders
believe that they must
pick up the pace of
digitalization to
remain competitive
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Why are enterprises
adopting microservices?
• Accelerate software development
• Build modern applications
• Automate operations at web scale
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
To maintain competitive advantage, digital
businesses must innovate as rapidly as possible
FeedbackIdeas
Experiment
Innovation
Flywheel
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Manager -
“We are going to run workload(s) on AWS.
We have new sub-systems/module to develop with legacy services.
Container is good, Lambda is awesome. It’s great to have whole cloud native
advantage
if you guys migrate all service into microservice, serverless...”
Developer(s) - “Not a problem. I’ll make it …”
A typical day for customer ...
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Jump into real world...
https://vaughnvernon.co/tag/event-storming/
(Earn money as usual) (will it run as usual?)
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
When the impact of change is small,
release velocity can increase
Monolith
Does everything
Microservices
Do one thing
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
100/200/300/1000?
LOC
Code matters?
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS FargateAmazon Elastic
Container Service
Amazon Elastic
Container Service for
Kubernetes
Docker
Containers is Microservices?
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Domain Driven Design
Fit in
• Standalone computing & persistence
• Serve for specific business intentions
• Business Capability in bounded Context
• Embrace Rapidly Change
• Automate operations at web scale
• Engineering Decoupling
Microservices stand for ...
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Mobile client
Client
IoT
Computing in variety platform
API
Gateway
Account DB
Shipping DB
Inventory DB
Store Front
Web App
Shipment
Query
Inventory
Query
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Relational
Referential
integrity, ACID
transactions,
schema-
on-write
Lift and shift, ERP,
CRM, finance
Key-value
High
throughput, low-
latency reads
and writes,
endless scale
Real-time bidding,
shopping cart,
social, product
catalog, customer
preferences
Document
Store
documents and
quickly access
querying on
any attribute
Content
management,
personalization,
mobile
In-memory
Query by key
with
microsecond
latency
Leaderboards,
real-time analytics,
caching
Graph
Quickly and
easily create
and navigate
relationships
between
data
Fraud detection,
social networking,
recommendation
engine
Time-series
Collect, store,
and process
data sequenced
by time
IoT applications,
event tracking
Ledger
Complete,
immutable, and
verifiable history
of all changes to
application data
Systems
of record, supply
chain, health care,
registrations,
financial
Amazon
QLDB
Amazon Aurora
Amazon RDS
Amazon
DynamoDB
Amazon
DocumentDB
Amazon
ElastiCache
Amazon
Neptune
Amazon
Timestream
Choose right one to support Microservices
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Challenges
(dealing with transaction, service lookup)
(priority, customer expectation)
(by noun, organization, experience?)
(CRM, ERP, Payment Gateway ...)
(self employee, out sourcing, ISV)
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
(priority, market expectation)
Domain
Expert
Matters
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Strategies for Dealing with Legacy Systems
• Bubble Context
• Place your new functionality in a bubble and have repositories as an anti-corruption
layer(ACL) toward the legacy code and data.
• Autonomous Bubble
• Start a new chapter OUTSIDE the legacy code with its own storage. Thus we need to
synchronize ACL and similar information that you shares with the legacy system
• Open Host Services in Published Language
• Expose legacy assets through an open host service. Using an anti-corruption layer to convert
the necessary information to the new system
• Event Streams
• The systems communicate trough events. The anti-corruption layer now publishes the event
and monitor the state of the other system. The solution is similar to event sourcing.
(priority, customer expectation)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
(dealing with transaction, service lookup)
Monolith
Does everything
Per Service
Do only one thing
Business matters
Immutable facts
- Order Created
- Coupon applied
- Account Registered
Intention
Business behavior
- Create an Order
- Apply Coupon
- Register an Account
Responsible for
Capabilities
- Order
- Discount
- Identity Management
Accept
&
process
Presentation Model
Help to make decision
Composite data type
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
(dealing with transaction, service lookup)
Monolith
Does everything
Per Service
Do only one thing
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
• Microservices candidate – Bounded Context
• Per Bounded Context form up system Boundary
• One Bounded Context may
• Contains multiple co-related Aggregates
• Or only one Aggregate with Specific business capability
(dealing with transaction, service lookup)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
DevicesDB
External
Interfaces UI
WebControllers
Use Cases
Entities
Gatew
ays
Presenters
QLDBRDS
SNS, SQS, SMS
Messaging
UI
S3
Static page
ELB ingress
Use Cases
Entity
(Aggregate)
APIGatew
ay
Quicksight
Blockchain
Tim
e DB
Aggregate
Dynamodb
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
(dealing with transaction, service lookup)
Observability & traffic control
Easily export logs, metrics, and traces
Client side traffic policies—circuit breaking, retries
Routes for deployments
Works across clusters and container services
Amazon ECS
Amazon EKS
Kubernetes on EC2
AWS Fargate
AWS built and run
No control plane to manage
Ease of operations
High scale
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
(dealing with transaction, service lookup)
• Are you ready to deal with M:N transaction compensation ?
• Are you ready to embrace the rapidly change by contract ?
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Transaction Dependencies between Microservices
• Upstream-Downstream co-relationship
• One Transaction invoke local API and Remote API
Book Rental
Service
Book Flight
Service
Trip Service
Book Hotel
Service
Exception / Error ?
Exception / Error ?
Exception / Error ?
!"
#
!$
#
!#
#
+
+
Transaction Compensate
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Saga : Alternative for 2 Phase -commit
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Context
• You have applied the Database per Service pattern. Each
service has its own database.
• Some business transactions, however, span multiple service
so you need a mechanism to ensure data consistency
across services.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Solutions
• Each local transaction updates self and
publishes a message/event to trigger the
next local transaction in the saga.
• If a local transaction fails because it
violates a business rule then the saga
executes a series of compensating
transactions that undo the changes that
were made by the preceding local
transactions.
https://microservices.io/patterns/data/saga.html
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Orchestration-based Saga
• Coordinator stand alone
• Each service provide
a pair function for Success or Fail
• Abstract compensate logic
out of Codes
https://microservices.io/patterns/data/saga.html
1
1.1 2 3
4
5
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Implementing Saga pattern on AWS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
• Each Service provide cancel operation
• State change trigger cancel operation
• Simplify Complexity rules
• Just a JSON file
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Code snippet
https://github.com/humank/lambda-saga-pattern
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Demo
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
(by noun, organization, experience?)
(CRM, ERP, Payment Gateway ...)
(self employee, out sourcing, ISV)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
• By business Capability
• Form up boundary by Bounded Context
• Clarify Sub Domains
• Core sub domain – (most valuable)
• General sub domain – (facilitate business)
• Support sub domain – (support, infra)
(by noun, organization, experience?)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
(by noun, organization, experience?)
A Team
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
• Resources allocation by value chain
• Talents devote to build up core sub domain
• Responsible for general sub domain
• Out sourcing or ISV for support domain
(self employee, out sourcing, ISV)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
ISV/Package
Support sub Domain
Out Sourcing
General Sub Domain
Pay the most efforts on critical business component
Talents developing code
Core Sub Domain
(self employee, out sourcing, ISV)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
• Incrementally breakout dependencies
• Cut-off Database Link
• Do not allow cross schema access permissions
• Define API contract only for data exchange
• Considering to move out store procedure into application
code
• Leave the legacy system as a data container
(CRM, ERP, Payment Gateway ...)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
When you should dive in Microservices
Team
Partners
Business
Operation
Coding
Value
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Migration from Monolith to Microservices
via DDD approach readiness
https://github.com/humank/microservices
Update soon !
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Implementing DDD on AWS
Community : DDD Taiwan@FB
Telegram : YikaiKao
WeChat : YikaiKao
Twitter : @YikaiKao
GitHub Repos
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Take Away
Know Why/What/How
• Do you really need Microservices?
• Leverage Business Events to aggregate context
and form up Service Boundary
• There is no C4 to solve distributed persistence
issue
• State Machine to do Transaction Compensate
(Step Functions way to go)
• DDD is good to collaborate Business and
Technology guys by speaking Ubiquitous
Language
• Crunch Problem, then design solution
Thank you!
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

What's hot

Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Claus Ibsen
 

What's hot (20)

Cloud native principles
Cloud native principlesCloud native principles
Cloud native principles
 
AWS Black Belt Online Seminar Amazon Aurora
AWS Black Belt Online Seminar Amazon AuroraAWS Black Belt Online Seminar Amazon Aurora
AWS Black Belt Online Seminar Amazon Aurora
 
[115]쿠팡 서비스 클라우드 마이그레이션 통해 배운것들
[115]쿠팡 서비스 클라우드 마이그레이션 통해 배운것들[115]쿠팡 서비스 클라우드 마이그레이션 통해 배운것들
[115]쿠팡 서비스 클라우드 마이그레이션 통해 배운것들
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
Microsoft Azure - Introduction
Microsoft Azure - IntroductionMicrosoft Azure - Introduction
Microsoft Azure - Introduction
 
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
 
Building A Cloud Strategy PowerPoint Presentation Slides
Building A Cloud Strategy PowerPoint Presentation SlidesBuilding A Cloud Strategy PowerPoint Presentation Slides
Building A Cloud Strategy PowerPoint Presentation Slides
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Azure Storage
Azure StorageAzure Storage
Azure Storage
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Cloud Migration Workshop
Cloud Migration WorkshopCloud Migration Workshop
Cloud Migration Workshop
 
20191120 AWS Black Belt Online Seminar Amazon Managed Streaming for Apache Ka...
20191120 AWS Black Belt Online Seminar Amazon Managed Streaming for Apache Ka...20191120 AWS Black Belt Online Seminar Amazon Managed Streaming for Apache Ka...
20191120 AWS Black Belt Online Seminar Amazon Managed Streaming for Apache Ka...
 
MULTI-CLOUD ARCHITECTURE
MULTI-CLOUD ARCHITECTUREMULTI-CLOUD ARCHITECTURE
MULTI-CLOUD ARCHITECTURE
 
The Transformation Journey with Cloud Technology
The Transformation Journey with Cloud TechnologyThe Transformation Journey with Cloud Technology
The Transformation Journey with Cloud Technology
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
AWS初心者向けWebinar AWS上でのDDoS対策
AWS初心者向けWebinar AWS上でのDDoS対策AWS初心者向けWebinar AWS上でのDDoS対策
AWS初心者向けWebinar AWS上でのDDoS対策
 
Introduction to Batch Processing on AWS
Introduction to Batch Processing on AWSIntroduction to Batch Processing on AWS
Introduction to Batch Processing on AWS
 
멀티·하이브리드 클라우드 구축 전략 - 네이버비즈니스플랫폼 박기은 CTO
멀티·하이브리드 클라우드 구축 전략 - 네이버비즈니스플랫폼 박기은 CTO멀티·하이브리드 클라우드 구축 전략 - 네이버비즈니스플랫폼 박기은 CTO
멀티·하이브리드 클라우드 구축 전략 - 네이버비즈니스플랫폼 박기은 CTO
 

Similar to 2019 06-12-aws taipei summit-dev day-essential capabilities behind microservices

以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構
Amazon Web Services
 
Breaking Up the Monolith with Containers
Breaking Up the Monolith with ContainersBreaking Up the Monolith with Containers
Breaking Up the Monolith with Containers
Amazon Web Services
 

Similar to 2019 06-12-aws taipei summit-dev day-essential capabilities behind microservices (20)

Essential capabilities behind Microservices
Essential capabilities behind MicroservicesEssential capabilities behind Microservices
Essential capabilities behind Microservices
 
以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構
 
以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構以容器技術為基礎的混合雲設計架構
以容器技術為基礎的混合雲設計架構
 
2019 03-13-implementing microservices by ddd
2019 03-13-implementing microservices by ddd2019 03-13-implementing microservices by ddd
2019 03-13-implementing microservices by ddd
 
Implementing Microservices by DDD
Implementing Microservices by DDDImplementing Microservices by DDD
Implementing Microservices by DDD
 
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS Summit
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS SummitHow to speed up and scale your innovation efforts - MAD203 - Chicago AWS Summit
How to speed up and scale your innovation efforts - MAD203 - Chicago AWS Summit
 
Breaking Down the Monowhat
Breaking Down the MonowhatBreaking Down the Monowhat
Breaking Down the Monowhat
 
Breaking Down the 'Monowhat'
Breaking Down the 'Monowhat'Breaking Down the 'Monowhat'
Breaking Down the 'Monowhat'
 
Breaking Up the Monolith with Containers
Breaking Up the Monolith with ContainersBreaking Up the Monolith with Containers
Breaking Up the Monolith with Containers
 
利用 Fargate - 無伺服器的容器環境建置高可用的系統
利用 Fargate - 無伺服器的容器環境建置高可用的系統利用 Fargate - 無伺服器的容器環境建置高可用的系統
利用 Fargate - 無伺服器的容器環境建置高可用的系統
 
Using automation to drive continuous-compliance best practices - SVC309 - Chi...
Using automation to drive continuous-compliance best practices - SVC309 - Chi...Using automation to drive continuous-compliance best practices - SVC309 - Chi...
Using automation to drive continuous-compliance best practices - SVC309 - Chi...
 
Containers for Startups
Containers for StartupsContainers for Startups
Containers for Startups
 
Application Modernization using the Strangler Pattern
Application Modernization using the Strangler PatternApplication Modernization using the Strangler Pattern
Application Modernization using the Strangler Pattern
 
A culture of rapid innovation with DevOps, microservices, & serverless - MAD2...
A culture of rapid innovation with DevOps, microservices, & serverless - MAD2...A culture of rapid innovation with DevOps, microservices, & serverless - MAD2...
A culture of rapid innovation with DevOps, microservices, & serverless - MAD2...
 
How Nubank is building a customer-obsessed bank - FSV201 - New York AWS Summit
How Nubank is building a customer-obsessed bank - FSV201 - New York AWS SummitHow Nubank is building a customer-obsessed bank - FSV201 - New York AWS Summit
How Nubank is building a customer-obsessed bank - FSV201 - New York AWS Summit
 
Building Microservices with Containers (CON308-R1) - AWS re:Invent 2018
Building Microservices with Containers (CON308-R1) - AWS re:Invent 2018Building Microservices with Containers (CON308-R1) - AWS re:Invent 2018
Building Microservices with Containers (CON308-R1) - AWS re:Invent 2018
 
Monolithic to Microservices Demystified
Monolithic to Microservices DemystifiedMonolithic to Microservices Demystified
Monolithic to Microservices Demystified
 
From Monolith to Modern Apps: Best Practices (SRV322-R2) - AWS re:Invent 2018
From Monolith to Modern Apps: Best Practices (SRV322-R2) - AWS re:Invent 2018From Monolith to Modern Apps: Best Practices (SRV322-R2) - AWS re:Invent 2018
From Monolith to Modern Apps: Best Practices (SRV322-R2) - AWS re:Invent 2018
 
DevOps at Amazon
DevOps at AmazonDevOps at Amazon
DevOps at Amazon
 
How can your business benefit from going Serverless
How can your business benefit from going ServerlessHow can your business benefit from going Serverless
How can your business benefit from going Serverless
 

More from Kim Kao

More from Kim Kao (12)

Enlarge influence by Participating in communities
Enlarge influence by Participating in communitiesEnlarge influence by Participating in communities
Enlarge influence by Participating in communities
 
2019 08-01-i ddd-studygroup-appendix
2019 08-01-i ddd-studygroup-appendix2019 08-01-i ddd-studygroup-appendix
2019 08-01-i ddd-studygroup-appendix
 
跟著Actor Model來一場與DDD的豔遇
跟著Actor Model來一場與DDD的豔遇跟著Actor Model來一場與DDD的豔遇
跟著Actor Model來一場與DDD的豔遇
 
Ddd by-clark chou
Ddd by-clark chouDdd by-clark chou
Ddd by-clark chou
 
My past-3 yeas-developer-journey-at-linkedin-by-iantsai
My past-3 yeas-developer-journey-at-linkedin-by-iantsaiMy past-3 yeas-developer-journey-at-linkedin-by-iantsai
My past-3 yeas-developer-journey-at-linkedin-by-iantsai
 
2019 04-25-agile communitymeetup-essentialcapabilitiesbehindmicroservices
2019 04-25-agile communitymeetup-essentialcapabilitiesbehindmicroservices2019 04-25-agile communitymeetup-essentialcapabilitiesbehindmicroservices
2019 04-25-agile communitymeetup-essentialcapabilitiesbehindmicroservices
 
2019 03-23-2nd-meetup-essential capabilities behind microservices
2019 03-23-2nd-meetup-essential capabilities behind microservices2019 03-23-2nd-meetup-essential capabilities behind microservices
2019 03-23-2nd-meetup-essential capabilities behind microservices
 
Ddd(meetup 2) ddd with clean architecture
Ddd(meetup 2) ddd with clean architectureDdd(meetup 2) ddd with clean architecture
Ddd(meetup 2) ddd with clean architecture
 
2019-02-20-ddd taiwan-community-iddd-studygroup-1st
2019-02-20-ddd taiwan-community-iddd-studygroup-1st2019-02-20-ddd taiwan-community-iddd-studygroup-1st
2019-02-20-ddd taiwan-community-iddd-studygroup-1st
 
DDD Taiwan Community 2019 01-26-1st-meetup-why ddd matters
DDD Taiwan Community 2019 01-26-1st-meetup-why ddd mattersDDD Taiwan Community 2019 01-26-1st-meetup-why ddd matters
DDD Taiwan Community 2019 01-26-1st-meetup-why ddd matters
 
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
 
Legacy java ee meet lambda
Legacy java ee  meet lambdaLegacy java ee  meet lambda
Legacy java ee meet lambda
 

Recently uploaded

Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 

2019 06-12-aws taipei summit-dev day-essential capabilities behind microservices

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Essential Capabilities behind Microservices Kim Kao Solutions Architect Amazon Web Services D e v D a y - 2 Domain Driven Design(DDD Taiwan)
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T The new normal: companies are increasingly global and products are increasingly digital 47% of CEOs said they are being challenged by the board of directors to make progress in digital business Source: Gartner 79% of CIOs believe that digital business is making their IT organizations better prepared to change 67% of all business leaders believe that they must pick up the pace of digitalization to remain competitive
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Why are enterprises adopting microservices? • Accelerate software development • Build modern applications • Automate operations at web scale © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T To maintain competitive advantage, digital businesses must innovate as rapidly as possible FeedbackIdeas Experiment Innovation Flywheel
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Manager - “We are going to run workload(s) on AWS. We have new sub-systems/module to develop with legacy services. Container is good, Lambda is awesome. It’s great to have whole cloud native advantage if you guys migrate all service into microservice, serverless...” Developer(s) - “Not a problem. I’ll make it …” A typical day for customer ...
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Jump into real world... https://vaughnvernon.co/tag/event-storming/ (Earn money as usual) (will it run as usual?)
  • 7. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T When the impact of change is small, release velocity can increase Monolith Does everything Microservices Do one thing
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 100/200/300/1000? LOC Code matters?
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS FargateAmazon Elastic Container Service Amazon Elastic Container Service for Kubernetes Docker Containers is Microservices?
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Domain Driven Design Fit in • Standalone computing & persistence • Serve for specific business intentions • Business Capability in bounded Context • Embrace Rapidly Change • Automate operations at web scale • Engineering Decoupling Microservices stand for ...
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Mobile client Client IoT Computing in variety platform API Gateway Account DB Shipping DB Inventory DB Store Front Web App Shipment Query Inventory Query
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Relational Referential integrity, ACID transactions, schema- on-write Lift and shift, ERP, CRM, finance Key-value High throughput, low- latency reads and writes, endless scale Real-time bidding, shopping cart, social, product catalog, customer preferences Document Store documents and quickly access querying on any attribute Content management, personalization, mobile In-memory Query by key with microsecond latency Leaderboards, real-time analytics, caching Graph Quickly and easily create and navigate relationships between data Fraud detection, social networking, recommendation engine Time-series Collect, store, and process data sequenced by time IoT applications, event tracking Ledger Complete, immutable, and verifiable history of all changes to application data Systems of record, supply chain, health care, registrations, financial Amazon QLDB Amazon Aurora Amazon RDS Amazon DynamoDB Amazon DocumentDB Amazon ElastiCache Amazon Neptune Amazon Timestream Choose right one to support Microservices
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Challenges (dealing with transaction, service lookup) (priority, customer expectation) (by noun, organization, experience?) (CRM, ERP, Payment Gateway ...) (self employee, out sourcing, ISV)
  • 15. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T (priority, market expectation) Domain Expert Matters
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Strategies for Dealing with Legacy Systems • Bubble Context • Place your new functionality in a bubble and have repositories as an anti-corruption layer(ACL) toward the legacy code and data. • Autonomous Bubble • Start a new chapter OUTSIDE the legacy code with its own storage. Thus we need to synchronize ACL and similar information that you shares with the legacy system • Open Host Services in Published Language • Expose legacy assets through an open host service. Using an anti-corruption layer to convert the necessary information to the new system • Event Streams • The systems communicate trough events. The anti-corruption layer now publishes the event and monitor the state of the other system. The solution is similar to event sourcing. (priority, customer expectation)
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T (dealing with transaction, service lookup) Monolith Does everything Per Service Do only one thing Business matters Immutable facts - Order Created - Coupon applied - Account Registered Intention Business behavior - Create an Order - Apply Coupon - Register an Account Responsible for Capabilities - Order - Discount - Identity Management Accept & process Presentation Model Help to make decision Composite data type
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T (dealing with transaction, service lookup) Monolith Does everything Per Service Do only one thing
  • 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • Microservices candidate – Bounded Context • Per Bounded Context form up system Boundary • One Bounded Context may • Contains multiple co-related Aggregates • Or only one Aggregate with Specific business capability (dealing with transaction, service lookup)
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
  • 23. QLDBRDS SNS, SQS, SMS Messaging UI S3 Static page ELB ingress Use Cases Entity (Aggregate) APIGatew ay Quicksight Blockchain Tim e DB Aggregate Dynamodb
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T (dealing with transaction, service lookup) Observability & traffic control Easily export logs, metrics, and traces Client side traffic policies—circuit breaking, retries Routes for deployments Works across clusters and container services Amazon ECS Amazon EKS Kubernetes on EC2 AWS Fargate AWS built and run No control plane to manage Ease of operations High scale
  • 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T (dealing with transaction, service lookup) • Are you ready to deal with M:N transaction compensation ? • Are you ready to embrace the rapidly change by contract ?
  • 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Transaction Dependencies between Microservices • Upstream-Downstream co-relationship • One Transaction invoke local API and Remote API Book Rental Service Book Flight Service Trip Service Book Hotel Service Exception / Error ? Exception / Error ? Exception / Error ? !" # !$ # !# # + + Transaction Compensate
  • 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Saga : Alternative for 2 Phase -commit
  • 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Context • You have applied the Database per Service pattern. Each service has its own database. • Some business transactions, however, span multiple service so you need a mechanism to ensure data consistency across services.
  • 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Solutions • Each local transaction updates self and publishes a message/event to trigger the next local transaction in the saga. • If a local transaction fails because it violates a business rule then the saga executes a series of compensating transactions that undo the changes that were made by the preceding local transactions. https://microservices.io/patterns/data/saga.html
  • 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Orchestration-based Saga • Coordinator stand alone • Each service provide a pair function for Success or Fail • Abstract compensate logic out of Codes https://microservices.io/patterns/data/saga.html 1 1.1 2 3 4 5
  • 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Implementing Saga pattern on AWS
  • 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • Each Service provide cancel operation • State change trigger cancel operation • Simplify Complexity rules • Just a JSON file
  • 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Code snippet https://github.com/humank/lambda-saga-pattern
  • 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Demo
  • 35. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T (by noun, organization, experience?) (CRM, ERP, Payment Gateway ...) (self employee, out sourcing, ISV)
  • 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • By business Capability • Form up boundary by Bounded Context • Clarify Sub Domains • Core sub domain – (most valuable) • General sub domain – (facilitate business) • Support sub domain – (support, infra) (by noun, organization, experience?)
  • 38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T (by noun, organization, experience?) A Team
  • 39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • Resources allocation by value chain • Talents devote to build up core sub domain • Responsible for general sub domain • Out sourcing or ISV for support domain (self employee, out sourcing, ISV)
  • 40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T ISV/Package Support sub Domain Out Sourcing General Sub Domain Pay the most efforts on critical business component Talents developing code Core Sub Domain (self employee, out sourcing, ISV)
  • 41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • Incrementally breakout dependencies • Cut-off Database Link • Do not allow cross schema access permissions • Define API contract only for data exchange • Considering to move out store procedure into application code • Leave the legacy system as a data container (CRM, ERP, Payment Gateway ...)
  • 42. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T When you should dive in Microservices Team Partners Business Operation Coding Value
  • 43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Migration from Monolith to Microservices via DDD approach readiness https://github.com/humank/microservices Update soon !
  • 44. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Implementing DDD on AWS Community : DDD Taiwan@FB Telegram : YikaiKao WeChat : YikaiKao Twitter : @YikaiKao GitHub Repos
  • 45. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Take Away Know Why/What/How • Do you really need Microservices? • Leverage Business Events to aggregate context and form up Service Boundary • There is no C4 to solve distributed persistence issue • State Machine to do Transaction Compensate (Step Functions way to go) • DDD is good to collaborate Business and Technology guys by speaking Ubiquitous Language • Crunch Problem, then design solution
  • 46. Thank you! S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.