Skip to content

Deterministic SagaID generation to allow using only ID based lookups and the ID index only #802

@danielmarbach

Description

@danielmarbach

Describe the suggested improvement

Is your improvement related to a problem? Please describe.

The currently released versions of MongoDB use the default SagaIdGenerator from Core, which internally creates a comb GUID. Some persisters have moved toward overriding the saga ID generator to create a deterministic ID based on the saga entity type, the correlation property name, and the correlation property value.

This approach ensures that all saga lookups can be performed directly using the Saga ID, eliminating the need for additional indexes or member caches.

Using deterministic IDs can also improve lookup efficiency, as ID-based queries are generally fast and cost-effective. In addition, it may simplify sharding strategies by leveraging the deterministic ID.

Describe the suggested solution

Implement a SagaIdGenerator similar to the approaches used by CosmosDB, DynamoDB, or Azure Table. Provide backward compatibility for an interim period and gradually phase out the compatibility modes.

Describe alternatives you've considered

  • Leaving it as is

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions