there is no such thing as a microservice! · 2018-01-18 · technology stack becomes increasingly...
TRANSCRIPT
![Page 1: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/1.jpg)
@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 [email protected] http://microservices.io http://eventuate.io http://plainoldobjects.com
Copyright © 2017. Chris Richardson Consulting, Inc. All rights reserved
![Page 2: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/2.jpg)
@crichardson
Presentation goal
Define the Microservice Architecture
as an architectural style
Explain what that means and why it
matters
![Page 3: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/3.jpg)
@crichardson
About Chris
![Page 4: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/4.jpg)
@crichardson
About Chris
![Page 5: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/5.jpg)
@crichardson
About Chris
![Page 6: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/6.jpg)
@crichardson
About Chris
![Page 7: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/7.jpg)
@crichardson
About Chris
![Page 8: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/8.jpg)
@crichardson
About Chris
Consultant and trainer focusing on modern
application architectures including microservices
(http://www.chrisrichardson.net/)
![Page 9: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/9.jpg)
@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)
![Page 10: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/10.jpg)
@crichardson
About Chris
http://learnmicroservices.io
40% off ctwcodefreeze18
![Page 11: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/11.jpg)
@crichardson
Agenda
A brief refresher on software architecture
From monolith to microservices
Microservices != silver bullet
Applying the microservice pattern language
![Page 12: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/12.jpg)
@crichardson
Agenda
A brief refresher on software architecture
From monolith to microservices
Microservices != silver bullet
Applying the microservice pattern language
![Page 13: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/13.jpg)
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
![Page 14: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/14.jpg)
@crichardson
Architecture =
(elements, relations, properties)
![Page 15: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/15.jpg)
@crichardson
Architecture =
Boxes and lines 😄
![Page 16: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/16.jpg)
@crichardson
Architecture is multi-dimensional e.g. Structural, electrical, plumbing,
mechanical
![Page 17: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/17.jpg)
@crichardson
Architecture is multi-dimensional e.g. Structural, electrical, plumbing,
mechanical⇒
Described by multiple views
![Page 18: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/18.jpg)
@crichardson
Architecture is multi-dimensional e.g. Structural, electrical, plumbing,
mechanical⇒
Described by multiple views
View = (elements, relations, properties)
![Page 19: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/19.jpg)
4+1 view model
Logical View
Process View
Deployment View
Implementation View
Scenarios
![Page 20: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/20.jpg)
4+1 Logical view
Logical View
Process View
Deployment View
Implementation View
Scenarios
Elements: classes and packages Relations: inheritance, associations, …
![Page 21: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/21.jpg)
4+1 Implementation view
Logical View
Process View
Deployment View
Implementation View
Scenarios
Elements: modules and components Relations: dependencies
![Page 22: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/22.jpg)
4+1 Process view
Logical View
Process View
Deployment View
Implementation View
ScenariosElements: processes Relations: IPC
![Page 23: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/23.jpg)
4+1 Deployment view
Logical View
Process View
Deployment View
Implementation View
ScenariosElements: “machines” Relations: networking
![Page 24: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/24.jpg)
4+1 Scenarios
Logical View
Process View
Deployment View
Implementation View
ScenariosDerived from use cases/stories
Animate the views
![Page 25: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/25.jpg)
@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
![Page 26: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/26.jpg)
@crichardson
Layered architectural style
![Page 27: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/27.jpg)
@crichardson
Layered architectural styleLayer N
Layer N - 1
Layer N - 2
Well defined responsibilities
Constrained dependencies
Uses Uses
UsesUses
![Page 28: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/28.jpg)
The role of architecture
Requirements =
Functional requirements +
Non-functional requirements (-ilities)
Domain knowledge
Architecture
![Page 29: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/29.jpg)
Important -ilitiesMaintainability
Testability
Deployability
Evolvability
Scalability
Security
Reliability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
![Page 30: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/30.jpg)
Important -ilitiesMaintainability
Testability
Deployability
Evolvability
Scalability
Security
Reliability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
Sunday afternoon 😀
![Page 31: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/31.jpg)
Important -ilitiesMaintainability
Testability
Deployability
Evolvability
Scalability
Security
Reliability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
Development velocity
Sunday afternoon 😀
![Page 32: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/32.jpg)
@crichardson
Businesses must innovate faster ⇒
Build better software faster
![Page 33: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/33.jpg)
@crichardson
Reducing lead time
Increasing deployment frequency
![Page 34: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/34.jpg)
@crichardson
Modern software development: moving fast and not breaking things!
46x
440x
24x
5x lower
Amazon: ~0.001%
Netflix: 16 minutes
![Page 35: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/35.jpg)
@crichardson
Modern software development
Architecture:
Process:
Small, autonomous teams
???
DevOps/Continuous delivery/deployment
Organization:
![Page 36: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/36.jpg)
Agenda
A brief refresher on software architecture
From monolith to microservices
Microservices != silver bullet
Applying the microservice pattern language
![Page 37: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/37.jpg)
@crichardson
Traditional: Monolithic architecture
Review Management
Catalog Management
Recommendation Management
StoreFrontUI
Order Management
Logical view
![Page 38: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/38.jpg)
@crichardson
Tomcat/App. Server
Traditional: Monolithic architecture
Browser/Client
WAR/EAR
MySQL Database
Review Management
Catalog Management
Recommendation Management
StoreFrontUI
Order Management
HTMLREST/JSON
Logical viewImplementation view
![Page 39: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/39.jpg)
@crichardson
The monolithic architecture is an architectural style
that structures the application as a single executable
component
Implementation view
![Page 40: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/40.jpg)
-ilities of small monoliths
Maintainability
Testability
Deployability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
😄
![Page 41: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/41.jpg)
@crichardson
But successful applications keep growing….
Development Team Application
![Page 42: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/42.jpg)
@crichardson
But successful applications keep growing….
Development Team Application
![Page 43: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/43.jpg)
@crichardson
But successful applications keep growing….
Development Team Application
![Page 44: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/44.jpg)
@crichardson
But successful applications keep growing….
Development Team Application
![Page 45: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/45.jpg)
@crichardson
… and growing
Development Team A
ApplicationDevelopment Team B
Development Team C
![Page 46: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/46.jpg)
@crichardson
Eventually:
agile development
and deployment becomes
impossible
=
monolithic hell
![Page 47: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/47.jpg)
@crichardson
Technology stack becomes increasingly obsolete
BUT A rewrite is not feasible
![Page 48: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/48.jpg)
-ilities of large monoliths
Maintainability
Testability
Deployability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
😭
![Page 49: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/49.jpg)
The microservice architecture is an architectural style
that structures an application as a
set of loosely coupled, services organized around
business capabilities
![Page 50: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/50.jpg)
@crichardson
Service = business capabilityAcme, Inc
Order Taking
Inventory management
Delivery management
Business Capability = something a business does to deliver value
…
![Page 51: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/51.jpg)
@crichardson
Application
Service = business capabilityAcme, Inc
Order Taking
Inventory management
Delivery management
Business Capability = something a business does to deliver value
…
Order Service
Inventory Management
Service
Delivery Management
Service … Service
![Page 52: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/52.jpg)
@crichardson
Service = independently deployable component
CommandQuery
API
EventPublisher
EventSubscriber
APIClient
Consumer facing Implementation
Synchronous: REST, gRPC, …Asynchronous: Command/Reply, Notification
Service database
EventsEvents
Synchronous: REST, gRPC, …
Asynchronous: Command/Reply, Notification
Data owned by the service
Data replicated from elsewhereSLA
![Page 53: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/53.jpg)
Service size is secondary
microservice architecture
![Page 54: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/54.jpg)
Service:
Meaningful business functionality
Developed by a small team
Minimal lead time/high deployment frequency
![Page 55: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/55.jpg)
Microservices =
Microservice architecture =
Application architecture ⇒
No such thing as a microservice
![Page 56: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/56.jpg)
@crichardson
![Page 57: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/57.jpg)
@crichardson
Catalog Service
Review Service
Order Service
… Service
![Page 58: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/58.jpg)
@crichardson
Catalog Service
Review Service
Order Service
… Service
Catalog Database
Review Database
Order Database
… Database
![Page 59: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/59.jpg)
@crichardson
Browser Content Router
Catalog Service
Review Service
Order Service
… Service
Catalog Database
Review Database
Order Database
… Database
HTTP /HTML
Browse & Search WebApp
Product Detail WebApp
….
![Page 60: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/60.jpg)
@crichardson
Browser Content Router
API Gateway
Catalog Service
Review Service
Order Service
… Service
Catalog Database
Review Database
Order Database
… Database
HTTP /HTML
Browse & Search WebApp
Product Detail WebApp
….
![Page 61: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/61.jpg)
@crichardson
Browser
Mobile Device
Content Router
API Gateway
Catalog Service
Review Service
Order Service
… Service
Catalog Database
Review Database
Order Database
… Database
HTTP /HTML
REST
REST
Browse & Search WebApp
Product Detail WebApp
….
![Page 62: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/62.jpg)
@crichardson
Browser
Mobile Device
Content Router
API Gateway
Catalog Service
Review Service
Order Service
… Service
Catalog Database
Review Database
Order Database
… Database
HTTP /HTML
REST
REST
Browse & Search WebApp
Product Detail WebApp
….
Supplier Inbound Gateway
Catalog update messages
Supplier System
![Page 63: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/63.jpg)
-ilities of a microservice architecture
Maintainability
Testability
Deployability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
😄
![Page 64: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/64.jpg)
@crichardson
Microservices ⇒
DevOps/Continuous delivery/deployment of large/complex applications
![Page 65: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/65.jpg)
@crichardson
Process: Continuous delivery/deployment
Organization:Small, agile, autonomous,
cross functional teams
Architecture: Microservice architecture
Enables
Enables Enables
SuccessfulSoftware
Development
![Page 66: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/66.jpg)
@crichardson
Process: Continuous delivery/deployment
Organization:Small, agile, autonomous,
cross functional teams
Architecture: Microservice architecture
Enables
Enables Enables
SuccessfulSoftware
Development
Services improve testability
and deployability
![Page 67: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/67.jpg)
@crichardson
Process: Continuous delivery/deployment
Organization:Small, agile, autonomous,
cross functional teams
Architecture: Microservice architecture
Enables
Enables Enables
SuccessfulSoftware
Development
Services improve testability
and deployability
Teams own services
![Page 68: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/68.jpg)
@crichardson
Microservices ⇒ 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
![Page 69: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/69.jpg)
@crichardson
Agenda
A brief refresher on software architecture
From monolith to microservices
Microservices != silver bullet
Applying the microservice pattern language
![Page 70: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/70.jpg)
@crichardson
No silver bullets
http://en.wikipedia.org/wiki/Fred_Brooks
![Page 71: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/71.jpg)
@crichardson
Drawbacks of microservices
Complexity
![Page 72: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/72.jpg)
@crichardson
Drawbacks of microservices
Complexity
Development: IPC, partial failure, distributed data
![Page 73: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/73.jpg)
@crichardson
Drawbacks of microservices
Complexity
Development: IPC, partial failure, distributed data Testing: Integration, end to end, …
![Page 74: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/74.jpg)
@crichardson
Drawbacks of microservices
Complexity
Development: IPC, partial failure, distributed data Testing: Integration, end to end, …Deployment …
![Page 75: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/75.jpg)
@crichardson
Are microservices a good fit for my application?
![Page 76: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/76.jpg)
@crichardson
Do I have the pre-requisites in place:
automated testing automated provisioning ….. ?
![Page 77: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/77.jpg)
@crichardson
When using microservices:
![Page 78: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/78.jpg)
@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?
![Page 79: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/79.jpg)
@crichardson
It depends!
![Page 80: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/80.jpg)
@crichardson
Microservice pattern language =
collection of patterns that solve these
architecture, design, development and operational problems
![Page 81: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/81.jpg)
@crichardson
What’s a pattern?
Reusable solution to a problem
occurring in a particular context
![Page 82: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/82.jpg)
@crichardson
What’s a pattern?
Reusable solution to a problem
occurring in a particular context
![Page 83: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/83.jpg)
@crichardson
The structure of a pattern encourages objectivity
![Page 84: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/84.jpg)
@crichardson
The structure of a pattern encourages objectivity
Name
![Page 85: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/85.jpg)
@crichardson
The structure of a pattern encourages objectivity
aka the situation
Name
Context
![Page 86: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/86.jpg)
@crichardson
The structure of a pattern encourages objectivity
aka the situation
Name
Context
Problem
![Page 87: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/87.jpg)
@crichardson
The structure of a pattern encourages objectivity
aka the situation
Name
Context
Problem
(conflicting) issues etc to address Forces
![Page 88: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/88.jpg)
@crichardson
The structure of a pattern encourages objectivity
aka the situation
Name
Context
Problem
(conflicting) issues etc to address Forces
Solution
![Page 89: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/89.jpg)
@crichardson
The structure of a pattern encourages objectivity
Resulting context
aka the situation
Name
Context
Problem
(conflicting) issues etc to address Forces
Solution
![Page 90: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/90.jpg)
@crichardson
The structure of a pattern encourages objectivity
Resulting context
aka the situation
Name
Context
Problem
(conflicting) issues etc to address Forces
Solution Benefits
![Page 91: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/91.jpg)
@crichardson
The structure of a pattern encourages objectivity
Resulting context
aka the situation
Name
Context
Problem
(conflicting) issues etc to address Forces
Solution Benefits
Drawbacks
![Page 92: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/92.jpg)
@crichardson
The structure of a pattern encourages objectivity
Resulting context
aka the situation
Name
Context
Problem
(conflicting) issues etc to address Forces
Solution Benefits
Drawbacks
Issues to resolve
![Page 93: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/93.jpg)
@crichardson
The structure of a pattern encourages objectivity
Resulting context
aka the situation
Name
Context
Problem
Related patterns
(conflicting) issues etc to address Forces
Solution Benefits
Drawbacks
Issues to resolve
![Page 94: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/94.jpg)
@crichardson
The structure of a pattern encourages objectivity
Resulting context
aka the situation
Name
Context
Problem
Related patterns
(conflicting) issues etc to address Forces
Solution Benefits
Drawbacks
Issues to resolve
Alternatives
![Page 95: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/95.jpg)
@crichardson
The structure of a pattern encourages objectivity
Resulting context
aka the situation
Name
Context
Problem
Related patterns
(conflicting) issues etc to address Forces
Solution Benefits
Drawbacks
Issues to resolve
Alternatives
Solutions to issues
![Page 97: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/97.jpg)
@crichardson
Agenda
A brief refresher on software architecture
From monolith to microservices
Microservices != silver bullet
Applying the microservice pattern language
![Page 98: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/98.jpg)
@crichardson
The pattern language guides you when developing an architecture
What architectural decisions you must make
For each decision:
Available options
Trade-offs of each option
![Page 99: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/99.jpg)
@crichardson
Key patterns
![Page 100: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/100.jpg)
Issue: What’s the deployment architecture?
Forces
Maintainability
Deployability
Testability
…
Monolithic architecture
Microservice architecture
![Page 101: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/101.jpg)
Issue: What’s the deployment architecture?
Forces
Maintainability
Deployability
Testability
…
Monolithic architecture
Microservice architecture
Single deployable/executable OR
Tightly coupled services
![Page 102: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/102.jpg)
Issue: What’s the deployment architecture?
Forces
Maintainability
Deployability
Testability
…
Monolithic architecture
Microservice architecture
Single deployable/executable OR
Tightly coupled services
Multiple loosely coupled services
![Page 103: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/103.jpg)
Issue: How to decompose an application into services?
Forces
Stability
Cohesive
Loosely coupled
Not too large
Decompose bybusiness capability
Decompose bysubdomain
![Page 104: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/104.jpg)
Issue: How to decompose an application into services?
Forces
Stability
Cohesive
Loosely coupled
Not too large
Decompose bybusiness capability
Decompose bysubdomain
Organize around business capabilities
![Page 105: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/105.jpg)
Issue: How to decompose an application into services?
Forces
Stability
Cohesive
Loosely coupled
Not too large
Decompose bybusiness capability
Decompose bysubdomain
Organize around business capabilities
Organize around DDD subdomains
![Page 106: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/106.jpg)
@crichardson
Issue: how to maintain data consistency?Context
• Each service has its own database
• Data is private to a service
Forces
Transactional data consistency must be maintained across multiple services
2PC is not an option
![Page 107: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/107.jpg)
@crichardson
Issue: how to perform queries?
CQRS
Context
Each service has its own database
Forces
Queries must join data from multiple services
Data is private to a service
API Composition
![Page 108: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/108.jpg)
@crichardson
Issue: how to perform queries?
CQRS
Context
Each service has its own database
Forces
Queries must join data from multiple services
Data is private to a serviceMaintain query views by subscribing to events
API Composition
![Page 109: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/109.jpg)
@crichardson
The rest are generic technical architecture patterns
= Undifferentiated heavy lifting!
![Page 110: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/110.jpg)
@crichardson
Issue: How do services communicate?
Messaging Remote ProcedureInvocation
Domain-specific
Forces
Services must communicate
Usually processes on different machines
…
![Page 111: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/111.jpg)
@crichardson
Issue: How to handle cross cutting concerns?
Microservice Chassis
Forces
Every service must implement logging; externalize configuration; health check endpoint; metrics; …
![Page 112: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/112.jpg)
Issue: How to deploy an application’s services?
Multiple Services per host
Single Service per Host
Service-per-Container
Service-per-VM
Serverless deployment
Service deployment platform
Forces
Multiple languages
Isolated
Constrained
Monitor-able
Reliable
Efficient
![Page 113: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/113.jpg)
@crichardson
Issue: How to discover a service instance’s network location?
Client-side discovery
Server-side discovery
Service registry
Self registration
3rd party registration
Forces
Client needs IP address of service instance
Dynamic IP addresses
Dynamically provisioned instances
![Page 114: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/114.jpg)
@crichardson
Issue: how to monitor the behavior of your application?
Exception tracking
Distributed tracing
Audit logging Application metrics
Log aggregation
Health check API
![Page 115: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/115.jpg)
@crichardson
Summary
The goal of architecture is to satisfy non-functional requirements
For continuous delivery/deployment use the appropriate architectural style
Small applications ⇒ Monolithic architecture
Complex applications ⇒ Microservice architecture
Use the pattern language to guide your decision making
![Page 116: There is no such thing as a microservice! · 2018-01-18 · Technology stack becomes increasingly obsolete BUT A rewrite is not feasible-ilities of large monoliths Maintainability](https://reader031.vdocuments.net/reader031/viewer/2022011822/5ec5dea45d4ab761be6fd2d0/html5/thumbnails/116.jpg)
@crichardson
@crichardson [email protected]
http://learnmicroservices.io
Thank you!
40% off ctwcodefreeze18