Eventuate Tram is a platform that solves the distributed data management problems inherent in a microservice architecture. It’s for Java/Spring-based microservices that use the traditional JDBC/JPA-based persistence model. Unlike event sourcing, adding Eventuate Tram to your Java/Spring Boot application requires minimal changes.
Eventuate Tram makes it easy to implement
Eventuate Tram provides several messaging abstractions:
Eventuate Tram sends messages/events using the Transactional Outbox, which enables a service to atomically send messages/events as part of the database transaction that updates business objects. Similarly, it handles messages/events as part of a database transaction and automically detects and discards duplicate messages/events.
The following diagram shows the architecture of the Eventuate Tram Todo application:
The application consists of two services:
Todo Service - implements the REST endpoints for creating, updating and deleting todos.
The service persists the Todo JPA entity in MySQL.
Eventuate Tram, it publishes Todo domain events that are consumed by the
Todo View Service.
Todo View Service - implements a REST endpoint for querying the todos.
It maintains a CQRS view of the todos in ElasticSearch.
Todo Service publishes events using Eventuate Tram.
Eventuate Tram inserts events into the
MESSAGE table as part of the ACID transaction that updates the TODO table.
The Eventuate Tram CDC service tracks inserts into the
MESSAGE table using the MySQL binlog and publishes messages to Apache Kafka.
Todo View Service subscribes to the events and updates ElasticSearch.
Eventuate Tram sagas builds on Eventuate Tram to provide orchestration-based sagas. Instead of simply relying on services to respond to domain events, you define a saga orchestrator, which tells the saga participants what operations to execute. To understand the difference between choreography using domain events and orchestration, please see this presentation.
To learn more, please see: