Beruflich Dokumente
Kultur Dokumente
http://microservices-buch.de/
http://microservices-book.com/
FREE!!!!
http://microservices-book.com/primer.html
Microservice
Definition
Microservices:
Definition
> Small
> Independent deployment units
> Separate VM / process
> Any technology
> Any infrastructure
Micro
Service
Micro
Service
Server
Server
Components Collaborate
Link
Micro
Service
REST
Micro
Service
Messaging
Data Replication
Microservices
> Component Model
> Component
> Individual deployment unit
> GUI+Logic?
Layered
iOS
Backend
Android
Backend
Web
Backend
Order
Search
Catalog
Customer
Billing
Layered
> Reusable Backend Services
> Mobile client / Web App as frontend
> Backend for frontend (BFF): Custom
backend services
> ...to implement frontend specific logic
Layered: Issues
> All BFF support the same processes
> BFF contain most relevant logic
> Change to a business process means
changing many services
> Lots of communication
Self-contained
Systems
Web
Web
Web
Web
Order
Billing
Search
Catalog
Self-contained
Systems (SCS)
> SCS: Autonomous web application
> Optional service API (e.g. for mobile clients)
> Includes data & logic
> Might contain several microservices
> No shared UI
> No shared business code
> E.g. Otto, Kaufhof ...
SCS: Benefits
> Business logic for one domain in one SCS
> Change usually local to one SCS
> Less communication between SCS
> I think this should be the goal
> http://scs-architecture.org
Online Shop
Customer
HTML /
HTTP
Order
Billing
Catalog
Search
Online Shop
Order
Billing
Spring Batch
Oracle
Catalog
Spring MVC
MongoDB
Elasticsearch
Search
Agility
Agile Manifesto
> Individuals and Interaction
> Over processes and tools
Agile Manifesto:
Individuals and
Interactions
Software Architecture
& Individuals
Software Architecture
& Individuals
Unrelated?
Does Your
Architecture Take
Individuals Into
Account?
Conways Law
Architecture
copies
communication structures
of the organization
Conways Law as a
Limit
> Organization drives architecture
> I.e. GUI, logic & database team
> Three technical artifacts
UI
Change
Order
Process!
Backend
DB
E Commerce
Shop
3 sprints
DB
Team Sprint
Backend
Team Sprint
UI
Team Sprint
time
Deployment Monolith
Stories
Deployment Monolith
Technical Coordination
Coordinating Releases
Order
Billing
Search
Order
Billing
Search
Deployment Monolith
+ Conways Law
Stories
Stories
Stories
Order
Search
Billing
Deployment Monolith
Technical Coordination
Coordinating Releases
Microservices +
Conways Law
> Let architecture drive the organization
> Team for each Microservice
> Team responsible for business features
> Ideal: Independent features
Order
Billing
Search
Order
Billing
Search
Microservices
Order
Billing
Search
Stories
Stories
Stories
Microservice
Microservice
Microservice
Technical
Coordination
Release
Technical
Coordination
Release
Technical
Coordination
Release
Define
architecture to
limit
communication
needs
Team must be
responsible for a
sensible set of
functionality
Less Technical
Coordination
Agile Manifesto:
Working Software
Scrum
> PSI
> Potentially shippable increment
> Why?
Potentially
Shippable
Increment
Continuous
Delivery
Monolith
ECommerce
System
Database
3rd party
systems
Continuous Delivery:
Build Pipeline
ECommerce
System
Commit
Stage
Manual
Automated Automated
Acceptance Capacity Explorative
Testing
Testing
Testing
Release
Build Pipeline:
Complex Infrastructure
> Huge database
> 3rd party integration
Build Pipeline:
Slow Feedback
> Slow feedback
> Test everything for each commit
> Huge deployment unit
> Deployment slow
Monolith:
Deployment
> Huge deployment
> Risky
> Hard to mitigate risk
> Blue / Green: Create a separate
environment
> Canary: Deploy to one server first
Microservices
ECommerce
System
Database
3rd party
systems
Microservices
Order
Billing
Search
Catalog
Database
3rd party
systems
Order
Commit!
Stage!
Release!
Billing
Commit!
Stage!
Release!
Customer
Commit!
Stage!
Release!
Microservice:
Deployment
> Small deployment
> Less risky
> Other Microservices resilient to failing
microservice
> Easy to create new environments
> E.g. for Blue / Green or Canary
Time
Quick Deployments
Manual
Deployment
Pipeline
Continuous
Delivery
Pipeline
Microservices
Size & Risk
Monolith
Potentially shippable
increment?
SHIP!!!
Agile Manifesto:
Customer
Collaboration
Customer
Collaboration &
Architecture?
Microservices &
Departments
Customer
Billing
Order
Process
Department
Department
Department
Product
Owner
Stories
Product
Owner
Stories
Product
Owner
Stories
Microservices &
Departments
> Ideal: One team per department
> Ideal: Change local to one team /
Microservice
> Otherwise: Coordination needed
Agile Manifesto:
Responding to change
Monoliths
> Architecture rot
> not maintainable any more
> and cant be rewritten / replaced
Deployment Monolith
Class
Class
Class
Class
Module
Module
Microservices
Class
Class
Class
Class
Microservice
Microservice
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
Microservices
Class
Class
Microservice
> Small
> Easy to change
> Architectural problems in Microservice unlikely
> Can be replaced
Microservices
Easy to Recycle
Conclusion
Conclusion:
Microservices & Agility
> Individuals over tools
Conclusion:
Microservices & Agility
> Customer collaboration
> Customer should own services
> i.e. organization beyond the project =
architecture
Conclusion:
Microservices & Agility
> Responding to change
Meta-Conclusion
Strong Modularization
Replaceable Services
Thank You!
@ewolff
https://github.com/ewolff/microservice
https://leanpub.com/microservices-primer
http://microservices-buch.de/
http://scs-architecture.org