Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Saga Simplification for 2.0 #734

Closed
6 tasks
jeremydmiller opened this issue Jun 18, 2022 · 1 comment
Closed
6 tasks

Saga Simplification for 2.0 #734

jeremydmiller opened this issue Jun 18, 2022 · 1 comment
Milestone

Comments

@jeremydmiller
Copy link
Member

I'll be straight up here, I don't like Jasper 1.0's stateful saga approach as well as older competitors, so let's make it better!!!

Ideas:

  • Public, concrete classes suffixed with Saga will be the message handlers
  • The Saga types will be persisted
  • Can have Handle() or Consume() methods
  • Static Create() : [SagaType] methods or a constructor for a single argument will be considered to be the initiator methods
  • If using a ctor for the initiator, will need other constructors
  • Saga persistence providers should use MethodCall as much as possible, or derivatives thereof
  • Assume that the Saga id can come off of command messages either through SagaId members, [SagaName]Id, or a member marked as [SagaIdentity]. Keep the fallback to using the saga id header though

Convert Test Harnesses First

For each copy/pasted version of SagaTestHarness

  • Copy the Handle() methods on the TSagaHandler to the TSagaState
  • Eliminate the TSagaHandler type and type argument

More general tasks:

  • Delete the StatefulSagaOf type and all its dependencies
  • New convention to discover handlers suffixed as [SomethingSaga]
  • Modify Marten middleware to load the actual workflow state as the handler
  • Modify the EF Core middleware to load the actual workflow state as the handler

More analysis necessary....

  • How do we mark sagas as deleted? COULD return a command that would direct Jasper to do something next
  • How do we mark sagas for archival?
@jeremydmiller jeremydmiller added this to the 2.0 milestone Jun 18, 2022
@jeremydmiller
Copy link
Member Author

Came out a little different in tasks of course

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant