FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Integrate TaskManager into schema migration demo

Open scottn12 opened this issue 2 years ago • 1 comments

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

AB#324

scottn12 avatar Sep 13 '22 17:09 scottn12

Some general thoughts:

  1. 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.
  2. 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.
  3. 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.

ssimic2 avatar Oct 14 '22 17:10 ssimic2