FluidFramework
FluidFramework copied to clipboard
Integrate TaskManager into schema migration demo
Description
This PR integrates TaskManager
into the migration flow of the schema upgrade demo. Previously, all clients would race to migrate the container while checking to see if another client has completed it first. This PR changes that by only allowing one client to execute the migration with TaskManager
.
Reviewer Guidance
Would appreciate feedback on:
- Implementation details for this specific demo.
- General thoughts on
TaskManager
APIs and coding patterns.
Other information or known dependencies
Some general thoughts:
- It would be nice if we had "migration" package that essentially hides all this complexity of variations and unhappy paths that can play out with clear success/fail outcomes.
- It would be nice to understand use cases out migration should support. Then it may be easier to reason around success/fail outcomes. For example if we have use case scenario where user wants migration to occur only if certian condition was met (say all clients can upgrade), we could reason what building blocks we need in place.
- From perspective of TaskManager it would be nice to abstract some helper functions that know how to handle various error cases as they execute async block.