Microservices

Hot or Not?

Wojciech Gawroński, 2014 © License: CC BY-ND 3.0 PL

Agenda

Definitions

Details

Challenges

Nature

Science

Industry

IT

Server Room with Mess

Etymology

Definition

It is not that simple

[...] an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms [...]

Definition

Who? When? What? Where?

Smart, isolated and self-sufficient endpoints and dumb pipes.

Evolution

A micro-service is a small executable running on a server and responds to asynchronous messages.
Clean Micro-service Architecture, Uncle Bob

[...] is a discrete, isolated, and named piece of logic [...]
Actor Model, Victor Klang

[...] inside communicating over some number of ports with things on the outside.
Hexagonal Architecture, Alistair Cockburn

Objects communicate by sending and receiving messages.
OOP, Dr Alan Kay

Samples

JBoss

Erlang

Node.js

Symfony2

UNIX environment

Big Ball of Mud

[...] might be thought of as an anti-pattern. [...] However, its undeniable popularity leads to the inexorable conclusion that it is a pattern in its own right.
Big Ball of Mud
Make it work, Make it right, then make it fast.

Hype

If you can't build a monolith, what makes you think microservices are the answer?
Distributed big balls of mud
However, when considering microservice like architectures, it's really important to not be attracted to the hype on this one as the challenges and costs are as real as the benefits.
Microservices - not a free lunch!

Deletability

Greg Young - The art of destroying software

Minimal Viable Architecture

Challenges

Operations

Adrian Cockcroft on Microservices and DevOps
  • Backups
  • Deployment
  • Migrations
  • Security
  • Monitoring
  • Updates
  • Maintenance
  • Installation

Operations

Incremental approach to build an automated, reproducible infrastructure.
Hiring a DevOps Engineer will look you would like to employee a Scrum.

Service Discovery

  • Sharing Resources
  • Clusters
  • Configuration
  • Orchestration
  • URI and Paths

Storage

Polyglot Persistence

Seven Databases in Seven Weeks

Integration through Storage

Fuzzy Boundaries

Contracts

Transport

API's written in the conventional manner are not sufficient to understand the operation of programs.
Making reliable distributed systems in the presence of software errors

Tests

Development

Testing Challenges

Tests

Operations

Blue-Green deployments
One of the challenges with automating deployment is the cut-over itself, taking software from the final stage of testing to live production.
Blue-Green Deployment

Robustness

To guard against failure of an entire computer we need two computers.
Making reliable distributed systems in the presence of software errors

Scale

For a small operation this may be true, but when you're doing a million operations a second then a one-in-a-million failure scenario will happen every second.
Errors in Database Systems, Eventual Consistency, and the CAP Theorem

Summary

  • Microservices are not a free lunch.
  • Complexity management is crucial.
  • Choose your tools responsibly.
  • DevOps to the rescue.

Time for Questions

Thanks

References:

Images

Credits: