BT

Your opinion matters! Please fill in the InfoQ Survey!

Chris Richardson on Domain-Driven Microservices Design

| Podcast with Chris Richardson Follow 18 Followers by Thomas Betts Follow 5 Followers on Dec 23, 2016 |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

In this week’s podcast, Thomas Betts talks with Chris Richardson, a developer, architect, Java Champion and author of POJOs in Action. Before his workshop on Microservices w/ Spring Boot and Docker at QCon San Francisco 2016, Richardson took time to discuss his ideas on how to use DDD and CQRS concepts as a guide for implementing a robust microservices architecture. You can also watch his  related presentation “Developing Microservices with Aggregates”.

Key Takeaways

Show Notes

Microservices vs. Microservices Architecture

  • 1m:50s - @crichardson tweet: "Microservice architecture" is a better term than "microservices". The latter suggests that a single microservice is somehow interesting.

System Decomposition Following Domain-Driven Design

  • 4m:16s - Decomposing a system into a set of microservices is related to understanding business capability and subdomain.
  • 5m:16s - If you decompose your system in the wrong way, you’re making a mistake at an architectural level. The worst case is a distributed monolith.
  • 6m:34s - In DDD terms, each service is itself a bounded context, with its own domain model and ubiquitous language.
  • 8m:33s - The “fuzzy stuff” in the DDD book, such as bounded contexts, directly apply to a microservices architecture.
  • 10m:26s - One DDD constraint is that a transaction can only create or update a single aggregate. In practice, this means microservice architectures cannot have distributed transactions.
  • 11m:13s - If you want to do microservices properly, read the DDD book.

Microservice Boundaries, EDA and CQRS

  • 11m:51s - Microservices must be loosely coupled, usually creating a model with one database per service.
  • 12m:45s - There is a business requirement to maintain data consistency across services, and using an event driven architecture is a good way to achieve that.
  • 13m:38s - Event sourcing is specific technique for persisting domain objects as a series of events.
  • 14m:11s - Just as transactions don’t like to be split across microservices, queries cannot simply join across multiple data sources. CQRS provides a solution that accommodates querying via microservices and materialized views.

Replacing a Monolith

  • 17m:27s - Microservices are not a silver bullet, nor a free lunch. MSA comes with complexity, ranging from data management to deployment.
  • 20m:00s - When does it make sense to make the transition from a monolith to an MSA?
  • 20m:35s - MSA is a solution to a problem. With an existing monolith, if are you unhappy with the rate of development, or the pain associated with making changes, then microservices are probably the solution.
  • 22m:29s - When moving to microservices, definitely do not do a big bang rewrite -- take an iterative approach, incrementally refactoring your monolith into a set of services.
  • 24m:16s - Implementing microservices can utilize new, cool technology, but always remember the purpose of writing an application is to automate critical business processes. Domain-Driven Design can help develop the business logic at the core of your system.

Technology Concepts Discussed

Books Mentioned

About QCon

QCon  is a practitioner-driven conference designed for technical team leads, architects, and project managers who influence software innovation in their teams. QCon takes place 7 times per year in London, New York, San Francisco, Sao Paolo, Beijing & Shanghai. QCon London is at its 12th Edition and will take place Mar 5-9, 2018. 100+ expert practitioner speakers, 1300+ attendees and 18 tracks will cover topics driving the evolution of software development today. Visit qconlondon.com  to get more details.

More about our podcasts

You can keep up-to-date with the podcasts via our RSS feed, and they are available via SoundCloud and iTunes.  From this page you also have access to our recorded show notes.  They all have clickable links that will take you directly to that part of the audio.

Previous podcasts

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Sponsored Content

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT