SlideShare a Scribd company logo
@crichardson
There is no such thing as a
microservice!
Chris Richardson
Founder of Eventuate.io
Founder of the original CloudFoundry.com
Author of POJOs in Action
@crichardson
chris@chrisrichardson.net
http://microservices.io
http://eventuate.io
http://plainoldobjects.com
Copyright © 2017. Chris Richardson Consulting, Inc. All rights reserved
@crichardson
Presentation goal
Define the Microservice Architecture
as an architectural style
Explain what that means and why it
matters
@crichardson
About Chris
@crichardson
About Chris
Consultant and trainer
focusing on modern
application architectures
including microservices
(http://www.chrisrichardson.net/)
@crichardson
About Chris
Founder of a startup that is creating
an open-source/SaaS platform
that simplifies the development of
transactional microservices
(http://eventuate.io)
@crichardson
About Chris
https://www.manning.com/books/microservice-patterns
@crichardson
For more information
http://learnmicroservices.io
@crichardson
Agenda
A brief refresher on software architecture
From monolith to microservices
Microservices != silver bullet
Managing distributed data
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
@crichardson
Architecture
=
(elements, relations, properties)
@crichardson
Architecture
=
Boxes and lines 😄
@crichardson
Architecture is multi-dimensional
e.g. Structural, electrical, plumbing,
mechanical
Described by multiple views
View = (elements, relations, properties)
4+1 view model
Logical
View
Process
View
Deployment
View
Implementation
View
Scenarios
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
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
4+1 Scenarios
Logical
View
Process
View
Deployment
View
Implementation
View
Scenarios
Derived from use cases/stories
Animate the views
@crichardson
""… An architectural style determines
the vocabulary of components and
connectors that can be used in instances
of that style, together with a set of
constraints on how they can be
combined….. ””
David Garlan and Mary Shaw, An Introduction to Software
Architecture
@crichardson
Layered architectural style
Layer N
Layer N - 1
Layer N - 2
Well defined
responsibilities
The role of architecture
Requirements
=
Functional requirements
+
Non-functional requirements (-ilities)
Domain
knowledge
Architecture
Important -ilities
Maintainability
Evolvability
Testability
Deployability
Scalability
Security
Reliability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
Development
velocity
@crichardson
Businesses must innovate
faster
Build better software faster
@crichardson
Reducing lead time
Increasing deployment frequency
@crichardson
Modern software development
Architecture:
Process:
Small, autonomous
teams
???
Continuous delivery/deployment
Organization:
Agenda
A brief refresher on software architecture
From monolith to microservices
Microservices != silver bullet
Managing distributed data
@crichardson
Tomcat/App. Server
Traditional: Monolithic
architecture
Browser/
Client
WAR/EAR
MySQL
Database
Review Module
Catalog
Module
Recommendation
Module
StoreFrontUI
Order Module
HTML
REST/JSON
Logical view
@crichardson
The monolithic architecture
is an architectural style
that structures the application
as a single executable
component
Implementation view
-ilities of small monoliths
Maintainability
Evolvability
Testability
Deployability
Scalability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
😄
@crichardson
But successful applications
keep growing….
Development
Team
Application
@crichardson
… and growing
Development
Team A
ApplicationDevelopment
Team B
Development
Team C
@crichardson
Eventually:
agile
development
and deployment
becomes
impossible
=
monolithic hell
@crichardson
Technology stack becomes
increasingly obsolete
BUT
A rewrite is not feasible
-ilities of large monoliths
Maintainability
Evolvability
Testability
Deployability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
😭
The microservice architecture
is an architectural style
that structures an
application as a
set of loosely coupled,
services organized around
business capabilities
Implementation view
@crichardson
A business has a business
capabilities
Acme, Inc
Order
Taking
Inventory
management
Delivery
management
A
Business Capability
is something a
business
does in order to
deliver value
…
@crichardson
Service = business capability
Order Taking
Service
Inventory
management Service
Delivery management
Service
…
Service
Service size is secondary
microservice architecture
Service:
Meaningful business functionality
Developed by a small team
Minimal lead time/high deployment
frequency
Microservices
=
Microservice architecture
=
Application architecture
No such thing as a microservice
@crichardson
Example microservice architecture
Browser
Mobile
Device
Store
Front
Web App
API
Gateway
Catalog
Service
Review
Service
Order
Service
…
Service
Catalog
Database
Review
Database
Order
Database
…
Database
HTML
REST
REST
Supplier
Inbound
Gateway
Catalog update
messages
Supplier
System
-ilities of a microservice
architecture
Maintainability
Evolvability
Testability
Deployability
Scalability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
😄
@crichardson
Microservices enable
continuous delivery/deployment
Process:
Continuous delivery/deployment
Organization:
Small, agile, autonomous,
cross functional teams
Architecture:
Microservice architecture
Enables
Enables
Enables
Successful
Software
Development
Services improve
testability
and
deployability
Teams own services
@crichardson
Evolve the technology stack
Pick a new technology when
Writing a new service
Making major changes to an existing service
Let’s you experiment and fail safely
@crichardson
Agenda
A brief refresher on software architecture
From monolith to microservices
Microservices != silver bullet
Managing distributed data
@crichardson
No silver bullets
http://en.wikipedia.org/wiki/Fred_Brooks
@crichardson
Drawbacks of microservices
Complexity
Development: partial failure, distributed data
Testing: Integration, end to end, …
Deployment
…
@crichardson
Are microservices a good fit
for my application?
@crichardson
When using microservices:
How to decompose an application into services?
How to deploy an application’s services?
How to handle cross cutting concerns?
Which communication mechanisms to use?
How do external clients communicate with the services?
How does a client discover the network location of a service instance?
How to prevent a network or service failure from cascading to other services?
How to maintain data consistency and implement queries?
How to make testing easier?
How to understand the behavior of an application and troubleshoot problems?
How to implement a UI screen or page that displays data from multiple services?
@crichardson
It depends!
@crichardson
What’s a pattern?
Reusable solution
to a problem
occurring
in a particular context
@crichardson
The structure of a pattern
Resulting context
aka the situation
Name
Context
Problem
Related patterns
(conflicting) issues
etc to address
Forces
Solution
@crichardson
Example resulting context
Microservice
Architecture
Benefits
Drawbacks
Issues to resolve
@crichardsonMicroservice patterns
Communication patterns
Core
Cross-cutting concerns Security
Deployment
Maintaining data consistency
Database architecture
External API
Reliability
Discovery
Communication style
Testing
Observability
UI
Decomposition
API gateway
Client-side discovery
Server-side
discovery
Service registry
Self registration
3rd party registration
Multiple Services
per host
Single Service per
Host
Service-per-
Container
Service-per-VM
Messaging
Remote Procedure
Invocation
Database per
Service
Event-driven
architectureShared
database
Microservice
Chassis
Backend for front end
Event
sourcing
Transaction
log tailing
Database
triggers
Application
events
Monolithic
architecture
Microservice
architecture
CQRS
Motivating
Pattern
Solution
Pattern
Solution A Solution B
General Specific
Serverless
deployment
Circuit BreakerAccess Token
Domain-specific
Externalized
configuration
Service Integration
Contract Test
Service
Component Test
Exception
tracking
Distributed
tracing
Audit logging
Application
metrics
Log
aggregation
Health check
API
Service deployment
platform
Server-side page
fragment
composition
Client-side UI
composition
Decompose by
business capability
Decompose by
subdomain
Application patterns
Infrastructure patterns
Application Infrastructure patterns
Microservices pattern language: http://microservices.io
@crichardson
Agenda
A brief refresher on software architecture
From monolith to microservices
Microservices != silver bullet
Managing distributed data
@crichardson
Loose coupling =
encapsulated data
Order Service Customer Service
Order Database Customer Database
Order table
Customer
table
orderTotal creditLimit
@crichardson
How to enforce credit limit?
sum(order.total) <= customer.creditLimit
@crichardson
How to enforce credit limit?
BEGIN TRANSACTION
…
SELECT ORDER_TOTAL
FROM ORDERS WHERE CUSTOMER_ID = ?
…
SELECT CREDIT_LIMIT
FROM CUSTOMERS WHERE CUSTOMER_ID = ?
…
INSERT INTO ORDERS …
…
COMMIT TRANSACTION
Private to the
Order Service
Private to the
Customer Service
Distributed transactions
@crichardson
2PC is not an option
@crichardson
Saga
Instead: use event-driven sagas
Distributed transaction
Order Customer
Local transaction
Order
Local transaction
Customer
Local transaction
Order
Event
Event
@crichardson
Order Service
Saga-based, eventually consistent
order processing
Customer Service
Order created
Credit Reserved
Credit Check Failed
Create Order
OR Customer
creditLimit
creditReservations
...
Order
state
total
…
approve()/reject()
Event Handler
Event Handler
reserveCredit()
@crichardson
But how to reliably
update the database
and
publish events?
@crichardson
Event sourcing: event-centric
persistence
Event table
Entity type
Event
id
Entity
id
Event
data
Order 902101 …OrderApproved
Order 903101 …OrderShipped
Event
type
Order 901101 …OrderCreated
@crichardson
How to find recent, valuable
customers?
SELECT *
FROM CUSTOMER c, ORDER o
WHERE
c.id = o.ID
AND o.ORDER_TOTAL > 100000
AND o.STATE = 'SHIPPED'
AND c.CREATION_DATE > ?
Customer
Service
Order Service
What if event
sourcing is
used?…. is no longer easy
@crichardson
Command Query Responsibility
Segregation (CQRS)
Command side
Commands
Aggregate
Event Store
Events
Query side
Queries
(Materialized)
View
Events
POST
PUT
DELETE
GET
@crichardson
Queries database (type)
Command side
POST
PUT
DELETE
Aggregate
Event Store
Events
Query side
GET /customers/id
MongoDB
Query side
GET /orders?text=xyz
ElasticSearch
Query side
GET …
Neo4j
@crichardson
Summary
The goal of architecture is to satisfy non-functional
requirements
Use the appropriate architectural style
Small applications Monolithic architecture
Complex applications Microservice architecture
Use the pattern language to guide your decision making
Use an event-driven architecture for transactions and queries
@crichardson
@crichardson chris@chrisrichardson.net
http://learnmicroservices.io
Thank you!

More Related Content

PDF
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
PDF
microXchg: Managing data consistency in a microservice architecture using Sagas
PDF
QCONSF - ACID Is So Yesterday: Maintaining Data Consistency with Sagas
PDF
Kong Summit 2018 - Microservices: decomposing applications for testability an...
PDF
Spring Days NYC - A pattern language for microservices
PDF
Mucon: Not Just Events: Developing Asynchronous Microservices
PDF
Gluecon: Using sagas to maintain data consistency in a microservice architecture
PDF
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
microXchg: Managing data consistency in a microservice architecture using Sagas
QCONSF - ACID Is So Yesterday: Maintaining Data Consistency with Sagas
Kong Summit 2018 - Microservices: decomposing applications for testability an...
Spring Days NYC - A pattern language for microservices
Mucon: Not Just Events: Developing Asynchronous Microservices
Gluecon: Using sagas to maintain data consistency in a microservice architecture
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...

What's hot (20)

PDF
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
PDF
Saturn2017: No such thing as a microservice!
PDF
Oracle Code One: Events and commands: developing asynchronous microservices
PDF
Solving distributed data management problems in a microservice architecture (...
PDF
Oracle Code Sydney - There is no such thing as a microservice!
PDF
JavaOne2017: ACID Is So Yesterday: Maintaining Data Consistency with Sagas
PDF
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...
PDF
A Pattern Language for Microservices
PDF
SVCC Developing Asynchronous, Message-Driven Microservices
PDF
OReilly SACON2018 - Events on the outside, on the inside, and at the core
PDF
Microservices in Java and Scala (sfscala)
PDF
Developing event-driven microservices with event sourcing and CQRS (london Ja...
PDF
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
PDF
MicroCPH - Managing data consistency in a microservice architecture using Sagas
PDF
Microservices and Redis #redisconf Keynote
PDF
YOW2018 - Events and Commands: Developing Asynchronous Microservices
PDF
Events to the rescue: solving distributed data problems in a microservice arc...
PDF
GotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
PDF
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
PDF
A Pattern Language for Microservices (@futurestack)
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Saturn2017: No such thing as a microservice!
Oracle Code One: Events and commands: developing asynchronous microservices
Solving distributed data management problems in a microservice architecture (...
Oracle Code Sydney - There is no such thing as a microservice!
JavaOne2017: ACID Is So Yesterday: Maintaining Data Consistency with Sagas
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...
A Pattern Language for Microservices
SVCC Developing Asynchronous, Message-Driven Microservices
OReilly SACON2018 - Events on the outside, on the inside, and at the core
Microservices in Java and Scala (sfscala)
Developing event-driven microservices with event sourcing and CQRS (london Ja...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
MicroCPH - Managing data consistency in a microservice architecture using Sagas
Microservices and Redis #redisconf Keynote
YOW2018 - Events and Commands: Developing Asynchronous Microservices
Events to the rescue: solving distributed data problems in a microservice arc...
GotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
A Pattern Language for Microservices (@futurestack)
Ad

Similar to There is no such thing as a microservice! (oracle code nyc) (20)

PDF
Code Freeze 2018: There is no such thing as a microservice!
PDF
The microservice architecture: what, why, when and how?
PDF
RedisConf17 - A pattern language for microservices - Chris Richardson
PDF
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
PDF
Microservices - an architecture that enables DevOps (T Systems DevOps day)
PDF
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
PDF
Using patterns and pattern languages to make better architectural decisions
PDF
SVCC Microservices: Decomposing Applications for Testability and Deployability
PDF
A pattern language for microservices (melbourne)
PDF
A pattern language for microservices - June 2021
PDF
Microservices pattern language (microxchg microxchg2016)
PDF
A pattern language for microservices
PDF
A pattern language for microservices - Chris Richardson
PDF
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
PDF
Decompose that WAR? A pattern language for microservices (@QCON @QCONSP)
PDF
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
PDF
Dark Energy, Dark Matter and the Microservices Patterns?!
PDF
Understanding MicroSERVICE Architecture with Java & Spring Boot
PDF
Introduction to MicroServices (Oakjug)
PPTX
Introduction to Microservices
Code Freeze 2018: There is no such thing as a microservice!
The microservice architecture: what, why, when and how?
RedisConf17 - A pattern language for microservices - Chris Richardson
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Microservices - an architecture that enables DevOps (T Systems DevOps day)
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
Using patterns and pattern languages to make better architectural decisions
SVCC Microservices: Decomposing Applications for Testability and Deployability
A pattern language for microservices (melbourne)
A pattern language for microservices - June 2021
Microservices pattern language (microxchg microxchg2016)
A pattern language for microservices
A pattern language for microservices - Chris Richardson
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
Decompose that WAR? A pattern language for microservices (@QCON @QCONSP)
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
Dark Energy, Dark Matter and the Microservices Patterns?!
Understanding MicroSERVICE Architecture with Java & Spring Boot
Introduction to MicroServices (Oakjug)
Introduction to Microservices
Ad

More from Chris Richardson (13)

PDF
More the merrier: a microservices anti-pattern
PDF
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
PDF
Dark energy, dark matter and microservice architecture collaboration patterns
PDF
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
PDF
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
PDF
Designing loosely coupled services
PDF
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
PDF
Decompose your monolith: Six principles for refactoring a monolith to microse...
PDF
Overview of the Eventuate Tram Customers and Orders application
PDF
An overview of the Eventuate Platform
PDF
#DevNexus202 Decompose your monolith
PDF
Decompose your monolith: strategies for migrating to microservices (Tide)
PDF
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
More the merrier: a microservices anti-pattern
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
Dark energy, dark matter and microservice architecture collaboration patterns
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Designing loosely coupled services
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
Decompose your monolith: Six principles for refactoring a monolith to microse...
Overview of the Eventuate Tram Customers and Orders application
An overview of the Eventuate Platform
#DevNexus202 Decompose your monolith
Decompose your monolith: strategies for migrating to microservices (Tide)
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...

Recently uploaded (20)

PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
AI in Product Development-omnex systems
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Nekopoi APK 2025 free lastest update
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Online Work Permit System for Fast Permit Processing
Operating system designcfffgfgggggggvggggggggg
How Creative Agencies Leverage Project Management Software.pdf
Odoo Companies in India – Driving Business Transformation.pdf
ai tools demonstartion for schools and inter college
AI in Product Development-omnex systems
2025 Textile ERP Trends: SAP, Odoo & Oracle
Which alternative to Crystal Reports is best for small or large businesses.pdf
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Softaken Excel to vCard Converter Software.pdf
Odoo POS Development Services by CandidRoot Solutions
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Adobe Illustrator 28.6 Crack My Vision of Vector Design
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Design an Analysis of Algorithms II-SECS-1021-03
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
How to Choose the Right IT Partner for Your Business in Malaysia
Nekopoi APK 2025 free lastest update
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...

There is no such thing as a microservice! (oracle code nyc)