![Page 1: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/1.jpg)
Microservices: Architecture for Agile
Software Development Eberhard Wolff Fellow, innoQ
@ewolff
![Page 2: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/2.jpg)
http://microservices-buch.de/
![Page 3: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/3.jpg)
Code
![Page 4: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/4.jpg)
Microservice Definition
![Page 5: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/5.jpg)
Server Server
Microservices: Definition
> Small
> Independent deployment units
> Any technology
> Any infrastructure
> UI + Logic
Micro Service
Micro Service
![Page 6: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/6.jpg)
Components Collaborate
Micro Service
Micro Service
Link
Data Replication
REST Messaging
![Page 7: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/7.jpg)
Online Shop
Order
Catalog
Search
Billing
Customer
HTML / HTTP
![Page 8: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/8.jpg)
Online Shop
Elasticsearch
Spring Batch Oracle
Spring MVC MongoDB
Order
Catalog
Search
Billing
![Page 9: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/9.jpg)
Agility
![Page 10: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/10.jpg)
Agile Manifesto > Individuals and Interaction
> Over processes and tools
> Working Software
> Over comprehensive documentation
> Customer Collaboration
> Over contract negotation
> Responding to change
> Over following a plan
![Page 11: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/11.jpg)
Agile Manifesto: Individuals and
Interactions
![Page 12: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/12.jpg)
Software Architecture & Individuals
![Page 13: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/13.jpg)
Software Architecture & Individuals
Unrelated?
![Page 14: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/14.jpg)
Does Your Architecture Take Individuals Into
Account?
![Page 15: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/15.jpg)
Conway‘s Law
Architecture copies
communication structures of the organization
![Page 16: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/16.jpg)
Conway‘s Law: Impact Architecture
and communication structures
in the organization are the same thing.
![Page 17: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/17.jpg)
Conway’s Law as a Limit
> Organization drives architecture
> I.e. GUI, logic & database team
> Three technical artifacts
![Page 18: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/18.jpg)
GUI
Logic
DB
E Commerce Shop
Change Order
Process!
![Page 19: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/19.jpg)
time
DB Team Sprint
Logic Team Sprint
GUI Team Sprint
3 sprints
![Page 20: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/20.jpg)
Deployment Monolith
Deployment Monolith
Stories
Technical Coordination
Coordinating Releases
![Page 21: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/21.jpg)
Order Billing Search
Order Search Billing
Team for each business feature Let architecture drive the organization
![Page 22: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/22.jpg)
Deployment Monolith + Conway’s Law
Deployment Monolith
Stories
Technical Coordination
Coordinating Releases
StoriesStories
Order Billing Search
![Page 23: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/23.jpg)
Microservices + Conway’s Law
> Let architecture drive the organization
> Team for each Microservice
> Team responsible for business features
> Ideal: Independent features
![Page 24: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/24.jpg)
Order Billing Search
Order Search Billing
Team can deploy without integration Changes can be deployed independently & quickly
Strong & enforced modularization
Technology stack per Microservice One or many Microservices per Team
Synergy Microservices / Conway’s Law
![Page 25: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/25.jpg)
Microservices
Microservice
Stories
TechnicalCoordination
Microservice
Stories
TechnicalCoordination
Microservice
Stories
TechnicalCoordination
Order Billing Search
Release Release Release
![Page 26: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/26.jpg)
How to scale agile?
![Page 27: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/27.jpg)
Use a process to scale agile?
![Page 28: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/28.jpg)
Individuals & interaction
over
processes and tools
![Page 29: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/29.jpg)
Define architecture to limit
communication needs
![Page 30: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/30.jpg)
One team can build and deploy features independently!
![Page 31: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/31.jpg)
Team must be responsible for a sensible set of
functionality
![Page 32: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/32.jpg)
Less Technical Coordination
![Page 33: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/33.jpg)
Agile Manifesto: Working Software
![Page 34: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/34.jpg)
Scrum
> PSI
> Potentially shippable increment
> Why?
![Page 35: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/35.jpg)
Principles behind the Agile Manifesto
Our highest priority is
to satisfy the customer
through early and
continuous delivery
of valuable software.
![Page 36: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/36.jpg)
Potentially Shippable Increment
Continuous Delivery
![Page 37: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/37.jpg)
Monolith
ECommerce System
3rd party systems
Database
![Page 38: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/38.jpg)
Continuous Delivery: Build Pipeline
Commit Stage
Automated Acceptance
Testing
Automated Capacity Testing
Manual Explorative
Testing
Release
ECommerce System
![Page 39: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/39.jpg)
Build Pipeline: Complex Infrastructure
> Huge database
> 3rd party integration
![Page 40: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/40.jpg)
Build Pipeline: Slow Feedback
> Slow feedback
> Test everything for each commit
> Huge deployment unit
> Deployment slow
![Page 41: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/41.jpg)
Monolith: Deployment
> Huge deployment
> Risky
> Hard to mitigate risk
> Blue / Green: Create a separate environment
> Canary: Deploy to one server first
![Page 42: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/42.jpg)
Microservices
ECommerce System
3rd party systems
Database
Order
Catalog
Billing Search
![Page 43: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/43.jpg)
Commit Stage
Automated Acceptance
Testing
Automated Capacity Testing
Manual Explorative
Testing
Release
Commit Stage
Automated Acceptance
Testing
Automated Capacity Testing
Manual Explorative
Testing
Release
Commit Stage
Automated Acceptance
Testing
Automated Capacity Testing
Manual Explorative
Testing
Release
Order
Billing
Customer
![Page 44: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/44.jpg)
Build Pipeline for Microservices
> Independent deployment
> Build pipeline per Microservice
> Small
> Easier to set up
> Less features (3rd party systems)
> Faster Feedback: Less tests
![Page 45: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/45.jpg)
Microservice: Deployment
> Small deployment
> Less risky
> Other Microservices resilient to failing microservice
> Easy to create new environments
> E.g. for Blue / Green or Canary
![Page 46: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/46.jpg)
Quick Deployments Time
Size & Risk
Manual Deployment
Pipeline
Continuous Delivery Pipeline
Monolith Microservices
![Page 47: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/47.jpg)
Potentially shippable increment?
![Page 48: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/48.jpg)
SHIP!!!
![Page 49: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/49.jpg)
Agile Manifesto: Customer
Collaboration
![Page 50: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/50.jpg)
Customer Collaboration &
Architecture?
![Page 51: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/51.jpg)
Customer Collaboration &
Architecture? Not sure.
![Page 52: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/52.jpg)
Microservices & Departments
StoriesStories Stories
Customer Billing OrderProcess
ProductOwner
ProductOwner
ProductOwner
Department Department Department
![Page 53: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/53.jpg)
Microservices & Departments
> Ideal: One team per department
> Ideal: Change local to one team / Microservice
> Otherwise: Coordination needed
![Page 54: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/54.jpg)
Customer should own Microservice
![Page 55: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/55.jpg)
Agile Manifesto: Responding to change
![Page 56: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/56.jpg)
Monoliths
> Architecture rot
> …not maintainable any more
> …and can’t be rewritten / replaced
![Page 57: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/57.jpg)
Deployment Monolith
> Cyclic dependency
> …because the IDE suggested some class
> Might not even be noticed
Module
Class
Module
Class
Class Class
![Page 58: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/58.jpg)
Microservices
> Need to use the API
> Different team
> More effort - will think about it
> Rot less likely
Microservice
Class
Microservice
Class
Class Class
![Page 59: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/59.jpg)
Global Refactorings?
> Move code from service to service
> Might be a port to a different language
> Separate in a new service
> Harder than in a Deployment Monolith
![Page 60: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/60.jpg)
Microservices
> Small
> Easy to change
> Architectural problems in Microservice unlikely
> Can be replaced
Microservice
Class
Class
![Page 61: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/61.jpg)
Microservices – Easy to Recylce
![Page 62: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/62.jpg)
Conclusion
![Page 63: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/63.jpg)
Conclusion: Microservices & Agility
> Individuals over tools
> Architecture drives organization
> Scale by architecture not process
> Working software
> Actually ship software
> Continuous Delivery
![Page 64: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/64.jpg)
Conclusion: Microservices & Agility
> Customer collaboration
> Customer should own services
> i.e. organization beyond the project = architecture
![Page 65: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/65.jpg)
Conclusion: Microservices & Agility
> Responding to change
> Individual Microservices small
> Easy to change
> …and replace
> Unwanted dependencies won’t sneak in
> But: Global refactoring hard, too
![Page 66: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/66.jpg)
Meta-Conclusion
![Page 67: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/67.jpg)
How To Think About Architecture
> Process has an impact on architecture
> Software architecture & organization are the same
> Build recyclable software!
![Page 68: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/68.jpg)
Microservice > Agile Achitecture
Strong Modularization
Scaled Agile Architecture
Sustainable development speed Replaceable Services
Continuous Delivery
Choose best technology for job!
Handle Legacy more efficient
Independent Scaling
Robustness
![Page 69: Microservices: Architecture for Agile Software Development](https://reader031.vdocuments.site/reader031/viewer/2022030305/5871d6461a28ab423c8b6a43/html5/thumbnails/69.jpg)
Microservice Training
> Stefan Tilkov / Eberhard Wolff
> Frankfurt / Main
> 26.-27.10.2015
> https://www.innoq.com/de/trainings/microservices-training/