Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Cloud-Native Microservices with Jakarta EE

You're reading from   Hands-On Cloud-Native Microservices with Jakarta EE Build scalable and reactive microservices with Docker, Kubernetes, and OpenShift

Arrow left icon
Product type Paperback
Published in Jan 2019
Publisher Packt
ISBN-13 9781788837866
Length 352 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Luigi Fugaro Luigi Fugaro
Author Profile Icon Luigi Fugaro
Luigi Fugaro
Mauro Vocale Mauro Vocale
Author Profile Icon Mauro Vocale
Mauro Vocale
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Jakarta EE - the New Open Source Life of Java EE FREE CHAPTER 2. Microservices and Reactive Architecture 3. Cloud-Native Applications 4. Building Microservices Using Thorntail 5. Eclipse MicroProfile and Transactions - Narayana LRA 6. Linux Containers 7. Platform as a Service 8. Microservices Patterns 9. Deployment 10. Monitoring 11. Building Microservices Using Spring Boot 2 12. Building Microservices Using Vert.X 13. Other Books You May Enjoy

The saga pattern

The saga pattern is the solution, proposed by microservice architectures to manage transactions in distributed systems.

A saga is a sequence of operations that represent a unit of work that can be undone by the compensation action. When an operation is successful, it publishes a message or event to trigger the next local transaction in the saga; otherwise, the saga executes a series of compensating transactions that undo the changes that were made by the preceding. Each operation can be seen as a local transaction; so, it performs a commit or rollback to its own data source, but communicates with all other operations or local transactions that build the saga.

The saga guarantees that either all of the operations complete successfully, or the corresponding compensation actions are run for all of the executed operations, to cancel partial processing.

This approach...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime