Shakespeare's Approach
to Microservices
Philippe Hässig
Zürich,Public / Philippe Hässig / Microservices 14.September2018
William Shakespeare
Playwright, Poet (c. 1564–1616)
• Managing Partner "Lord Chamberlain's Men"
• Cofounder "The Globe"
• @shakespeare
https://www.biography.com/people/william-shakespeare-9480323
Microservice
Microservices is a software development technique

— a variant of the service-oriented architecture (SOA)
architectural style that structures an application as 

a collection of loosely coupled services.
Wikipedia
Zürich,Public / Philippe Hässig / Microservices 14.September2018
Advantages
• All services can be tested separately.
• Less risk during deployments. They go faster and are smaller.
• It's easier to oversee a couple of small applications then a huge one.
• Replacing a microservice with another is quite easy, as long as the interface
stays the same. Even multiple versions of the same service can be running.
Blue-Green Deployments.
To be or not to be?

That is the question.
When should we use microservices?
Different Speed of Change
Different Lifecycle
It is a wise father that 

knows his own child.
Multiple Teams
Independent Scaling
Isolate External Dependencies

aka Facade Service
Multiple Consumers
There's place and means
for every man alive.
Use the right tool 

for the right job
Zürich,Public / Philippe Hässig / Microservices 14.September2018
Requirements
Actually nothing more than usual, but ...
• Automated Tests are mandatory
• Using a container platform enables fast and easy deployments
• Using Infrastructure as Code makes things less error prone and helps
automating new setups
• Centralise Logging and Monitoring
Zürich,Public / Philippe Hässig / Microservices 14.September2018
Communication between Services
• Whenever possible use asynchronous Message Queues
• AMQP, MQTT
• Otherwise use RESTful APIs or gRPC calls
• If possible, store/cache needed data locally
Tight Coupling
😡
Loose Coupling
https://shakespeareillustration.org/2016/08/12/belarius-guiderius-aviragus-and-clotens-head/
'Tis best to weigh the enemy 

more mighty than he seems.
https://martinfowler.com/bliki/MicroservicePremium.html
An overflow of good 

converts to bad.
Questions?

TechTalkThursday: Microservices