Investigate the use of a transaction manager when used within a reactive microservices environment.
Reactive microservice architecture is a trending architectural pattern. The reactive architecture could simply be defined as a system where messages are sent to a jms queue or a specialized event storage and other services are registered to, for being notified when an event is generated to be able to react on it. Synchronous calls from a service to a service are not meant to be a good practice in such system. Here all the communication between services is done with message passing through the event storage.
Such a system is expected to decouple data  where each microservice manages data, which needs for working, on its own. Still there are cases where some data coordination is needed. As the all communication is asynchronous it may be that we need to modify the transaction manager away from synchronous operations. One possibly good match seems to be the Saga transactions and eventual consistency but handling of them is fitting to the message driven system. The way of understanding Saga in microservice world could be overviewed at .
Narayana transaction manager is good in managing Saga transactions where having long history experience from running it for WS or managing consistency in NoSQL databases. But Narayana is designed to manage transactions in synchronous way. The transaction context is normally passed along a RPC call where the transaction is finished after such synchronous call is returned back to the caller.
The point here is to investigate on the topic of usage Saga in reactive architecture, gather working solutions - especially in Java world (some references eg. ), get experience in how they are working and on top of this experience considering implementation of the reactive approach with Narayana. It may be that Narayana requires some modification to execute optimally for such task and then it’s up to reconsideration if some greenfield implementation should be started. As the last step there should be created some sample project (ie. quickstart) where the usage of the implementation would be shown.
With that we expect usage of projects in Red Hat portfolio. The sample project would be probably implemented with usage of the Vert.x, meybe there could be considered usage of Infinispan or AMQ7 for handling events.
The expected output of this effort is
- A research document with state of the art.
- Overview of what are the problem of the synchronous/blocking approach.
- What are the other approaches that people have to this problem,
- A proof-of-concept implementation
- Preferably with use of Narayana transaction manager prepare a service capable to manage transactions in world of reactive microservices
- An example/quickstart showing this in practical terms
- A proof that a transaction manager can be made to work in an asynchronous environment. For example if you have a Vert.x event and it has to commit a transaction. The handler for that message currently does sync ops with transaction manager and that blocks. One of the goals for the project is to prevent blocking of threads in an async environment.
 https://www.youtube.com/watch?v=STKCRSUsyP0(GOTO 2017, The Many Meanings of Event-Driven Architecture, Martin Fowler)
 http://www.oreilly.com/programming/free/reactive-microservices-architecture-orm.csp (Reactive Microservices Architecture)
 http://blog.christianposta.com/microservices/the-hardest-part-about-microservices-data (The Hardest Part About Microservices: Your Data)
 https://www.cs.cornell.edu/andru/cs711/2002fa/reading/sagas.pdf (Sagas paper)
 http://queue.acm.org/detail.cfm?id=2462076 (Eventual Consistency Today: Limitations, Extensions, and Beyond)
 http://queue.acm.org/detail.cfm?id=3025012 (Life Beyond Distributed Transactions)
 http://narayana.io//docs/project/index.html#d0e14874 (Narayana doc, WS-Business Activity)
 http://jbossts.blogspot.cz/2014/05/bringing-transactional-guarantees-to.html (Bringing Transactional Guarantees to MongoDB)
 https://www.youtube.com/watch?v=0UTOLRTwOX0 (Distributed Sagas: A Protocol for Coordinating Microservices - Caitie McCaffrey - JOTB17)
 https://www.youtube.com/watch?v=YPbGW3Fnmbc (Using sagas to maintain data consistency in a microservice architecture by Chris Richardson)
 https://docs.particular.net/nservicebus/sagas (.NET NServiceBus Saga)
 https://www.youtube.com/watch?v=Rm8n-H6zI1k (Dr. Roland Kuhn: Reactive Design Patterns, Akka)
 http://microservices.io/patterns/data/saga.html (Pattern: Saga)