Microservices: Architecture to scale Agile
-
Upload
eberhard-wolff -
Category
Technology
-
view
2.871 -
download
0
Transcript of Microservices: Architecture to scale Agile
![Page 1: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/1.jpg)
Microservices: Architecture to Scale
AgileEberhard WolffFellow, innoQ
@ewolff
![Page 2: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/2.jpg)
http://continuous-delivery-buch.de/
![Page 3: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/3.jpg)
http://microservices-buch.de/ http://microservices-book.com/
![Page 4: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/4.jpg)
http://microservices-book.com/primer.html
FREE!!!!
![Page 5: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/5.jpg)
> Microservices
> Agility
> Self-contained Systems
> SCS to scale agile
![Page 6: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/6.jpg)
Microservices
![Page 7: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/7.jpg)
Server Server
Microservices: Definition
> Independent deployment units
> E.g. process, VMs, Docker containers
> Any technology
> Any infrastructure
MicroService
MicroService
![Page 8: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/8.jpg)
Components Collaborate
MicroService
MicroService
Link
Data Replication
REST
Messaging
![Page 9: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/9.jpg)
Possible MicroservicesArchitecture
iOS Android Web
Order Search Catalog
BillingCustomer
Backend Backend Backend
![Page 10: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/10.jpg)
Real-World Example
> Team = one person
> Microservices-based system
> Reasons
> Fast and easy deployment
> Clear separation
![Page 11: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/11.jpg)
Microservices can do more than scaling
agile!
![Page 12: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/12.jpg)
Agility
![Page 13: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/13.jpg)
Iterations
> Work in iterations
> Not following a fixed plan
> “Waterfall” paper 1970 (Royce): Do it twice!
> I.e. iterations are a well-known idea for very long
![Page 14: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/14.jpg)
No Iterations
Goal
Goal
![Page 15: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/15.jpg)
Iterations
Goal
Goal
GoalGoal
![Page 16: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/16.jpg)
Cross-functional Team
> Need lots of skill to developfeatures
> Have all skills in the team
> Direct communication isbetter
![Page 17: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/17.jpg)
Self Organization
> Team knows best how tosolve problems
> Let them decide
![Page 18: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/18.jpg)
Scaling
![Page 19: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/19.jpg)
Scaling
> Do more
> Get more storiesimplemented
> ...and running in production
TODO IN PROGRESS DONE
![Page 20: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/20.jpg)
Scaling> Do more
> Add more people
> Let the work in parallel
> Build more teams
![Page 21: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/21.jpg)
OrganizationalApproaches
Scrum ofScrums
Scaled AgileFramework
(SAFe)
Large ScaleScrum( LeSS) Agile Path
![Page 22: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/22.jpg)
OrganizationalApproaches
Scrum ofScrums
Scaled AgileFramework
(SAFe)
Large ScaleScrum( LeSS) Agile Path
Not myexpertise
![Page 23: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/23.jpg)
Communication
> Agile means communication
> Instead of written requirements
> ...story cards
> + direct communication
![Page 24: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/24.jpg)
# Persons vs. Potential Links
![Page 25: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/25.jpg)
# Persons vs. Potential Links
0
100
200
300
0 10 20 30
![Page 26: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/26.jpg)
Communication is great!
Need more persons
![Page 27: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/27.jpg)
Depedencies andCoordination are
Problems!
![Page 28: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/28.jpg)
Dependencies
> Feature across teams
> Team must wait for other teams‘ results
![Page 29: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/29.jpg)
time
Team Sprint
Team Sprint
Team Sprint
3 sprints
![Page 30: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/30.jpg)
Functionalities
Technology andArchitecture
What Do YouCommunicate About?
Releases
![Page 31: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/31.jpg)
Can we limit the needfor communication?
![Page 32: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/32.jpg)
Challenges forScaling Agile
> Dependencies cause delays
> Too much communication aboutfunctionalities...
> ...releasing software,
> ...and technologies
![Page 33: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/33.jpg)
Self-contained System
![Page 34: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/34.jpg)
Deploymentmonolith
Graphics by Roman Stranghöhner, innoQhttp://scs-architecture.org
![Page 35: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/35.jpg)
Cut Deploymentmonolith along domains …
![Page 36: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/36.jpg)
… wrap domain in separate web application …
![Page 37: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/37.jpg)
Self-contained System (SCS) –individuallydeployable
![Page 38: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/38.jpg)
SCS =user interface+business logic+data storage
![Page 39: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/39.jpg)
Web user interface
![Page 40: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/40.jpg)
optional API e.g. formobile
![Page 41: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/41.jpg)
Self-contained Systemsshould be integrated in the web interface
![Page 42: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/42.jpg)
Hyperlinks to navigate between systems.
System 1 System 2
![Page 43: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/43.jpg)
Dynamic inclusion of content served by another application
System 1 System 2
![Page 44: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/44.jpg)
Logic only shared over a well defined interface.
![Page 45: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/45.jpg)
Business logic can consist of microservices
![Page 46: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/46.jpg)
Avoid synchronousremote calls
![Page 47: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/47.jpg)
Remote API calls should be asynchronous
![Page 48: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/48.jpg)
Every SCS brings its own data storagewith its own (potentially redundant) data
![Page 49: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/49.jpg)
Technical decisions can be made independently from other systems(programming language, frameworks, tooling, platform)
![Page 50: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/50.jpg)
Domained scopedSCS enables the development, operation and maintenance of an domain by a single team.
Team 1
Team 2 Team 3
![Page 51: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/51.jpg)
1 SCS
= 1 Domain
= 1 Web App
= 1 Team
= 1-n Microservices
![Page 52: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/52.jpg)
SCS?
iOS Android Web
Order Search Catalog
BillingCustomer
Backend Backend Backend
![Page 53: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/53.jpg)
SCS?
iOS Android Web
Order Search Catalog
BillingCustomer
Backend Backend Backend
![Page 54: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/54.jpg)
SCS to Scale Agile
![Page 55: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/55.jpg)
Challenges forScaling Agile
> Dependencies cause delays
> Too much communication aboutfunctionalities...
> ...releasing software,
> ...and technologies
![Page 56: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/56.jpg)
Challenges forScaling Agile
> Dependencies cause delays
> Too much communication aboutfunctionalities...
> ...releasing software,
> ...and technologies
![Page 57: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/57.jpg)
Conway‘s Law
Architecture
copies
communication structures
of the organization
![Page 58: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/58.jpg)
Conway‘s Law: ImpactArchitecture
and
communication structures
in the organization
are the same thing.
![Page 59: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/59.jpg)
Conway’s Law as a Limit
> Organization drives architecture
> Teams of experts
> i.e. UI, logic & database team
> Three technical artifacts
![Page 60: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/60.jpg)
Logic
UI
Database
Change Order
Process!
![Page 61: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/61.jpg)
time
DBTeam Sprint
LogicTeam Sprint
GUITeam Sprint
3 sprints
![Page 62: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/62.jpg)
Domained scopedSCS enables the development of a domain by a single team
– no coordinationOrder Team =
UI+Logic+Database
![Page 63: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/63.jpg)
Challenges for ScalingAgile
> Dependencies cause delays
> Too much communication aboutfunctionalities...
> ...releasing software,
> ...and technologies
![Page 64: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/64.jpg)
Deployment Monolith
Stories
Technical Coordination
Coordinating Releases
![Page 65: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/65.jpg)
Self-contained System (SCS) –individuallydeployable
![Page 66: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/66.jpg)
Technical decisions can be made independently from other systems(programming language, frameworks, tooling, platform)
![Page 67: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/67.jpg)
SCS
Stories
TechnicalCoordination
Stories
TechnicalCoordination
Stories
TechnicalCoordination
Order Billing Search
Release Release Release
![Page 68: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/68.jpg)
Impact on Teams> More self-organization
> Decide about technologies, releases etc.
> Need to be more cross-functional
> E.g. ops skills become more important
![Page 69: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/69.jpg)
Conclusion
![Page 70: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/70.jpg)
How to scale agile?
![Page 71: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/71.jpg)
Define architecture to
limit communication
needs
![Page 72: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/72.jpg)
Conclusion: SCS & Microservices
> Microservices have many advantages
> SCS are a way to use Microservices
> …for large projects
> …to scale agile
![Page 73: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/73.jpg)
Conclusion: SCS & Agility
> Domain in one SCS
> less dependencies
> less delays
> less communication about functionalities
> Technological freedom
> less communication about technologies
> Independent releases
> no need to coordinate releases
![Page 74: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/74.jpg)
Challenges
![Page 75: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/75.jpg)
Challenges
> UI integration
> ...in particular for mobile / Single Page App
> Architecture more important
> Architecture = organization
![Page 76: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/76.jpg)
Meta-Conclusion
![Page 77: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/77.jpg)
How To Think About Architecture
> Process has an impact on architecture
> Software architecture & organization are the same
![Page 78: Microservices: Architecture to scale Agile](https://reader031.fdocuments.us/reader031/viewer/2022021922/5871d6751a28ab423c8b6ac1/html5/thumbnails/78.jpg)
Thank You!@ewolff
http://scs-architecture.org(Creative Commons)