Book Image

Microservice Patterns and Best Practices

By : Vinicius Feitosa Pacheco
Book Image

Microservice Patterns and Best Practices

By: Vinicius Feitosa Pacheco

Overview of this book

Microservices are a hot trend in the development world right now. Many enterprises have adopted this approach to achieve agility and the continuous delivery of applications to gain a competitive advantage. This book will take you through different design patterns at different stages of the microservice application development along with their best practices. Microservice Patterns and Best Practices starts with the learning of microservices key concepts and showing how to make the right choices while designing microservices. You will then move onto internal microservices application patterns, such as caching strategy, asynchronism, CQRS and event sourcing, circuit breaker, and bulkheads. As you progress, you'll learn the design patterns of microservices. The book will guide you on where to use the perfect design pattern at the application development stage and how to break monolithic application into microservices. You will also be taken through the best practices and patterns involved while testing, securing, and deploying your microservice application. At the end of the book, you will easily be able to create interoperable microservices, which are testable and prepared for optimum performance.
Table of Contents (20 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

Understanding the pattern


New designs with any kind of legacy are called green projects or greenfield applications. The part of the project that already exists is commonly called brown projects. It is, obviously, simpler to apply Domain-Driven Design (DDD) and patterns on green projects than to legacy projects.

The shared data pattern is a controversial pattern when we talk about microservices. It would certainly be considered an anti-pattern if we applied it to a green project. However, it is a pattern that should be considered as a temporary pattern for legacy applications that are in a transitional phase.

The great concept behind this pattern is to use the same physical structure for data storage. This pattern can be used when there is some doubt about the structure of the data, or when the communication layer between the microservices is not well-defined.

The following diagram is quite interesting, as it illustrates how the pattern works: