Skip to main content

Event-Driven Architecture for Java Developers

Learn how to build Event-Driven systems with a Transactional Outbox and CockroachDBs CDC.

  • Course Number

    event-driven-architecture-for-java-devs
  • Self-Paced

  • Estimated Effort

    2:00/week

Modern architectures are often built with a series of distributed microservices. They span multiple machines, often in different data centers. They communicate using asynchronous events that are pushed to a message queue. However, these systems face some key challenges. They’re built to be distributed, but they often run against non-distributed databases which limits elasticity and resilience. Meanwhile, those that run against distributed, nontransactional databases are faced with the problem of updating a message queue consistently with the state of the database. What if one of those operations fails?

This is where Distributed SQL comes in. CockroachDB provides us with a fully distributed database that includes support for transactions. It allows us to scale our database to match the needs of our system, but also to publish events from our microservices in a way that will be consistent and resilient to failures.

In this course, you’ll learn about the Dual-Write problem, and how you can use the Transactional Outbox Pattern to avoid it. You'll see some best practices and anti-patterns for working with Event-Driven systems. And you'll learn about some features of CockroachDB, such as Change Data Capture (CDC), that can simplify your architecture.

You'll be implementing these ideas using the Spring Data JPA framework, along with Spring Boot. You'll modify a series of microservices so that events emitted from one service can be consumed in another. And you'll do all of this using CockroachDB so that your system can scale from the database all the way through to the application.

Prerequisites

  • Java
  • Spring Data and Spring Boot
Enroll