Simplify Microservice Transactions With Oracle Database Sagas

The Saga Pattern

The saga pattern is used to provide data integrity across multiple distributed, isolated services involved in potentially long-lived activities (sometimes referred to as business activities or business transactions to disambiguate).  The classic example, and the one I use here and in the corresponding workshop, is a travel booking consisting of flight, hotel, and car reservations. 

The original paper was published in 1987 and alludes to the advantages of an implementation that runs and stores data within a database and that is precisely what is being done in the Oracle database, making it a perfect fit for microservices and modern applications development for a number of reasons.  

Apache Kafka vs. Oracle Transactional Event Queues as Microservices Event Mesh

This blog focuses on transactional and message delivery behavior, particularly as it relates to microservice architectures.  There are of course numerous areas to compare MongoDB, PostgresSQL, and Kafka with the converged Oracle DB and Oracle Transactional Event Queues/AQ that are beyond the scope of this blog.

The Oracle database itself was first released in 1979 (PostgresSQL was released in 1997 and MongoDB in 2009).  Oracle Advanced Queuing (AQ) is a messaging system that is part of every Oracle database edition and was first released in 2002 (Kafka was open-sourced by LinkedIn in 2011 and Confluent was founded in 2014).