Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] SAGAs #50

Open
lorensr opened this issue May 4, 2022 · 3 comments
Open

[Feature Request] SAGAs #50

lorensr opened this issue May 4, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@lorensr
Copy link
Contributor

lorensr commented May 4, 2022

SAGA: https://microservices.io/patterns/data/saga.html

Current state

We have SAGA helpers in:

  • Java (Basic—it's just cleanup code. Mostly users implement their own classes.)
  • PHP
  • coinbase-ruby

Discussion excerpts

  • One benefit of having Saga in Java SDK that people see it as a "feature" of the platform. We know that it is implementable from scratch in a few hours. But new users look for a "checkbox" to check.
  • It is one of the core use cases we want to support natively
  • My only argument that we should actually design Sagas and improve this class functionally. We need to make some better wrapper around this whole Subtransactions Implemented As Child Workflow Waiting For Signal (which is more of two-factor-commit than a saga). We don’t even have it written right now as our advice how to implement SAGAs. We need a better and safer abstraction.
  • It requires PM/Design work. So I would say SAGA looks like a stream of work to me.
  • It needs a careful design aligned with our best practices that we usually recommend to people. Decomposition into typical scenarios, understanding what kind of tooling will be covering them best in the most flexible way.
  • There are two pretty distinct scenarios for Saga: synchronous and asynchronous (which is not time bound). I think we should think hard how to make Sagas work efficiently in the synchronous scenario. This might require significant server side changes. But the payout can be pretty significant as can take on a lot of transactional use cases.

Related

cc @mnichols

@lorensr lorensr added the enhancement New feature or request label May 4, 2022
@bergundy
Copy link
Member

bergundy commented May 4, 2022

We pretty much decided we don’t want this in the sdks

@bergundy
Copy link
Member

bergundy commented May 4, 2022

I’d be open to seeing a more concrete proposal, worth thinking about.

@cretz
Copy link
Member

cretz commented May 4, 2022

Same. @Spikhalskiy has mentioned that even the rudimentary Saga implementation in Java does not have the full, proper feature set.

The three existing implementations are so simple, anyone can just collect activities and run them in parallel and/or cleanup when they are done and/or continue on error. Having a utility called "Saga" that is just a loop seems a bit silly, but if it was a more full-featured implementation it may make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants