Slide 1

Slide 1 text

Avoid the microservice fallacy put your domain back into the mighty monolith

Slide 2

Slide 2 text

Please support our sponsors #dddbne

Slide 3

Slide 3 text

Fill out your feedback • To go into the draw for prizes, please remember to complete your feedback at: • http://www.dddbrisbane.com/fee dback • No feedback = No Prizes! #dddbne

Slide 4

Slide 4 text

Avoid the microservice fallacy put your domain back into the mighty monolith

Slide 5

Slide 5 text

Avoid the microservice fallacy put your domain back into the mighty majestic monolith

Slide 6

Slide 6 text

Hi, I’m Jakob • Danish immigrant • Father of 3 • Brewer • Rookie surfer • Pragmatist • Curious kind-a-guy • Consultant at Readify • @hgaard • https://blog.hgaard.dk

Slide 7

Slide 7 text

Why are we here? • You have a feeling microservices might be a bit hyped and you are curious and want to hear more • You think microservices are awesome and should be used everywhere (and you are here to heckle)

Slide 8

Slide 8 text

What are microservices “Service-Oriented Architecture (SOA) is a very broad term and practically meaningless. Microservices is a subset of SOA with the value being that it allows us to put a label on this useful subset of SOA terminology” Martin Fowler

Slide 9

Slide 9 text

What are microservices “Microservices is a variant of the service-oriented architecture (SOA) architectural style that structures an application as a collection of loosely coupled services. In a microservices architecture, services should be fine-grained and the protocols should be lightweight” Wikipedia

Slide 10

Slide 10 text

Microservice promises • Forces you to improve modularity • Enables parallelized development • Scales on a module level • Improves time to delivery • Makes you get your product to market faster

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

All we need to do then is to... “sprinkle a bit of DevOps on top”

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Over-emphasizing benefits • Microservices are distributed computing • Distributed computing is hard • 1st rule of distributed computing

Slide 16

Slide 16 text

Fallacies of distributed computing • The network is reliable • Latency is zero • Bandwidth is infinite • The network is secure • Topology doesn't change • There is one administrator • Transport cost is zero • The network is homogeneous

Slide 17

Slide 17 text

The microservice premium • Fault tolerance • Dealing with eventual consistency • Multiple deployment pipelines • Elaborate monitoring

Slide 18

Slide 18 text

Docker will solve this for us • Yes • It lowers the operational cost of running microservices • But • It does not solve fault tolerance or eventual consistency

Slide 19

Slide 19 text

“If you can't build a Monolith, what makes you think you can build distributed microservices” Simon Brown

Slide 20

Slide 20 text

• You are not Google, Facebook or Netflix • Don't solve their problems • Chances are that you will never gain the benefits of microservices

Slide 21

Slide 21 text

What are you trying to solve? • Scaling vs availability • Breaking system into (the right) components • Independent deployment • Test components independently • It fits your existing organizational silos

Slide 22

Slide 22 text

Apply a broader perspective • The DRY obsession • This leads to premature generalization

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

“Beware of the Turing tar-pit in which everything is possible but nothing of interest is easy.” Alan Perlis

Slide 26

Slide 26 text

We are a hype industry "The hype is driving people to lose focus of what really matters: Customer.” Duncan Bradford

Slide 27

Slide 27 text

We are problem solvers

Slide 28

Slide 28 text

Put your domain back into the Majestic Monolith

Slide 29

Slide 29 text

Monolith or microservice first • Fowler vs Tilkov • Think hard about the costs related to operating a microservice environment • Microservices might enable you to move faster

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

The Majestic Monolith • An integrated system that collapses as many unnecessary conceptual models as possible • Encourages the campsite rule • Create a culture that reflects that • Run small teams

Slide 32

Slide 32 text

Brown field projects • Safest decision you can make is to solve the business problem first • Your system will never be done • Refactor to Monolith • Once you have a coherent monolith it will be easier to discover its actual components

Slide 33

Slide 33 text

Identify what your system is

Slide 34

Slide 34 text

Write test on system edges • And refactor like a boss • Understand and appreciate that these tests help specify your domain

Slide 35

Slide 35 text

Insist that no service boundary should be left behind • Collapses as many unnecessary conceptual models as possible • Question any attempt of generalization • Rule of 3 • Avoid any internal service boundary like the plague

Slide 36

Slide 36 text

Apply all the good principles that are prerequisites for microservices • Apply the discipline required to operate a microservice • Break your domain into well defined components • Mature deployment pipeline • Apply elaborate monitoring

Slide 37

Slide 37 text

“Simplicity is prerequisite for reliability.” Edsgar W. Dijkstra

Slide 38

Slide 38 text

• Understand that your prime goal is to deliver business value • Microservices are probably more expensive than you think – be sure you want to pay the price • Microservices require a lot of discipline – instead adopt this discipline in your monolith • Know the problem you are solving – don't let potential problems dictate your solution

Slide 39

Slide 39 text

So should I use microservices? “It depends…”

Slide 40

Slide 40 text

“probably not”