1 What is a microservice?

 

This chapter covers

  • The secret sorrow of being a programmer/product owner
  • The Big Idea behind microservices
  • A certain Someone who came up with the idea first
  • What a microservice is
  • How big a microservice should be
  • Promises that microservices make
  • Challenges to using microservices
  • Our most important design principle when designing software
  • Components and x-ray of a sample microservice
  • What will be covered in some of the later chapters of this book

I’m about to describe microservices. Since you've already decided to read this book, you might already know enough about ‘what microservices are’ to please yourself. If so, feel free to skip ahead, or just let your mind wander pleasantly as you read.

1.1 The Trouble with Computers

The first thing you might think is that microservices are just little services. Micro… Services… - get it? But that’s not what microservices really are…

I hope you are sitting down and have your tissues ready, because the story I’m going to tell is a bit of a tearjerker.

Since people invented computers, we've been trying to get computers to work. And when I say "we", I mean "me". Many an hour I’ve spent aiming kicks at my computer.

Programming sounds easy. Computers don’t argue. All you need to do is to tell the computer what to do, and it will do it.

1.1.1 Virtue is Its Own Punishment

1.1.2 A Simple Idea that Changes Everything

1.2 Is a Microservice Just a Micro Service?

1.2.1 How Big is a Microservice?

1.2.2 Promises That Microservices Make

1.2.3 Our Design Principles

1.3 X-Ray of a Sample Microservice

1.3.1 Inbound Pipes

1.3.2 Core Microservice

1.3.3 Event Hub

1.3.4 Outbound Pipes

1.4 Summary