Skip to Main Content
Modern Java EE Design Patterns
book

Modern Java EE Design Patterns

by Markus Eisele
January 2016
Intermediate to advanced content levelIntermediate to advanced
30 pages
1h 19m
English
O'Reilly Media, Inc.
Content preview from Modern Java EE Design Patterns

Chapter 5. Microservices Design Pattern

Functional decomposition of an application with the help of DDD is a prerequisite for building a microservices architecture. Only this approach allows you to effectively design for loose coupling and high cohesion. Even if you go with the much simpler service characteristics, you’ll still be able to decompose already existing applications. However, unlike with applications, which are tied together by the frontend, microservices can interact with each other and span a network of service calls. To keep the variety of interactions comprehensible and maintainable, a first set of patterns have emerged that will help you to model the service interaction. These patterns were first published by Arun Gupta, but have been revised for this report.

Common Principles

Every microservice has some common basic principles that need to be taken into account. They are derived from a quick recap of “Service Characteristics” and “Microservices Best Practices”.

To Avoid Trunk Conflict, Each Microservice Is Its Own Build

Conduct a separate build for each microservice. One reason for this is that teams can be fully responsible for putting new versions into production. It also enables the team to use the needed downstream services at the correct revision by querying the repository. Compare “Independently Deployable and Fully Contained”.

The Business Logic Is Stateless

Treat the logic in your services as stateless. Needing to replicate state across various services ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Architecting Modern Java EE Applications

Architecting Modern Java EE Applications

Sebastian Daschner
Java EE 8 Design Patterns and Best Practices

Java EE 8 Design Patterns and Best Practices

Rhuan Rocha, Joao Carlos Purificação
Design Patterns and Best Practices in Java

Design Patterns and Best Practices in Java

Kamalmeet Singh, Adrian Ianculescu, Lucian-Paul Torje

Publisher Resources

ISBN: 9781492042266Errata Page