Book Image

Software Architecture with Spring 5.0

By : René Enríquez, Alberto Salazar
Book Image

Software Architecture with Spring 5.0

By: René Enríquez, Alberto Salazar

Overview of this book

Spring 5 and its ecosystem can be used to build robust architectures effectively. Software architecture is the underlying piece that helps us accomplish our business goals whilst supporting the features that a product demands. This book explains in detail how to choose the right architecture and apply best practices during your software development cycle to avoid technical debt and support every business requirement. Choosing the right architecture model to support your business requirements is one of the key decisions you need to take when a new product is being created from scratch or is being refactored to support new business demands. This book gives you insights into the most common architectural models and guides you when and where they can be used. During this journey, you’ll see cutting-edge technologies surrounding the Spring products, and understand how to use agile techniques such as DevOps and continuous delivery to take your software to production effectively. By the end of this book, you’ll not only know the ins and outs of Spring, but also be able to make critical design decisions that surpass your clients’ expectations.
Table of Contents (21 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Principles of microservices


There are a lot of definitions of microservices that are available on the web. One that comes up frequently is the following:

"Microservices are small and autonomous services that work well together."

Let's start looking at this definition and what it means in a little more detail.

Size

The fact that the word microservices contains the word micro leads us to think that the service's size must be really small. However, it's almost impossible to define what the right size of the services should be using metrics such as how many lines of code or files there are, or the size of a particular deployable artifact. Instead, it's much simpler to use the following idea:

"A service should be focused on doing one thing well."

- Sam Newman

That one thing can be thought of as one business domain. If you're building systems for an online store, for example, they might cover the following business domains:

  • Customer management
  • Product catalog
  • Shopping cart
  • Orders

The idea is to build one...