Micro Services – The New
Architecture Paradigm
Eberhard Wolff
Freelancer
Slide 2
Slide 2 text
Eberhard Wolff - @ewolff
GUI
Logic
DB
E Commerce
Shop
Change
Order
Process!
Slide 3
Slide 3 text
Eberhard Wolff - @ewolff
Thou shalt not
organize
teams by
technology!
Slide 4
Slide 4 text
Eberhard Wolff - @ewolff
Common libraries & technical foundation
Order Billing Search Catalog
E Commerce
Shop
Deployment monolith
Global code integration & coordination needed
Code changes to production takes loooong
Architecture can be non-monolithic but dependencies
might sneak in
How to introduce e.g. Elasticsearch for Search?
Slide 5
Slide 5 text
Eberhard Wolff - @ewolff
Micro Services: Definition
• Small
• Independent deployment units
• i.e. virtual machine
• Any technology
• Any infrastructure
Micro
Service
Server
Micro
Service
Server
Slide 6
Slide 6 text
Eberhard Wolff - @ewolff
Micro Services
• Component Model
• Component…
• Separate process
• Individual deployment unit
• GUI+Logic
Slide 7
Slide 7 text
Eberhard Wolff - @ewolff
Micro Services vs. SOA
• Micro Service:
1 service = 1 deployment unit
Service + GUI
• SOA:
1 deloyment unit = n services
Service / GUI separate
Slide 8
Slide 8 text
Eberhard Wolff - @ewolff
Components Collaborate
Micro
Service
Micro
Service
Link
Data Replication
REST
Messaging
Slide 9
Slide 9 text
Eberhard Wolff - @ewolff
Common libraries & technical foundation
Order Billing Search Catalog
Global code integration & coordination needed
Code changes to production takes loooong
Architecture can be non-monolithic but dependencies
might sneak in
How to introduce e.g. Elasticsearch for Search?
E Commerce
Shop
Deployment monolith
Slide 10
Slide 10 text
Eberhard Wolff - @ewolff
Order Billing Search Catalog
Order Catalog
Search
Billing
Micro Services
Team can deploy without integration
Changes can be deployed independently & quickly
Strong & enforced modularization
Technology stack per Micro Service
One or many Micro Services per Team
Slide 11
Slide 11 text
Eberhard Wolff - @ewolff
Online Shop
Order
Catalog
Search
Billing
Customer
HTML /
HTTP
Slide 12
Slide 12 text
Eberhard Wolff - @ewolff
Online Shop
Elasticsearch
Spring Batch
Oracle
Spring MVC
MongoDB
Order
Catalog
Search
Billing
Slide 13
Slide 13 text
Eberhard Wolff - @ewolff
Deploy &
Operate?
Slide 14
Slide 14 text
Eberhard Wolff - @ewolff
Component Model
• No restriction on language etc
• Individual processes
• + infrastructure (database etc)
• JARs, WARs, EARs: No good fit
• Monitoring
• Logging
Eberhard Wolff - @ewolff
How to scale
agile?
Implement
more feature
Slide 18
Slide 18 text
Eberhard Wolff - @ewolff
Conway‘s Law
Architecture
copies
communication structures
of the organization
Slide 19
Slide 19 text
Eberhard Wolff - @ewolff
Conway’s Law as an Enabler
• Desired architecture =
project structure
• Team for each Micro Service
• Team should be responsible for
meaningful features
• Ideal: Independent features
Slide 20
Slide 20 text
Eberhard Wolff - @ewolff
One team can
build and
deploy features
independently!
Slide 21
Slide 21 text
Eberhard Wolff - @ewolff
Team must be
responsible for
a sensible set
of functionality
Slide 22
Slide 22 text
Eberhard Wolff - @ewolff
Legacy Apps
Slide 23
Slide 23 text
Eberhard Wolff - @ewolff
Slide 24
Slide 24 text
Eberhard Wolff - @ewolff
Slide 25
Slide 25 text
Eberhard Wolff - @ewolff
How can I
implement a
new feature???
Slide 26
Slide 26 text
Eberhard Wolff - @ewolff
!
Slide 27
Slide 27 text
Eberhard Wolff - @ewolff
HTTP
New
Stuff
Links
No legacy code
Any technology
"
Small code base
Slide 28
Slide 28 text
Eberhard Wolff - @ewolff
Sustainable
Development
Slide 29
Slide 29 text
Eberhard Wolff - @ewolff
Monoliths
• Architecture rot
• …not maintainable any more
• …and can’t be rewritten / replaced
Slide 30
Slide 30 text
Eberhard Wolff - @ewolff
Micro Services
• Distributed system of small units
• Architecture violations harder
• Small units
• Easy to replace
Slide 31
Slide 31 text
Eberhard Wolff - @ewolff
Continuous
Delivery
Slide 32
Slide 32 text
Eberhard Wolff - @ewolff
Monolith
ECommerce
System
3rd party
systems
Database
Eberhard Wolff - @ewolff
Build Pipeline for
Micro Services
• Independent deployment
• Build pipeline per Micro Service
• Smaller
• Easier to set up
• Less features (3rd party systems)
• Faster Feedback: Less tests
Eberhard Wolff - @ewolff
Why Micro Services?
• Strong modularization
• Small deployment units
• Faster & easier deployment
• Sustainable development speed
• Continuous Delivery
• Less risk in deployment
• Best technology for each service
Eberhard Wolff - @ewolff
Refactoring hard
Functional
architecture much
more important
Slide 42
Slide 42 text
Eberhard Wolff - @ewolff
Need to get
architecture
right first time
Architecture
evolves
Slide 43
Slide 43 text
Eberhard Wolff - @ewolff
Start BIG
• Won’t have too much code at the
start anyway
• Refactoring easier
• Can build architecture as you go
• Let the functional architecture
grow!
Slide 44
Slide 44 text
Eberhard Wolff - @ewolff
Conclusion
Slide 45
Slide 45 text
Eberhard Wolff - @ewolff
Conclusion: Micro Services
• Micro Services are a new way of
modularization
• More technological freedom
• Easier, faster and less risky
deployment
Slide 46
Slide 46 text
Eberhard Wolff - @ewolff
Use If…
• Time to market is important
• Legacy systems must be
modernized
• Sustained development speed
• Continuous Delivery should be
implemented
• Large enough project
Slide 47
Slide 47 text
Eberhard Wolff - @ewolff
Don’t Use If…
• Infrastructure complexity cannot be
handled
• Architectural complexity cannot be
handled