Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1.15 KB

File metadata and controls

25 lines (18 loc) · 1.15 KB

"Process Manager" or "Saga"?

Strictly speaking, using term "Saga" for "Process Manager" isn't correct because these are two different patterns.

Process Manager is a generic pattern to orchestrate processes in a way of "when this happened, what should happen next".

Saga is a pattern that helps with reverting multi-transactional action. It answers the question of "when something happened, and then the next thing failed, how do I make sure that all the steps, this and all before it, are reverted?".

As a pattern, "Saga" means "this is a process that can completely be reverted in some (failure) condition, and here is how".

Sagas are typically implemented as process managers (or live within them), that's why some people may interchange these terms.

This way we can see Sagas as Process Managers, but not all Process Managers are Sagas! In fact, the majority of them are not!

So, saying Saga instead of Process Manager is like saying Apple instead of Fruit. Or, maybe, like saying Disposable instead of saying Object, because not all objects, and even if some are, the focus of the conveyed meaning could be different.