SlideShare una empresa de Scribd logo
1 de 55
Descargar para leer sin conexión
@crichardson
Using scenarios to reinvigorate
your (microservice) architecture
Chris Richardson


Microservice architecture consulting and training
Founder of Eventuate.io


Founder of the original CloudFoundry.com


Author of POJOs in Action and Microservices Patterns


@crichardson


chris@chrisrichardson.net


http://adopt.microservices.io
Copyright © 2022. Chris Richardson Consulting, Inc. All rights reserved
^
views and
@crichardson
Presentation goal
How to create
minimal, yet
effective
architecture
documentation
Order Management
Consumer
Management
Credit Card Payments
Restaurant
Management
Accounting
Kitchen Management
Vague!
API Gateway
Import
DynamoDB
Kinesis Streams
Lambda Query
Technology
focussed
Disconnected from
functional requirements
@crichardson
About Chris
http://adopt.microservices.io
@crichardson
Discounts
35% discount


au35ric


$100 discount coupon


QVYVPXMY until June 6th
http://adopt.microservices.io
@crichardson
Agenda
The 4+1 view model of software architecture


Documenting the FTGO application


Beyond views
The goal of architecture is to
satisfy non-functional requirements
Nonfunctional
requirements
Development
Runtime
Scalability
Performance
Availability
…
Maintainability
Testability
Deployability
…
Often neglected
About software architecture
“The software architecture of a computing system is the
set of structures needed to reason about the system,
which comprise software elements, relations among
them, and properties of both.”


Documenting Software Architectures, Bass et al
De
fi
ningthe architecture of a new application


Learningthe architecture, e.g. new team member


Evaluatingthe architecture in order to improve it


Evolvingthe architecture to satisfy changed requirements
“The software architecture of a computing system is the
set of structures needed to reason about the system,
which comprise software elements, relations among
them, and properties of both.”
@crichardson
Architecture


=


(elements, relations, properties)
“The software architecture of a computing system is the
set of structures needed to reason about the system,
which comprise software elements, relations among
them, and properties of both.”
@crichardson
Architecture


=


Boxes and lines 😄
@crichardson
Architecture is multi-dimensional
• Structural


• Electrical


• Plumbing


• Mechanical


• …
@crichardson
View


=


(elements, relations, properties)
Architecture


=
4+1 view model of software
architecture
Logical


View
Process


View
Deployment


View
Implementation


View
Scenarios
https://en.wikipedia.org/wiki/4%2B1_architectural_view_model
4+1 Logical view
Logical


View
Process


View
Deployment


View
Implementation


View
Scenarios
Elements: classes and packages


Relations: inheritance, associations, …
4+1 Implementation view
Logical


View
Process


View
Deployment


View
Implementation


View
Scenarios
Elements: modules and components


Relations: dependencies
Monolith


=


one component
Microservices


=


many components
4+1 Process view
Logical


View
Process


View
Deployment


View
Implementation


View
Scenarios
Elements: processes


Relations: IPC
4+1 Deployment view
Logical


View
Process


View
Deployment


View
Implementation


View
Scenarios
Elements: “machines”


Relations: networking
@crichardson
Different views describe different
aspects of the architecture
Logical


View
Process


View
Deployment


View
Implementation


View
Dev Ops
Modularity


Loose coupling
Availability


Scalability
+1 = 5th view = Scenarios
Logical


View
Process


View
Deployment


View
Implementation


View
Scenarios
Derived from use cases/stories


Animate the views
Elements from a
view
@crichardson
Views: more than just pretty
pictures
«Service»
Order Management «Service»
Consumer
Management
«Service»
Credit Card Payments
«Service»
Restaurant
Management
«Service»
Accounting
«Service»
Kitchen Management
«Service»
Service
«Database»
Database
Uses API
Legend
Part-of
«Service»
API Gateway
«async»
«subscribes to»
«async»
«async»
«async»
«async»
«sync»
«sync»
«sync»
«sync»
«sync»
Diagram Description of elements and relations
@crichardson
Alternatives to the classic 4+1
views
There are other views, e.g.


Modern deployment technologies (Kubernetes, Serverless)
don’t
fi
t with process/deployment views


Hybrid views and scenarios that mix elements (e.g. services
and entities)


Git repository/Service/Deployment pipeline view


…


Goal is communicate => use the views that are useful
@crichardson
Agenda
The 4+1 view model of software architecture


Documenting the FTGO application


Beyond views
@crichardson
Documenting the FTGO application
«Service»
Order Management «Service»
Consumer
Management
«Service»
Credit Card Payments
«Service»
Restaurant
Management
«Service»
Accounting
«Service»
Kitchen Management
«Service»
Service
«Database»
Database
Uses API
Legend
Part-of
«Service»
API Gateway
«async»
«subscribes to»
«async»
«async»
«async»
«async»
«sync»
«sync»
«sync»
«sync»
«sync»
Implementation Logical
CircleCI deployment
pipeline
«AWS ECR repository»
ftgo-XYZ-service
«Github Repository»
ftgo/ftgo-XYZ-service
Commit
Push
Image
«Github Repository»
Kubernetes YAML
Kubernetes API
EKS cluster
Commit
3 AZ EKS cluster
Ingress managed ALB
3 AZ RDS Aurora
React application static resources
S3 bucket
api.app.acme.com app.acme.com
Browser
Cloudfront
<<service>> Order management
API Gateway
Managed Apache Kafka
React
SPA
Deployment Repository/


deployment pipeline
@crichardson
Implementation view: diagram
«Service»
Order Management «Service»
Consumer
Management
«Service»
Credit Card Payments
«Service»
Restaurant
Management
«Service»
Accounting
«Service»
Kitchen Management
«Service»
Service
«Database»
Database
Uses API
Legend
Part-of
«Service»
API Gateway
«async»
«subscribes to»
«async»
«async»
«async»
«async»
«sync»
«sync»
«sync»
«sync»
«sync»
Legend!
Stereotypes
@crichardson
Implementation view:
description
@crichardson
Implementation view: services
+ …
<<restaurant events channel>>
«Service»
Delivery Management
«Subdomain»
Delivery Management
«Subdomain»
Courier Management
«CQRS View»
Order History
«Database»
Restaurant
Management
«library»
Tax Calculator
«Service»
Delivery Management
+
@crichardson
Variation: Visualizing subdomain
to service mapping
«Service»
Restaurant Management
«Service»
Order Management
«async»
«Service»
Delivery Management
«Uses»
«Subdomain»
Delivery Management
«Subdomain»
Courier Management
«Subdomain»
Restaurant Management
«Subdomain»
Order Management
Not always 1 to 1
@crichardson
Variation: Visualizing messaging
«Service»
Order Management
«Service»
Restaurant
Management
«subscribes to»
«Service»
Order Management
«Service»
Restaurant
Management
<<restaurant events channel>>
«subscribes to»
Channel Restaurant events
Ordered Yes
Delivery At-least once
Subscription Durable
… …
@crichardson
Variation: Visualizing shared libraries
«Service»
Order Management
«Service»
Accounting
«Service»
Service
«Database»
Database
Uses API
Legend
Part-of
«async»
«library»
Money
«library»
Tax Calculator
«Uses»
«Uses»
Anti-pattern: tight
coupling
Probably ok
@crichardson
Variation: Visualizing shared
databases
Anti-pattern: tight
coupling
«Service»
Order Management
«Service»
Restaurant
Management
«Service»
Service
«Database»
Database
Uses API
Legend
Part-of
«async»
«Database»
Restaurant
Management
«Uses»
@crichardson
Variation: Visualizing CQRS views
«Service»
Order History
«Service»
Order Management
«CQRS View»
Order History
«Service»
Kitchen Management
«Service»
Delivery Management
«Subscribes to»
«Subscribes to»
«Subscribes to»
@crichardson
Implementation view scenario:
collaborating services and entities
Clari
fi
es
@crichardson
Documenting the FTGO application
«Service»
Order Management «Service»
Consumer
Management
«Service»
Credit Card Payments
«Service»
Restaurant
Management
«Service»
Accounting
«Service»
Kitchen Management
«Service»
Service
«Database»
Database
Uses API
Legend
Part-of
«Service»
API Gateway
«async»
«subscribes to»
«async»
«async»
«async»
«async»
«sync»
«sync»
«sync»
«sync»
«sync»
Implementation Logical
CircleCI deployment
pipeline
«AWS ECR repository»
ftgo-XYZ-service
«Github Repository»
ftgo/ftgo-XYZ-service
Commit
Push
Image
«Github Repository»
Kubernetes YAML
Kubernetes API
EKS cluster
Commit
3 AZ EKS cluster
Ingress managed ALB
3 AZ RDS Aurora
React application static resources
S3 bucket
api.app.acme.com app.acme.com
Browser
Cloudfront
<<service>> Order management
API Gateway
Managed Apache Kafka
React
SPA
Deployment Repository/


deployment pipeline
@crichardson
Logical view: diagram
«subdomain»
Subdomain A
«subdomain»
Subdomain B
Uses
Legend
@crichardson
Logical view: description
@crichardson
Logical view scenario:
Collaborating classes/subdomains
@crichardson
Documenting the FTGO application
«Service»
Order Management «Service»
Consumer
Management
«Service»
Credit Card Payments
«Service»
Restaurant
Management
«Service»
Accounting
«Service»
Kitchen Management
«Service»
Service
«Database»
Database
Uses API
Legend
Part-of
«Service»
API Gateway
«async»
«subscribes to»
«async»
«async»
«async»
«async»
«sync»
«sync»
«sync»
«sync»
«sync»
Implementation Logical
CircleCI deployment
pipeline
«AWS ECR repository»
ftgo-XYZ-service
«Github Repository»
ftgo/ftgo-XYZ-service
Commit
Push
Image
«Github Repository»
Kubernetes YAML
Kubernetes API
EKS cluster
Commit
3 AZ EKS cluster
Ingress managed ALB
3 AZ RDS Aurora
React application static resources
S3 bucket
api.app.acme.com app.acme.com
Browser
Cloudfront
<<service>> Order management
API Gateway
Managed Apache Kafka
React
SPA
Deployment Repository/


deployment pipeline
@crichardson
Process/Deployment view <=>
Modern K8S or Serverless?!
@crichardson
Deployment: K8S cluster/AWS
3 AZ EKS cluster
Ingress managed ALB
3 AZ RDS Aurora
React application static resources
S3 bucket
api.app.acme.com app.acme.com
Browser
Cloudfront
<<service>> Order management
API Gateway
Managed Apache Kafka
React
SPA
@crichardson
Deployment view: description
ReactJS frontend served by Cloudfront from S3 bucket


Application services (+ API Gateway) deployed on AWS EKS:
K8S service + deployment


API entry point = K8S Ingress managed ALB


AWS resources (EKS, RDS Aurora, MKS, …) deployed to
three availability zones
@crichardson
Deployment view: scenario
Browser
React
SPA
Ingress managed ALB API Gateway Order Service
POST /orders
POST /orders
POST /orders
@crichardson
Documenting the FTGO application
«Service»
Order Management «Service»
Consumer
Management
«Service»
Credit Card Payments
«Service»
Restaurant
Management
«Service»
Accounting
«Service»
Kitchen Management
«Service»
Service
«Database»
Database
Uses API
Legend
Part-of
«Service»
API Gateway
«async»
«subscribes to»
«async»
«async»
«async»
«async»
«sync»
«sync»
«sync»
«sync»
«sync»
Implementation Logical
CircleCI deployment
pipeline
«AWS ECR repository»
ftgo-XYZ-service
«Github Repository»
ftgo/ftgo-XYZ-service
Commit
Push
Image
«Github Repository»
Kubernetes YAML
Kubernetes API
EKS cluster
Commit
3 AZ EKS cluster
Ingress managed ALB
3 AZ RDS Aurora
React application static resources
S3 bucket
api.app.acme.com app.acme.com
Browser
Cloudfront
<<service>> Order management
API Gateway
Managed Apache Kafka
React
SPA
Deployment Repository/


deployment pipeline
@crichardson
Repository and deployment
pipeline view
CircleCI deployment
pipeline
«AWS ECR repository»
ftgo-XYZ-service
«Github Repository»
ftgo/ftgo-XYZ-service
Commit
Push
Image
«Github Repository»
Kubernetes YAML
Kubernetes API
EKS cluster
Commit
Per-service
Per-cluster
@crichardson
Agenda
The 4+1 view model of software architecture


Documenting the FTGO application


Beyond views
@crichardson
Vision
FTGO is a food delivery application.
Consumers use FTGO to place food orders at
local restaurants.


FTGO coordinates a network of couriers who
deliver the orders. It’s also responsible for
paying couriers and restaurants.


Restaurants use the FTGO website to edit
their menus and manage orders.
@crichardson
System
Context
Architecturally signi
fi
cant user
stories/scenarios
Capture the essence of the
application


In
fl
uence the architecture:


Complex, e.g. span multiple
subdomains


Business critical/highly
available


Low latency


Process large amounts of data


….
@crichardson
BDD-style scenarios: precise description
of behavior in terms of business entities
Givens = pre-conditions
Thens = post-conditions
De
fi
nes “request”
@crichardson
Business
objects
Distill scenarios into system
operations
FTGO
Application
createOrder()
fi
ndOrder()
…
Via UI
Application
Invokes
Subscribes to
Triggers
Model application behavior
cancelOrder()
≪commands≫


≪queries≫
…
Mutates and queries
Business
objects
@crichardson
Non-functional requirements
Quality category Quality Description
Availability Tier 1 (highest) Order
fl
ow
Tier 2 (medium) Account management
Tier … …
Performance Throughput …
Latency …
… … …
@crichardson
Documenting services:
microservice canvas
https://github.com/cer/microservice-canvas
@crichardson
Documenting services:
domain model
@crichardson
Architecture Decision
Records: documenting why
https://github.com/joelparkerhenderson/architecture-decision-record
@crichardson
Summary
The software architecture of a computing system is the set of
structures needed to reason about the system


Architecture is multi-dimensional


Each dimension is described by a view


View = elements + relations + their properties = pictures and words


Documenting architecturally signi
fi
cant user stories/scenarios is
essential


Scenarios animate the elements of a view and connect it to
functional requirements
@crichardson
@crichardson chris@chrisrichardson.net
http://adopt.microservices.io
Questions?

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
JFokus: Cubes, Hexagons, Triangles, and More: Understanding MicroservicesJFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
 
Architecture: Microservices
Architecture: MicroservicesArchitecture: Microservices
Architecture: Microservices
 
Designing loosely coupled services
Designing loosely coupled servicesDesigning loosely coupled services
Designing loosely coupled services
 
Saturn 2018: Managing data consistency in a microservice architecture using S...
Saturn 2018: Managing data consistency in a microservice architecture using S...Saturn 2018: Managing data consistency in a microservice architecture using S...
Saturn 2018: Managing data consistency in a microservice architecture using S...
 
A Self-Service API Portal for Developers
A Self-Service API Portal for DevelopersA Self-Service API Portal for Developers
A Self-Service API Portal for Developers
 
AWS Partner Webcast - Data Center Migration to the AWS Cloud
AWS Partner Webcast - Data Center Migration to the AWS CloudAWS Partner Webcast - Data Center Migration to the AWS Cloud
AWS Partner Webcast - Data Center Migration to the AWS Cloud
 
Micro services vs Monolith Architecture
Micro services vs Monolith ArchitectureMicro services vs Monolith Architecture
Micro services vs Monolith Architecture
 
Microservices Tutorial for Beginners | Microservices Architecture | Microserv...
Microservices Tutorial for Beginners | Microservices Architecture | Microserv...Microservices Tutorial for Beginners | Microservices Architecture | Microserv...
Microservices Tutorial for Beginners | Microservices Architecture | Microserv...
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and Kafka
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!
 
Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Decompose your monolith: strategies for migrating to microservices (Tide)
Decompose your monolith: strategies for migrating to microservices (Tide)Decompose your monolith: strategies for migrating to microservices (Tide)
Decompose your monolith: strategies for migrating to microservices (Tide)
 
Multi Cloud Architecture Approach
Multi Cloud Architecture ApproachMulti Cloud Architecture Approach
Multi Cloud Architecture Approach
 
TIBCO vs MuleSoft Differentiators
TIBCO vs MuleSoft DifferentiatorsTIBCO vs MuleSoft Differentiators
TIBCO vs MuleSoft Differentiators
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
Microservices Decomposition Patterns
Microservices Decomposition PatternsMicroservices Decomposition Patterns
Microservices Decomposition Patterns
 
MicroCPH - Managing data consistency in a microservice architecture using Sagas
MicroCPH - Managing data consistency in a microservice architecture using SagasMicroCPH - Managing data consistency in a microservice architecture using Sagas
MicroCPH - Managing data consistency in a microservice architecture using Sagas
 

Similar a Scenarios_and_Architecture_SkillsMatter_April_2022.pdf

Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
JAXLondon2014
 

Similar a Scenarios_and_Architecture_SkillsMatter_April_2022.pdf (20)

Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
 
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
 
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
 
Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...
 
Microservices: Decomposing Applications for Deployability and Scalability (ja...
Microservices: Decomposing Applications for Deployability and Scalability (ja...Microservices: Decomposing Applications for Deployability and Scalability (ja...
Microservices: Decomposing Applications for Deployability and Scalability (ja...
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
 
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
 
SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability
 
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
 
There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)
 
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
 
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
 
Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)
 
Saturn2017: No such thing as a microservice!
Saturn2017: No such thing as a microservice! Saturn2017: No such thing as a microservice!
Saturn2017: No such thing as a microservice!
 
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
 
Spring Days NYC - A pattern language for microservices
Spring Days NYC - A pattern language for microservicesSpring Days NYC - A pattern language for microservices
Spring Days NYC - A pattern language for microservices
 
ArchitectNow - Designing Cloud-Native apps in Microsoft Azure
ArchitectNow  -  Designing Cloud-Native apps in Microsoft AzureArchitectNow  -  Designing Cloud-Native apps in Microsoft Azure
ArchitectNow - Designing Cloud-Native apps in Microsoft Azure
 
Microservices and the Cloud based future of integration final
Microservices and the Cloud based future of integration finalMicroservices and the Cloud based future of integration final
Microservices and the Cloud based future of integration final
 

Más de Chris Richardson

Más de Chris Richardson (14)

YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
 
Dark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patternsDark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patterns
 
Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...
 
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
 
Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)
 
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
 
Overview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders applicationOverview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders application
 
An overview of the Eventuate Platform
An overview of the Eventuate PlatformAn overview of the Eventuate Platform
An overview of the Eventuate Platform
 
#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith
 
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
 
GotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
GotoChgo 2019: Not Just Events: Developing Asynchronous MicroservicesGotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
GotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
 
YOW2018 - Events and Commands: Developing Asynchronous Microservices
YOW2018 - Events and Commands: Developing Asynchronous MicroservicesYOW2018 - Events and Commands: Developing Asynchronous Microservices
YOW2018 - Events and Commands: Developing Asynchronous Microservices
 
Mucon: Not Just Events: Developing Asynchronous Microservices
Mucon: Not Just Events: Developing Asynchronous MicroservicesMucon: Not Just Events: Developing Asynchronous Microservices
Mucon: Not Just Events: Developing Asynchronous Microservices
 
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...OReilly SACON London: Potholes in the road from monolithic hell: Microservice...
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...
 

Último

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Último (20)

%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
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
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 

Scenarios_and_Architecture_SkillsMatter_April_2022.pdf

  • 1. @crichardson Using scenarios to reinvigorate your (microservice) architecture Chris Richardson Microservice architecture consulting and training Founder of Eventuate.io Founder of the original CloudFoundry.com Author of POJOs in Action and Microservices Patterns @crichardson chris@chrisrichardson.net http://adopt.microservices.io Copyright © 2022. Chris Richardson Consulting, Inc. All rights reserved ^ views and
  • 2. @crichardson Presentation goal How to create minimal, yet effective architecture documentation Order Management Consumer Management Credit Card Payments Restaurant Management Accounting Kitchen Management Vague! API Gateway Import DynamoDB Kinesis Streams Lambda Query Technology focussed Disconnected from functional requirements
  • 4. @crichardson Discounts 35% discount au35ric $100 discount coupon QVYVPXMY until June 6th http://adopt.microservices.io
  • 5. @crichardson Agenda The 4+1 view model of software architecture Documenting the FTGO application Beyond views
  • 6. The goal of architecture is to satisfy non-functional requirements Nonfunctional requirements Development Runtime Scalability Performance Availability … Maintainability Testability Deployability … Often neglected
  • 7. About software architecture “The software architecture of a computing system is the set of structures needed to reason about the system, which comprise software elements, relations among them, and properties of both.” Documenting Software Architectures, Bass et al
  • 8. De fi ningthe architecture of a new application Learningthe architecture, e.g. new team member Evaluatingthe architecture in order to improve it Evolvingthe architecture to satisfy changed requirements “The software architecture of a computing system is the set of structures needed to reason about the system, which comprise software elements, relations among them, and properties of both.”
  • 9. @crichardson Architecture = (elements, relations, properties) “The software architecture of a computing system is the set of structures needed to reason about the system, which comprise software elements, relations among them, and properties of both.”
  • 11. @crichardson Architecture is multi-dimensional • Structural • Electrical • Plumbing • Mechanical • …
  • 13. 4+1 view model of software architecture Logical View Process View Deployment View Implementation View Scenarios https://en.wikipedia.org/wiki/4%2B1_architectural_view_model
  • 14. 4+1 Logical view Logical View Process View Deployment View Implementation View Scenarios Elements: classes and packages Relations: inheritance, associations, …
  • 15. 4+1 Implementation view Logical View Process View Deployment View Implementation View Scenarios Elements: modules and components Relations: dependencies Monolith = one component Microservices = many components
  • 18. @crichardson Different views describe different aspects of the architecture Logical View Process View Deployment View Implementation View Dev Ops Modularity Loose coupling Availability Scalability
  • 19. +1 = 5th view = Scenarios Logical View Process View Deployment View Implementation View Scenarios Derived from use cases/stories Animate the views Elements from a view
  • 20. @crichardson Views: more than just pretty pictures «Service» Order Management «Service» Consumer Management «Service» Credit Card Payments «Service» Restaurant Management «Service» Accounting «Service» Kitchen Management «Service» Service «Database» Database Uses API Legend Part-of «Service» API Gateway «async» «subscribes to» «async» «async» «async» «async» «sync» «sync» «sync» «sync» «sync» Diagram Description of elements and relations
  • 21. @crichardson Alternatives to the classic 4+1 views There are other views, e.g. Modern deployment technologies (Kubernetes, Serverless) don’t fi t with process/deployment views Hybrid views and scenarios that mix elements (e.g. services and entities) Git repository/Service/Deployment pipeline view … Goal is communicate => use the views that are useful
  • 22. @crichardson Agenda The 4+1 view model of software architecture Documenting the FTGO application Beyond views
  • 23. @crichardson Documenting the FTGO application «Service» Order Management «Service» Consumer Management «Service» Credit Card Payments «Service» Restaurant Management «Service» Accounting «Service» Kitchen Management «Service» Service «Database» Database Uses API Legend Part-of «Service» API Gateway «async» «subscribes to» «async» «async» «async» «async» «sync» «sync» «sync» «sync» «sync» Implementation Logical CircleCI deployment pipeline «AWS ECR repository» ftgo-XYZ-service «Github Repository» ftgo/ftgo-XYZ-service Commit Push Image «Github Repository» Kubernetes YAML Kubernetes API EKS cluster Commit 3 AZ EKS cluster Ingress managed ALB 3 AZ RDS Aurora React application static resources S3 bucket api.app.acme.com app.acme.com Browser Cloudfront <<service>> Order management API Gateway Managed Apache Kafka React SPA Deployment Repository/ deployment pipeline
  • 24. @crichardson Implementation view: diagram «Service» Order Management «Service» Consumer Management «Service» Credit Card Payments «Service» Restaurant Management «Service» Accounting «Service» Kitchen Management «Service» Service «Database» Database Uses API Legend Part-of «Service» API Gateway «async» «subscribes to» «async» «async» «async» «async» «sync» «sync» «sync» «sync» «sync» Legend! Stereotypes
  • 26. @crichardson Implementation view: services + … <<restaurant events channel>> «Service» Delivery Management «Subdomain» Delivery Management «Subdomain» Courier Management «CQRS View» Order History «Database» Restaurant Management «library» Tax Calculator «Service» Delivery Management +
  • 27. @crichardson Variation: Visualizing subdomain to service mapping «Service» Restaurant Management «Service» Order Management «async» «Service» Delivery Management «Uses» «Subdomain» Delivery Management «Subdomain» Courier Management «Subdomain» Restaurant Management «Subdomain» Order Management Not always 1 to 1
  • 28. @crichardson Variation: Visualizing messaging «Service» Order Management «Service» Restaurant Management «subscribes to» «Service» Order Management «Service» Restaurant Management <<restaurant events channel>> «subscribes to» Channel Restaurant events Ordered Yes Delivery At-least once Subscription Durable … …
  • 29. @crichardson Variation: Visualizing shared libraries «Service» Order Management «Service» Accounting «Service» Service «Database» Database Uses API Legend Part-of «async» «library» Money «library» Tax Calculator «Uses» «Uses» Anti-pattern: tight coupling Probably ok
  • 30. @crichardson Variation: Visualizing shared databases Anti-pattern: tight coupling «Service» Order Management «Service» Restaurant Management «Service» Service «Database» Database Uses API Legend Part-of «async» «Database» Restaurant Management «Uses»
  • 31. @crichardson Variation: Visualizing CQRS views «Service» Order History «Service» Order Management «CQRS View» Order History «Service» Kitchen Management «Service» Delivery Management «Subscribes to» «Subscribes to» «Subscribes to»
  • 32. @crichardson Implementation view scenario: collaborating services and entities Clari fi es
  • 33. @crichardson Documenting the FTGO application «Service» Order Management «Service» Consumer Management «Service» Credit Card Payments «Service» Restaurant Management «Service» Accounting «Service» Kitchen Management «Service» Service «Database» Database Uses API Legend Part-of «Service» API Gateway «async» «subscribes to» «async» «async» «async» «async» «sync» «sync» «sync» «sync» «sync» Implementation Logical CircleCI deployment pipeline «AWS ECR repository» ftgo-XYZ-service «Github Repository» ftgo/ftgo-XYZ-service Commit Push Image «Github Repository» Kubernetes YAML Kubernetes API EKS cluster Commit 3 AZ EKS cluster Ingress managed ALB 3 AZ RDS Aurora React application static resources S3 bucket api.app.acme.com app.acme.com Browser Cloudfront <<service>> Order management API Gateway Managed Apache Kafka React SPA Deployment Repository/ deployment pipeline
  • 34. @crichardson Logical view: diagram «subdomain» Subdomain A «subdomain» Subdomain B Uses Legend
  • 37. @crichardson Documenting the FTGO application «Service» Order Management «Service» Consumer Management «Service» Credit Card Payments «Service» Restaurant Management «Service» Accounting «Service» Kitchen Management «Service» Service «Database» Database Uses API Legend Part-of «Service» API Gateway «async» «subscribes to» «async» «async» «async» «async» «sync» «sync» «sync» «sync» «sync» Implementation Logical CircleCI deployment pipeline «AWS ECR repository» ftgo-XYZ-service «Github Repository» ftgo/ftgo-XYZ-service Commit Push Image «Github Repository» Kubernetes YAML Kubernetes API EKS cluster Commit 3 AZ EKS cluster Ingress managed ALB 3 AZ RDS Aurora React application static resources S3 bucket api.app.acme.com app.acme.com Browser Cloudfront <<service>> Order management API Gateway Managed Apache Kafka React SPA Deployment Repository/ deployment pipeline
  • 39. @crichardson Deployment: K8S cluster/AWS 3 AZ EKS cluster Ingress managed ALB 3 AZ RDS Aurora React application static resources S3 bucket api.app.acme.com app.acme.com Browser Cloudfront <<service>> Order management API Gateway Managed Apache Kafka React SPA
  • 40. @crichardson Deployment view: description ReactJS frontend served by Cloudfront from S3 bucket Application services (+ API Gateway) deployed on AWS EKS: K8S service + deployment API entry point = K8S Ingress managed ALB AWS resources (EKS, RDS Aurora, MKS, …) deployed to three availability zones
  • 41. @crichardson Deployment view: scenario Browser React SPA Ingress managed ALB API Gateway Order Service POST /orders POST /orders POST /orders
  • 42. @crichardson Documenting the FTGO application «Service» Order Management «Service» Consumer Management «Service» Credit Card Payments «Service» Restaurant Management «Service» Accounting «Service» Kitchen Management «Service» Service «Database» Database Uses API Legend Part-of «Service» API Gateway «async» «subscribes to» «async» «async» «async» «async» «sync» «sync» «sync» «sync» «sync» Implementation Logical CircleCI deployment pipeline «AWS ECR repository» ftgo-XYZ-service «Github Repository» ftgo/ftgo-XYZ-service Commit Push Image «Github Repository» Kubernetes YAML Kubernetes API EKS cluster Commit 3 AZ EKS cluster Ingress managed ALB 3 AZ RDS Aurora React application static resources S3 bucket api.app.acme.com app.acme.com Browser Cloudfront <<service>> Order management API Gateway Managed Apache Kafka React SPA Deployment Repository/ deployment pipeline
  • 43. @crichardson Repository and deployment pipeline view CircleCI deployment pipeline «AWS ECR repository» ftgo-XYZ-service «Github Repository» ftgo/ftgo-XYZ-service Commit Push Image «Github Repository» Kubernetes YAML Kubernetes API EKS cluster Commit Per-service Per-cluster
  • 44. @crichardson Agenda The 4+1 view model of software architecture Documenting the FTGO application Beyond views
  • 45. @crichardson Vision FTGO is a food delivery application. Consumers use FTGO to place food orders at local restaurants. FTGO coordinates a network of couriers who deliver the orders. It’s also responsible for paying couriers and restaurants. Restaurants use the FTGO website to edit their menus and manage orders.
  • 47. Architecturally signi fi cant user stories/scenarios Capture the essence of the application In fl uence the architecture: Complex, e.g. span multiple subdomains Business critical/highly available Low latency Process large amounts of data ….
  • 48. @crichardson BDD-style scenarios: precise description of behavior in terms of business entities Givens = pre-conditions Thens = post-conditions De fi nes “request”
  • 49. @crichardson Business objects Distill scenarios into system operations FTGO Application createOrder() fi ndOrder() … Via UI Application Invokes Subscribes to Triggers Model application behavior cancelOrder() ≪commands≫ ≪queries≫ … Mutates and queries Business objects
  • 50. @crichardson Non-functional requirements Quality category Quality Description Availability Tier 1 (highest) Order fl ow Tier 2 (medium) Account management Tier … … Performance Throughput … Latency … … … …
  • 53. @crichardson Architecture Decision Records: documenting why https://github.com/joelparkerhenderson/architecture-decision-record
  • 54. @crichardson Summary The software architecture of a computing system is the set of structures needed to reason about the system Architecture is multi-dimensional Each dimension is described by a view View = elements + relations + their properties = pictures and words Documenting architecturally signi fi cant user stories/scenarios is essential Scenarios animate the elements of a view and connect it to functional requirements