Shardis.Migration
0.2.2
dotnet add package Shardis.Migration --version 0.2.2
NuGet\Install-Package Shardis.Migration -Version 0.2.2
<PackageReference Include="Shardis.Migration" Version="0.2.2" />
<PackageVersion Include="Shardis.Migration" Version="0.2.2" />
<PackageReference Include="Shardis.Migration" />
paket add Shardis.Migration --version 0.2.2
#r "nuget: Shardis.Migration, 0.2.2"
#:package Shardis.Migration@0.2.2
#addin nuget:?package=Shardis.Migration&version=0.2.2
#tool nuget:?package=Shardis.Migration&version=0.2.2
Shardis.Migration
Key migration execution primitives for Shardis. This package contains the executor, planner abstractions, checkpoint store contracts, and reference in-memory implementations used for tests and prototypes.
Install
dotnet add package Shardis.Migration --version 0.2.*
When to use
- Deterministic, idempotent key migration (copy → verify → swap) between shard topologies.
- Need pluggable verification (checksum, rowversion via provider) & projection abstractions.
- Require checkpointing & resume support during long-running migrations.
What’s included
- Planner models:
MigrationPlan<TKey>,KeyMove<TKey>,MigrationCheckpoint<TKey>. ShardMigrationExecutor<TKey>— orchestrates copy → verify → swap with checkpoint persistence & metrics hooks.- Abstractions:
IShardDataMover<TKey>,IVerificationStrategy<TKey>,IShardMigrationCheckpointStore<TKey>,IShardMapSwapper<TKey>,IShardMigrationMetrics. - Duration instrumentation: executor records per-key copy / verify latency, per-swap-batch latency, and total elapsed (extend
IShardMigrationMetricsfor export). - Reference in-memory checkpoint store & test doubles (see tests) for prototyping.
- Default stable canonicalization + hashing abstractions (
IStableCanonicalizer,IStableHasher) consumed by checksum strategies. Seedocs/canonicalization.md.
Quick start
// register migration runtime + (optionally) provider-specific support (e.g. EF / Marten)
services.AddShardisMigration<string>(); // core abstractions & executor
var planner = services.GetRequiredService<IShardMigrationPlanner<string>>(); // if planner registered
var executor = services.GetRequiredService<ShardMigrationExecutor<string>>();
var plan = await planner.CreatePlanAsync(fromSnapshot, toSnapshot, CancellationToken.None);
var result = await executor.ExecuteAsync(plan, progress: null, CancellationToken.None);
Integration notes
- For long migrations use a durable checkpoint store implementation (custom). An experimental SQL-backed implementation lives in
Shardis.Migration.Sql(preview; API stability not yet guaranteed). - Verification strategy can be swapped (rowversion, checksum) by provider DI extensions before execution.
- Projection strategy (
IEntityProjectionStrategy) allows shape normalization (exclude volatile fields) — ensure determinism.
Samples & tests
- Docs: https://github.com/veggerby/shardis/blob/main/docs/migration-usage.md
- Canonicalization: https://github.com/veggerby/shardis/blob/main/docs/canonicalization.md
- Sample end-to-end scenarios (retry, cancellation, resume, large plan):
samples/Shardis.Migration.Sample. - ADR: https://github.com/veggerby/shardis/blob/main/docs/adr/0004-segmented-planner.md
- Tests: https://github.com/veggerby/shardis/tree/main/test/Shardis.Migration.Tests
Contributing
- PRs that add durable checkpoint store implementations or improve executor observability are welcome. See https://github.com/veggerby/shardis/blob/main/CONTRIBUTING.md
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.DependencyInjection (>= 9.0.8)
- Shardis (>= 0.2.2)
-
net9.0
- Microsoft.Extensions.DependencyInjection (>= 9.0.8)
- Shardis (>= 0.2.2)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Shardis.Migration:
| Package | Downloads |
|---|---|
|
Shardis.Migration.Marten
Marten migration provider for Shardis (document data mover + checksum verification). |
|
|
Shardis.Migration.Sql
Durable SQL-backed components (checkpoint store, shard map + history) for Shardis migration. |
|
|
Shardis.Migration.EntityFrameworkCore
Entity Framework Core migration provider for Shardis (data mover + verification strategies). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.2 | 249 | 9/11/2025 |
| 0.2.2-prerelease0001 | 249 | 9/11/2025 |
| 0.2.1 | 238 | 9/10/2025 |
| 0.2.1-prerelease0001 | 240 | 9/9/2025 |
| 0.2.0 | 221 | 9/8/2025 |
| 0.1.0-prerelease0097 | 129 | 1/15/2026 |
| 0.1.0-prerelease0094 | 303 | 12/15/2025 |
| 0.1.0-prerelease0093 | 280 | 12/15/2025 |
| 0.1.0-prerelease0092 | 290 | 12/15/2025 |
| 0.1.0-prerelease0091 | 217 | 12/14/2025 |
| 0.1.0-prerelease0090 | 494 | 12/9/2025 |
| 0.1.0-prerelease0086 | 207 | 9/7/2025 |
| 0.1.0-prerelease0085 | 215 | 9/7/2025 |
| 0.1.0-prerelease0084 | 209 | 8/31/2025 |
| 0.1.0-prerelease0083 | 204 | 8/31/2025 |
| 0.1.0-prerelease0082 | 249 | 8/28/2025 |
| 0.1.0-prerelease0075 | 261 | 8/28/2025 |
| 0.1.0-prerelease0067 | 253 | 8/27/2025 |
Initial release. Full notes: https://github.com/veggerby/shardis/blob/main/CHANGELOG.md#010---2025-08-25