iluwatar / iluwatar/java-design-patterns

Microservice pattern: Transaction log tailing

Open
#2,672 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

epic: pattern info: help wanted type: feature
Dominant language
Java
Stars
94.7k
Forks
27.4k
Avg merge
3d 4h
Merged PRs (30d)
10

Description

Description:
The Microservices - Transaction Log Tailing design pattern focuses on maintaining a consistent and up-to-date data view across different microservices by tailing the transaction log of a database. This pattern is particularly useful in scenarios where multiple microservices need to respond to changes in a shared database in real-time. It ensures that all services are notified of changes and can react accordingly without direct coupling.

Main Elements:

  1. Transaction Log: The database maintains a log of all transactions. This log is used as the source of truth for all changes.
  2. Log Tailing: A component tails the transaction log and publishes changes to a message broker or event stream.
  3. Event Stream: Microservices subscribe to the event stream to receive updates.
  4. Consistency: Ensures eventual consistency across different microservices by propagating changes through the event stream.
  5. Decoupling: Reduces direct dependencies between microservices by using the transaction log as an intermediary.

References:

Acceptance Criteria:

  1. Implement a component that tails the transaction log of a database and publishes changes to an event stream.
  2. Develop microservices that subscribe to the event stream and update their state based on the received events.
  3. Ensure eventual consistency across all microservices by validating that updates are correctly propagated and handled.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No project files, tests, database, or broker are named. Start with the Project Contribution Guidelines and the two referenced pattern articles, then identify the repository's appropriate pattern entry point before defining the implementation scope. Done should include a transaction-log publisher, subscribing services, and validation that updates propagate with eventual consistency.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.