4 Services

 

This chapter covers

  • Refining the concept of microservices
  • Exploring principal variants of the microservice architecture
  • Comparing monoliths versus microservices
  • Thinking of microservices as software components
  • What functionality should be external to microservices

To understand the implications and trade-offs of moving to a new architecture, you need to understand how it differs from the old way of doing things, and how the new way will solve old problems. What are the essential differences between monolithic and microservice architectures? What are the new ways of thinking? And how do microservices solve the problems of enterprise software development?

A microservice is a unit of software development. The microservices architecture provides a mental model that simplifies the world at a useful level. The proposition of this book is that microservices are the closest thing yet to ideal software components. They’re perfectly sized artifacts for fine-grained deployment into production. They’re easily measured to ensure correct operation. The microservice attitude is the belief that this architecture delivers a fast, practical, and efficient way to create business value with software.

4.1 Defining microservices

4.2 Microservice architectures

4.2.1 The mini web servers architecture

4.2.2 The distributed objects architecture

4.2.3 The language platform architecture

4.2.4 The messages before services architecture

4.3 Monolithic projects vs. microservice projects

4.3.1 How microservices change project management

4.3.2 Uniformity makes estimation easier

4.3.3 Disposable code makes for friendlier teams

4.3.4 Homogeneous components allow for heterogeneous configuration

4.3.5 There are different types of code

4.4 The unit of software

4.5 Microservices are software components

4.5.1 Encapsulated

4.5.2 Reusable

4.5.3 Well-defined interfaces

4.5.4 Composable

4.6 The internal structure of a microservice

4.7 Summary