2. Who am I?
● Steve Upton
● English / Welsh / British / Irish(?)
● BSc. Computer Science (Cardiff University)
● Physics & Astronomy (Open University)
● IBM (6 years)
○ Messaging
○ OASIS MQTT TC member
○ Working with clients on Microservice systems
○ London μService user group
● HERE Berlin (6 months)
○ Microservices
○ Robots!
13. Tightly coupled, slow to change
Sharing hardware
Needs knowledge of other components (interfaces)
14. Tightly coupled, slow to change
Sharing hardware
Needs knowledge of other components (interfaces)
Sharing libraries, platform, OS etc.
15. Tightly coupled, slow to change
Sharing hardware
Needs knowledge of other components (interfaces)
Sharing libraries, platform, OS etc.
Difficult to upgrade without affecting other services
16. Tightly coupled, slow to change
Sharing hardware
Needs knowledge of other components (interfaces)
Sharing libraries, platform, OS etc.
Difficult to upgrade without affecting other services
Teams have little choice in setup
32. Loosely coupled, easy to change
Teams free to choose OS, language, libraries etc.
Share contracts, not interfaces and internals
Little to no knowledge of other services needed
33. Loosely coupled, easy to change
Teams free to choose OS, language, libraries etc.
Share contracts, not interfaces and internals
Little to no knowledge of other services needed
No shared state
Free to upgrade and experiment
36. Easy to scale
Vertical scaling easy and more effective
Horizontal scaling also easy!
More efficient use of resources
37. Easy to scale
Vertical scaling easy and more effective
Horizontal scaling also easy!
More efficient use of resources
Auto scaling of individual services possible
41. “Loosely coupled service oriented
architecture with bounded contexts”
Adrian Cockcroft, Architect @ Netflix
42. “In short, the microservice architectural style is an approach to developing
a single application as a suite of small services, each running in its
own process and communicating with lightweight mechanisms, often an
HTTP resource API. These services are built around business
capabilities and independently deployable by fully automated
deployment machinery. There is a bare minimum of centralized
management of these services, which may be written in different
programming languages and use different data storage technologies.”
James Lewis and Martin Fowler, ThoughtWorks
64. Marx on Microservices
Economic and Philosophic Manuscripts of 1844
Gattungswesen (species-essence)
Workers feeling a connection to their work
65. Marx on Microservices
Economic and Philosophic Manuscripts of 1844
Gattungswesen (species-essence)
Workers feeling a connection to their work
Entfremdung (alienation)
Workers feel estranged from their work
66. “Any piece of software reflects the organizational
structure that produced it”
Conway's Law
75. CAP Theorem
Consistency
(all requests return the correct results)
Availability
(all requests complete)
Partition tolerance
(the network may fail)
Pick 2
76. CAP Theorem - Example 1
[x]
Data store
User 1 User 2
77. CAP Theorem - Example 1
[x]
Data store
User 1 User 2
put(40)
78. CAP Theorem - Example 1
[40]
Data store
User 1 User 2
79. CAP Theorem - Example 1
[40]
Data store
User 1 User 2
get
80. CAP Theorem - Example 1
[40]
Data store
User 1 User 2
40
81. CAP Theorem - Example 1
[40]
Data store
User 1 User 2
40
✔ Consistent (correct)
✔ Available (answered)
❌ Partition tolerant (no network partitions)
82. CAP Theorem - Example 1
[40]
Data store
User 1 User 2
40
✔ Consistent (correct)
✔ Available (answered)
❌ Partition tolerant (no network partitions)
[PROBLEM] No real world system looks like this
83. CAP Theorem - Example 2
[40]
Data store (US)
User 1 User 2
[40]
Data store (EU)
84. CAP Theorem - Example 2
[40]
Data store (US)
User 1 User 2
put(60)
[40]
Data store (EU)
85. CAP Theorem - Example 2
[60]
Data store (US)
User 1 User 2
[40]
Data store (EU)
86. CAP Theorem - Example 2
[60]
Data store (US)
User 1 User 2
[40]
Data store (EU)
87. CAP Theorem - Example 2
[60]
Data store (US)
User 1 User 2
[40]
Data store (EU)
get
What now?
88. CAP Theorem - Example 2
[60]
Data store (US)
User 1
User 2
[40]
Data store (EU)
get ⟶ 40
89. CAP Theorem - Example 2
[60]
Data store (US)
User 1
User 2
[40]
Data store (EU)
get ⟶ 40
❌ Consistent (incorrect)
✔ Available (answered)
✔ Partition tolerant
90. CAP Theorem - Example 2
[60]
Data store (US)
User 1
User 2
[40]
Data store (EU)
get ⟶ 40
❌ Consistent (incorrect)
✔ Available (answered)
✔ Partition tolerant
User 2
wait
91. CAP Theorem - Example 2
[60]
Data store (US)
User 1
User 2
[40]
Data store (EU)
get ⟶ 40
❌ Consistent (incorrect)
✔ Available (answered)
✔ Partition tolerant
User 2
wait
✔ Consistent (correct)
❌ Available (not answered)
✔ Partition tolerant
159. “If two identical, deterministic processes begin in
the same state and get the same inputs in the
same order, they will produce the same output and
end in the same state.”
State Machine Replication Principle, Jay Kreps, LinkedIn
186. “Microservices are hard. Some things you get for
free, but you have to work for the good stuff. If
you won’t put in the work, you shouldn’t be doing
Microservices. (You should be doing that stuff
anyway!)”
Steve Upton
187. “Microservices are hard. Some things you get for
free, but you have to work for the good stuff. If
you won’t put in the work, you shouldn’t be doing
Microservices. (You should be doing that stuff
anyway!)”
Steve Upton
188. “Microservices are hard. Some things you get for
free, but you have to work for the good stuff. If
you won’t put in the work, you shouldn’t be doing
Microservices. (You should be doing that stuff
anyway!)”
Steve Upton
189. “Microservices are hard. Some things you get for
free, but you have to work for the good stuff. If
you won’t put in the work, you shouldn’t be doing
Microservices. (You should be doing that stuff
anyway!)”
Steve Upton
190. “Microservices are hard. Some things you get for
free, but you have to work for the good stuff. If
you won’t put in the work, you shouldn’t be doing
Microservices. (You should be doing that stuff
anyway!)”
Steve Upton
191. “Microservices are hard. Some things you get for
free, but you have to work for the good stuff. If
you won’t put in the work, you shouldn’t be doing
Microservices. (You should be doing that stuff
anyway!)”
Steve Upton