The goal is to investigate on event sourcing. Find what it is and how it is used in the microservice architecture. Then design and change the current Narayana LRA implementation to be capable to store its state changes as events by saving them in the event source log storage.
Narayana LRA is an implementation of “saga transactions” as effort to add transaction capabilities to the MicroProfile (set of specifications transferring Java EE development approaches to the microservice environment while boosting them to the next level). Saga is concept of transaction processing where transaction manager does not ensure full ACID guarantees. While it relaxes some of the guarantees it runs without explicit locks which makes this concept a good fit for the distributed environments where microservice architecture is implemented in.
The current LRA stores transactional records in the Narayana transaction object store. In praxis that means storing data at the file system or in the database via JDBC linking. Of the general knowledge it seems the the event sourcing pattern being a good fit for data storage in the microservice environments. Where you have a global event storage that serves as a store for all actions (events) leaving borders of a service. When a new service is started it can load all the events emitted by the instances of the same kind and get to the same state by replaying them. Having stored the LRA state transitions as events in the global log could provide flexibility while making feasible to replay the work from past.
Why to build this?
Event sourcing as way of decoupling microservices is current trend and applying the saga pattern in this concept makes perfect sense.
Task in details
Providing proof-of-concept application that would be capable to run with the MicroProfile stack (as LRA is expected to be well integrated in it) and it will be using event sourcing as the communication (aka. publish-subscribe) and data storage pattern (aka. event log).
The purpose is to investigate what are the good and bad parts of the event sourcing, how the microservice system can benefit from it, how the saga can be implemented and many other interesting queries which come during the work on this topic.
It’s expected the LRA codebase will need to be studied.
What you will learn
- Learn about principles of microservice architecture
- What is saga pattern and what is good for
- How to use sagas, as the transactional solution, in microservice world
- What is event sourcing and how to use it in the microservice architecture
- What the CQRS is about
- Coding and integrating the event sourcing ideas
- Implementation details: programming language of the solution is Java
- Prerequisites: Java
- Expected output: code changes (at least in proof-of-concept state) for the Narayana LRA implementation which provides a chance to use event sourcing for storing and replaying the LRA state
- Difficulty: master thesis
- Language: all materials are in english, it is preferred the thesis will be written in english too
- Saga pattern: https://www.youtube.com/watch?v=0UTOLRTwOX0
- MicroProfile LRA: https://github.com/eclipse/microprofile-lra
- Thesis about sagas: https://is.muni.cz/th/gvv0m/
- Event driven architecture: https://www.youtube.com/watch?v=STKCRSUsyP0
- https://martinfowler.com/eaaDev/EventSourcing.html and https://martinfowler.com/bliki/CQRS.html
Don’t hesitate to contact me at email@example.com to get detailed information about the project.