This document provides an overview of Narayana 5, an open source transaction manager. It discusses why transaction managers are needed, describes Narayana's features like supporting JTA 1.2 and REST-AT. It also covers using Narayana inside containers like WildFly and Docker. New features in Narayana 5 include a compensations framework, support for NoSQL, and software transactional memory. The document concludes with information on other areas Narayana is working on and links for more details.
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Narayana 5: The premier open source transaction manager
1. Narayana 5:
The premier open source
transaction manager
JBug NCL: 12th May 2015
TOM JENKINSON
2. Agenda
● Why you need a transaction manager
● Using Narayana inside containers
● New features in Narayana 5
3. Why you need a transaction manager - a brief
revision course
4. My bank Your bank
Transactions - why?
My bank account Your bank
account
?
5. The properties of a transaction
There are many types of transaction models, they
generally revolve around adherence to and
relaxation of the so-called ACID properties:
● Atomicity
● Consistency
● Isolation
● Durability
12. WildFly
Fully integrated into WFLY
● Provides JTA 1.2/JTS implementation
● Provides REST-AT coordinator
● Provides WS-AT/BA coordinator
● Can be extended to provide an XATMI backend
for C applications
13. Docker
Docker files for RTS and XTS:
https://github.com/Gytis/jboss-dockerfiles-
narayana/tree/master-xts-and-rts-images
Docker files for JTS:
https://github.com/Gytis/narayana-docker
https://github.
com/Gytis/quickstart/tree/master-JBTM-
14. REST-AT and Undertow
Start up a REST-AT coordinator in 3 lines!
org.jboss.resteasy.plugins.server.undertow.UndertowJaxrsServer server =
new org.jboss.resteasy.plugins.server.undertow.UndertowJaxrsServer();
server.deploy(new org.jboss.jbossts.star.service.TMApplication(), "/");
server.start(Undertow.builder().addHttpListener(8080, "localhost"));
15. JTA in Tomcat
We have two approaches for this
1. Tight integration into Tomcat structure
2. Running within the IronJacamar embedded
container
https://github.
com/jbosstm/quickstart/tree/master/jca-and-
tomcat
16. New features in Narayana 5
Compensations Framework, NoSQL, STM
17. Compensations Framework
Provides JTA 1.2. like API:
● @Compensatable
● @TxCompensate
● @TxConfirm
Works both locally and remotely
Currently does not support recovery
http://jbossts.blogspot.co.
uk/2013/05/compensating-transactions-when-
18. NoSQL
In development
● Atomic
● Eventually consistent
● Relaxes isolation
● Durable
Updates to documents add in transactional data
19. STM
A concurrency model for editing shared state
Broadly speaking can be broken into:
● Optimistic Concurrency Control
● Pessimistic Concurrency Control
The difference is when locks are checked
Typically you have relaxed durability
20. Other things we are working on
We have a prototype of a data-grid transaction
log
We are coming up against CAP theorum for when
to elect a recovery manager