New Release: Oracle Transaction Manager for Microservices (MicroTx) 24.2.1

July 9, 2024 | 6 minute read
Todd Little
Chief Architect, Transaction Processing Products
Text Size 100%:

Oracle has released new versions of the Oracle Transaction Manager for Microservices (MicroTx).  These new releases are available immediately and includes for the Enterprise Edition a number of new features that furthers the goal of making data consistency easy to achieve in the world of microservices.  MicroTx offers a variety of means to ensure that the data maintained by multiple microservices remains consistent, ensuring all updates occur or none of them occur.  This post describes some of the new features in the Enterprise Edition and concludes my series on “Where is the Complexity”.  Stay tuned for further updates. 

Automatic Saga Compensation

If you’ve been following along in my blog, you’ll recall that I mentioned an upcoming feature that provided automatic compensation for certain sagas.  When using the saga pattern to ensure data consistency, the developer typically needs to provide compensation logic to undo the effects of the original local transaction. For example, as part of a saga, space on a flight has successfully been reserved.  Then when trying to book a hotel, no rooms were available, so the space previously reserved needs to be returned to the flight.  But to know how much space to return, the application would have had to track the original amount withdrawn from inventory.   With this new release of MicroTX EE, it’s possible to have the database track these amounts by using Database Sagas and Lock-free Reservations features in the recently released Oracle Database 23ai.

Lock-free Reservations allow an application to make updates to reservable columns in a row without locking the row.  Changes to reservable columns that are part of a Saga are escrowed so they can be guaranteed to be reversable.  When the Saga commits, the escrowed amount is finalized.  Should the Saga fail and need to be compensated, any changes to reservable columns are automatically compensated, potentially eliminating the need for application specific compensation code.  Should the Saga include changes to normal columns, application specific completion and compensation code will still likely be required.

Try-Confirm/Cancel (TCC) Support in MicroTx Spring Boot Library

This release of MicroTx EE includes support for developing Spring Boot applications using the TCC transaction pattern.  TCC is a lightweight, highly performant transaction pattern that uses normal HTTP verbs as intended to manage reservations represented by URIs.  During the Try phase performed with a POST, called microservices create a reservation based upon the Try request and return a URI in a custom HTTP header representing a reservation that can later be confirmed or canceled.  When all the necessary reservations have been made, the initiator asks the MicroTx coordinator to Confirm all the reservations by making PUT calls on all reservation URIs. 

Alternatively, if some reservations couldn’t be made, the initiator could instead decide to Cancel all the pending reservations by asking the MicroTx coordinator to Cancel all the reservations by making DELETE calls on all the reservation URIs.  In either scenario, the MicroTx coordinator takes care of performing all the necessary retries.  Should the coordinator be unable to Confirm or Cancel some reservations, due to network or other issues, the reservations will timeout and effectively be canceled.

The advantage of TCC is that it maintains strong consistency, avoids dirty reads, and requires the least number of interactions to coordinate the transaction making it very efficient.

MicroTx LRA Client library for Micronaut

The 24.2.1 release includes a new client library for Micronaut to support Eclipse MicroProfile Long Running Actions (LRA).  This library allows Micronaut based microservices to initiate or participate in an LRA managed by the MicroTx coordinator.  Simply including the library in the applications POM and adding the LRA annotations is all that’s required to get started.

MicroTx Coordinator Alerts

Using the Prometheus Alertmanager, one can now receive alert notifications based upon Prometheus scraped data.  The Alertmanager takes care of such things as deduplication of alerts, support for multiple receivers such as email or PagerDuty.

Alertmanager

 

Console Enhancements

The MicroTx console now supports generating notifications when certain failures occur such as being unable to reach the MicroTx coordinator.  Here is an example:

MicroTx Console

 

As well the console now supports authentication and authorization using OpenID Connect JWTs.

Openshift Certification for MicroTx

MicroTx is now certified to run in OpenShift 4.14.x with or without Istio, further increasing the platform support for MicroTx.  OpenShift joins Oracle Container Engine for Kubernetes (OKE) and Docker as supported platforms as well as running in a standalone environment. MicroTx provides client libraries for the following languages and their supported frameworks and transaction patterns on these platforms:

Language

Frameworks

Transaction Patterns

Java 11

Helidon 2.x, WebLogic Server 14

XA, Saga, TCC

Java 17

Helidon 3.x, Helidon 4.x, Spring Boot 3.x, Micronaut 4.2.1 or later

XA, Saga, TCC

Python 3.11 or later

Django, Flask

TCC

TypeScript/JavaScript

Node.js, Express.js

XA, Saga, TCC

PL/SQL

APEX/ORDS

XA

 

APEX/ORDS enhancement for XA

This release introduces support for XA transaction initiation being performed in PL/SQL in APEX/ORDS.  Previously APEX/ORDS applications could only be participants in an XA transaction.  In 24.2.1 the MicroTx APEX/ORDS library has been enhanced to support initiating an XA transaction from within the APEX/ORDS application.  This allows APEX/ORDS applications to start an XA transaction and call other microservices via REST that will also participate in the XA transactions.

Upgrading from MicroTx Free to MicroTx Enterprise Edition

It’s now possible to start with MicroTx Free for development and then upgrade to MicroTx Enterprise Edition. This release describes the necessary configuration changes that need to take place in order to use MicroTx Enterprise Edition in place of an existing MicroTx Free installation.

Conclusion

With this new release of MicroTx, Oracle demonstrates its commitment to simplifying the development of cloud native applications by helping developers ensure the data across their microservices is consistent and up to date.  Try MicroTx Free at no cost and when ready to move into production, easiy upgrade to MicroTx Enterprise Edition.

Todd Little

Chief Architect, Transaction Processing Products

I'm currently the Chief Architect for a family of transaction processing products at Oracle including Oracle Tuxedo product family, Oracle Blockchain Platform, and the new Oracle Transaction Manager for Microservices (MicroTx).  My main areas of focus are on security, privacy, confidentiality, performance, and scalability.  My job is to provide the technical strategy for these products to ensure they meet customer requirements.

Prior to being acquired by Oracle, I was Chief Architect for BEA Tuxedo at BEA Systems, Inc. While at BEA Systems, I was responsible for defining the technical strategy and direction for the Tuxedo product family. I developed the Tuxedo Control for WebLogic Workshop that greatly simplified the usage of Tuxedo services from Workshop based applications. I also received two patents for methods allowing design patterns in a UML modeling tool to control the generation of software artifacts.

During my nearly 50 years of software architecture and development experience, I have worked on a wide range of software systems and technology and have 44 published patents. At Science Applications International I worked on microcoded plasma display systems and command, control, and communication systems for naval applications. As a senior software consultant at Digital Equipment Corporation, I was the New York Area Regional Tools Consultant and also helped develop a multi-language multi-threaded distributed object oriented runtime environment with concurrent garbage collection.

Show more

Previous Post

Introducing Oracle Exadata Database Service on Exascale Infrastructure

Bob Thome | 5 min read

Next Post


Simplifying Database Consolidation with Elastic Pools

Tony Politano | 5 min read