iluwatar / iluwatar/java-design-patterns
Microservice pattern: Transaction log tailing
Nobody has claimed this yet.
- 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:
- Transaction Log: The database maintains a log of all transactions. This log is used as the source of truth for all changes.
- Log Tailing: A component tails the transaction log and publishes changes to a message broker or event stream.
- Event Stream: Microservices subscribe to the event stream to receive updates.
- Consistency: Ensures eventual consistency across different microservices by propagating changes through the event stream.
- Decoupling: Reduces direct dependencies between microservices by using the transaction log as an intermediary.
References:
- Microservices Pattern: Transaction Log Tailing
- Martin Fowler - Event-Driven Architecture
- Project Contribution Guidelines
Acceptance Criteria:
- Implement a component that tails the transaction log of a database and publishes changes to an event stream.
- Develop microservices that subscribe to the event stream and update their state based on the received events.
- Ensure eventual consistency across all microservices by validating that updates are correctly propagated and handled.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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