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

Task Driver - Migrate from Entity Keyed Tasks to RequestIDs #274

Open
2 tasks
mbaker3 opened this issue Aug 26, 2023 · 0 comments
Open
2 tasks

Task Driver - Migrate from Entity Keyed Tasks to RequestIDs #274

mbaker3 opened this issue Aug 26, 2023 · 0 comments
Labels
effort-intense Sleep on it - 16 to 40 hours priority-medium Standard task, plan as you see fit. type-feature New feature or request

Comments

@mbaker3
Copy link
Member

mbaker3 commented Aug 26, 2023

Using Entities to key tasks becomes limiting when we start using Tasks Drivers in more advanced ways. Particularly if we setup circular or recursive uses of the same task driver instance.

In other words, it lets us create complex hierarchies where a task request can make its way through the same Task Driver multiple times.

Right now cancel is preventing a proper sequential unwind when the same Task Driver instance is visited multiple times in the hierarchy. All task instances that are keyed on the same entity will be cancelled at once.

What do we need?

  • A stable request ID that can be derived for an Entity
    • Manually requested IDs can be considered ephemeral while an Entity converted to an ID would be stable/permanent. Need to make sure there are no collisions.
    • Translating the Entity's Index and Version into an ID space that the ephemeral IDs don't occupy is probably the best bet.
  • Create a mechanism to map and connect a request from one ID to the next so a virtual hierarchy may be built for cancellation. Need to be able to bridge between requestID changes if it's the same conceptual intent but needs a new ID to be uniquely identified as it passes through a task driver again.

When does this come up?

  • World Unique task drivers that prevent them from being added into multiple task driver hierarchies.
  • Heavy, frequently depended on Task Drivers that developers don't want to have many instances of.

Example:
ContextFiltered -> QuestTD -> Navigate ->(new requestID) ContextFiltered -> QuestTD -> Navigate -> ...

@mbaker3 mbaker3 added effort-intense Sleep on it - 16 to 40 hours priority-medium Standard task, plan as you see fit. type-feature New feature or request labels Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort-intense Sleep on it - 16 to 40 hours priority-medium Standard task, plan as you see fit. type-feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant