The hardest part of microservices: your data

Track: Microservices
Skill Level: Intermediate
Room: Room A302
Time Slot: Thu 2/23, 2:30 PM
Tags: java , kubernetes , spring boot , domain driven design , apache camel , apache kafka , microservices , cap theorem , docker , fabric8
Presentation Link
Abstract

Microservices architecture is a very powerful way to build scalable systems optimized for speed of change. To do this, we need to build independent, autonomous services which by definition tend to minimize dependencies on other systems. One of the tenants of microservices, and a way to minimize dependencies, is “a service should own its own database”. Unfortunately this is a lot easier said than done. Why? Because: your data.

We’ve been dealing with data in information systems for 5 decades so isn’t this a solved problem? Yes and no. A lot of the lessons learned are still very relevant. Traditionally, we application developers have accepted the practice of using relational databases and relying on all of their safety guarantees without question. But as we build services architectures that span more than one database (by design, as with microservices), things get harder. If data about a customer changes in one database, how do we reconcile that with other databases (especially where the data storage may be heterogenous?).

For developers focused on the traditional enterprise, not only do we have to try to build fast-changing systems that are surrounded by legacy systems, the domains (finance, insurance, retail, etc) are incredibly complicated. Just copying with Netflix does for microservices may or may not be useful. So how do we develop and reason about the boundaries in our system to reduce complexity in the domain?

In this talk, we’ll explore these problems and see how Domain Driven Design helps grapple with the domain complexity. We’ll see how DDD concepts like Entities and Aggregates help reason about boundaries based on use cases and how transactions are affected. Once we can identify our transactional boundaries we can more carefully adjust our needs from the CAP theorem to scale out and achieve truly autonomous systems with strictly ordered eventual consistency. We’ll see how technologies like Apache Kafka, Apache Camel and Debezium.io can help build the backbone for these types of systems. We’ll even explore the details of a working example that brings all of this together.

Christian Posta

Christian Posta (@christianposta) is a Principal Middleware Specialist/Architect at Red Hat and well known for being an author, frequent blogger, speaker, and open-source enthusiast. He is the author of Microservices by Example (O’Reilly June 2016) and committer on open-source projects Apache ActiveMQ and Apache Camel, Fabric8.io, and others. Christian has spent a great deal of time working with large companies creating and deploying large scale distributed architectures - many of what are now called Microservices based. He enjoys mentoring, training and leading teams to be successful with distributed systems concepts, microservices, devops, and cloud-native application design.

Have a Question

CONTACT US