Take a look atAssemblage, a microservice architecture definition process.
In my workshop, you will learn about to use Assemblage to design a microsevice architecture for your application.

You are developing a business-critical enterprise application.You need to deliver changes rapidly, frequently and reliably - as measured by theDORA metrics - in order for your business to thrive in today’s volatile, uncertain, complex and ambiguous world.Consequently, your engineering organization is organized into small, loosely coupled, cross-functional teams as described byTeam Topologies.Each team delivers software using DevOps practices as defined by theDevOps handbook.In particular, it practices continuous deployment.The team delivers a stream of small, frequent changes that are tested by an automated deployment pipeline and deployed into production.

A team is responsible for one or more subdomains.A subdomain is an implementable model of a slice of business functionality, a.k.a. business capability.It consists of business logic, which consists of business entities (a.k.a. DDD aggregates) that implement business rules, and adapters, which communicate with the outside world.A Java-based subdomain, for example, consists of classes organized into packages that’s compiled into a JAR file.
The subdomains implement the application’s behavior, which consists of a set of (system) operations.An operation is invoked in one of three ways: synchronous and asynchronous requests from clients; events published by other applications and services; and the passing of time.It mutates and queries business entities in one or more subdomains.
How to organize the subdomains into one or more deployable/executable components?
There are fivedark energy forces:
There are fivedark matter forces:
Design an architecture that structures the application as a set of two or moreindependently deployable,loosely coupled,components, a.k.a. services.Each service consists of one or more subdomains.Each subdomain is part of a single service except for shared library subdomains that are used by multiple services.A service is owned by the team (or teams) that owns the (non-library) subdomains.

AnAPI gateway is typically the application’s entry point.Some system operations will be local to a single service, while others will be distributed across multiple services.A distributed system operation is implemented using theservice collaboration patterns.
In order to be independently deployable each service typically has its own source code repository and its own deployment pipeline, which builds, tests and deploys the service.
Let’s imagine that you are building an e-commerce application that takes orders from customers, verifies inventory and available credit, and ships them.The application consists of several components including the StoreFrontUI, which implements the user interface, along with some backend services for checking credit,maintaining inventory and shipping orders.The application consists of a set of services.

Please see theexample applications developed by Chris Richardson.These examples on Github illustrate various aspects of the microservice architecture.
This solution has a number of benefits:
This solution has a number of (potential) drawbacks:
There are many issues that you must address when designing an architecture.
There are two key issues that you must address.The first issue is whether to use the monolithic or microservice architecture.And then, if you choose to use the microservice architecture, the next key challenge is to define a goodservice architecture.You must avoid (or at least minimize) the potential drawbacks: complex, inefficient interactions; complex eventually consistent transactions; and tight runtime coupling.
Assemblage, is an architecture definition process that uses thedark energy and dark matter forces to group the subdomains in a way that results in good microservice architecture.
The result of applying Assemblage is either a monolithic architecture or a microservice architecture.
Thedark energy and dark matter forces play a major role in shaping the service architecture and also heavily influence the design of the distributed operations mentioned below.
Another key design challenge when using microservices, is implementing distributed operations, which span multiple services.This is especially challenging since eachservice has its own database.The solution is to use theservice collaboration patterns, which implement distributed operations as a series of local transactions:
There are four service collaboration patterns:
The Saga, Command-side replica and CQRS patterns use asynchronous messaging.Services typically need to use theTransaction Outbox pattern to atomically update persistent business entities and send a message.
There are many patterns related to the Microservices architecture pattern. TheMonolithic architecture is an alternative to the microservice architecture.The other patterns in the Microservice architecture architecture pattern address issues that you will encounter when applying this pattern.

Most large scale web sites includingNetflix,AmazonandeBay have evolved from a monolithic architecture to a microservice architecture.
Netflix, which is a very popular video streaming service that’s responsible for up to 30% of Internet traffic, has a large scale, service-oriented architecture.They handle over a billion calls per day to their video streaming API from over 800 different kinds of devices.Each API call fans out to an average of six calls to backend services.
Amazon.com originally had a two-tier architecture.In order to scale they migrated to a service-oriented architecture consisting of hundreds of backend services.Several applications call these services including the applications that implement the Amazon.com website and the web service API.The Amazon.com website application calls 100-150 services to get the data that used to build a web page.
The auction site ebay.com also evolved from a monolithic architecture to a service-oriented architecture.The application tier consists of multiple independent applications.Each application implements the business logic for a specific function area such as buying or selling.Each application uses X-axis splits and some applications such as search use Z-axis splits.Ebay.com also applies a combination of X-, Y- and Z-style scaling to the database tier.
There arenumerous other examples of companies using the microservice architecture.
Chris Richardson hasexamples of microservices-based applications.
Microservices.io is created byChris Richardson, software architect, creator of the original CloudFoundry.com, and author ofMicroservices Patterns. Chris advises organizations on modernization, architecture, and building systems that avoid becoming modern legacy systems.
Avoid the trap of creating a modern legacy system — a new architecture with the same old problems.
Contact me to discuss your modernization goals.

I am very excited to announce that the MEAP for the second edition of my book, Microservices Patterns is now available!
Learn moreGot a question about microservices?
Fill inthis form. If I can, I'll write a blog post that answers your question.

I help organizations improve agility and competitiveness through better software architecture.
Learn more about myconsulting engagements, andtraining workshops.
Premium content now available for paid subscribers atpremium.microservices.io.
Chris teachescomprehensive workshops for architects and developers that will enable your organization use microservices effectively.
Avoid the pitfalls of adopting microservices and learn essential topics, such as service decomposition and design and how to refactor a monolith to microservices.
Learn more
Got a specific microservice architecture-related question? For example:
Consider signing up for atwo hour, highly focussed, consulting session.
Assess your application's microservice architecture and identify what needs to be improved.Engage Chris to conduct an architect review.
Chris offers numerous other resources for learning the microservice architecture.
Want to see an example? Check out Chris Richardson's example applications.See code

My virtual bootcamp, distributed data patterns in a microservice architecture, is now open for enrollment!
It covers the key distributed data management patterns including Saga, API Composition, and CQRS.
It consists of video lectures, code labs, and a weekly ask-me-anything video conference repeated in multiple timezones.
The regular price is $395/person but use coupon OFFEFKCW to sign up for $95 (valid until Sept 30th, 2025). There are deeper discounts for buying multiple seats.
Take a look at myManning LiveProject that teaches you how to develop a service template and microservice chassis.

Engage Chris to create a microservices adoption roadmap and help you define your microservice architecture,
Use theEventuate.io platform to tackle distributed data management challenges in your microservices architecture.

Eventuate is Chris's latest startup. It makes it easy to use the Saga pattern to manage transactions and the CQRS pattern to implement queries.
Join themicroservices google group