MEAPEdition
ManningEarlyAccessProgram
MicroservicePatterns
Version4
Copyright2017ManningPublications
FormoreinformationonthisandotherManningtitlesgoto
www.manning.com
©Manning Publications Co. We welcome reader comments about anything in the manuscript - other than typos and
other simple mistakes. These will be cleaned up during production of the book by copyeditors and proofreaders.
https://forums.manning.com/forums/microservice-patterns
Licensed to rong fengliang <1141591465@qq.com>
welcome
Thank you for purchasing the MEAP for Microservices patterns. I am very excited to see
the first few chapters be released and I am looking forward to completing the book. This
is an intermediate level book designed for enterprise developers and architects who want
to adopt the microservice architecture.
I don’t believe in blindly advocating for any particular technology. The microservice
architecture is not a silver bullet. It has both benefits and drawbacks. Moreover, there are
numerous issues that you must address when using the microservice architecture. This
book captures this philosophy. Most of the content is organized around patterns, which are
a great way to describe the trade-offs of using a particular approach.
I am initially releasing the first two chapters. Chapter 1 envisions the state of software
development at Food to Go, Inc., which is the fictitious company from my first book
POJOs in Action. After ten years they are in what I call monolithic hell. All aspects of
software development and deployment are slow and painful. Sadly, the odds are high that
you are in a similar situation. In this chapter, you will learn how to escape monolithic hell.
I describe the microservice architecture, it’s benefits and drawbacks. You will learn about
the microservices pattern language, which is a collection of patterns that solve the
problems that you face when using the microservice architecture.
Chapter 2 describes the key decision that you must make when using the microservice
architecture: how to compose an application into a set of services. You will learn about the
important of software architecture. I describe how the microservice architecture is what is
known as an architectural style. You will learn about two main decomposition strategies.
Chapter 3 looks at how inter-process communication (IPC) plays much more critical
role in a microservice architecture than it does in a monolithic application. You will learn
about the various IPC options including messaging and REST.I describe why
asynchronous messaging is preferred approach. You will learn how to send messages as
part of a database transaction and why it’s important.
Looking ahead, later chapters dig deeper into the microservice architecture. I’ll
describe key architectural issues including inter-process communication and transaction
management in the microservice architecture. The latter is especially challenging since
each service has its own database and traditional distributed transaction are not a viable
©Manning Publications Co. We welcome reader comments about anything in the manuscript - other than typos and
other simple mistakes. These will be cleaned up during production of the book by copyeditors and proofreaders.
https://forums.manning.com/forums/microservice-patterns
Licensed to rong fengliang <1141591465@qq.com>
option for modern applications. After that I will cover numerous other topics including
deployment, testing and monitoring patterns. You will also learn how to refactor an
existing monolithic application into a microservice architecture.
As you are reading Microservices patterns, I hope you’ll take advantage of the Author
Online forum. I will be reading your comments and responding. I appreciate any feedback,
as it will help me write a better book.
Thanks again!
— Chris Richardson
©Manning Publications Co. We welcome reader comments about anything in the manuscript - other than typos and
other simple mistakes. These will be cleaned up during production of the book by copyeditors and proofreaders.
https://forums.manning.com/forums/microservice-patterns
Licensed to rong fengliang <1141591465@qq.com>
brief contents
1 Escaping monolithic hell
2 Decomposition strategies
3 Inter-process communication in a microservice architecture
4 Managing transactions with sagas
5 Designing business logic in a microservice architecture
6 Developing business logic withevent sourcing
7 Implementing queries in a microservice architecture
8 External API patterns
9 Testing microservices
10 Microservices in production
11 Refactoring to microservices
©Manning Publications Co. We welcome reader comments about anything in the manuscript - other than typos and
other simple mistakes. These will be cleaned up during production of the book by copyeditors and proofreaders.
https://forums.manning.com/forums/microservice-patterns
Licensed to rong fengliang <1141591465@qq.com>