Shardis 0.2.2
dotnet add package Shardis --version 0.2.2
NuGet\Install-Package Shardis -Version 0.2.2
<PackageReference Include="Shardis" Version="0.2.2" />
<PackageVersion Include="Shardis" Version="0.2.2" />
<PackageReference Include="Shardis" />
paket add Shardis --version 0.2.2
#r "nuget: Shardis, 0.2.2"
#:package Shardis@0.2.2
#addin nuget:?package=Shardis&version=0.2.2
#tool nuget:?package=Shardis&version=0.2.2
Shardis
Deterministic sharding primitives for .NET: routing, hashing, and core DI extension points used across the Shardis ecosystem.
Install
dotnet add package Shardis --version 0.1.*
When to use
- You need deterministic shard routing and stable shard identifier types.
- You want pluggable hashing and routing strategies via DI.
- You need low-level primitives for building higher-level shard-aware components.
What’s included
Shard,ShardId,ShardKey— core value types.IShardRouter<T>andDefaultShardRouter— routing abstractions and a default implementation.IShardFactory<T>— provider-agnostic factory for shard-scoped resources (DbContext, Marten sessions, Redis databases, etc.).IShardMap&InMemoryShardMap— declarative shard configuration / connection source.- Hashing abstractions:
IShardKeyHasher<TKey>,IShardRingHasher. ServiceCollectionExtensions.AddShardis()— DI wiring helpers.
Quick start
// register core sharding primitives
services.AddShardis<string>(opts =>
{
opts.ReplicationFactor = 3;
});
// resolve router + map store
var router = provider.GetRequiredService<IShardRouter<string>>();
var mapStore = provider.GetRequiredService<IShardMapStore<string>>();
Configuration / Options
ServiceCollectionExtensions.AddShardis<TK>(options => {...})— configure replication factor and defaults.
Integration notes
- Works as the core package for other
Shardis.*packages (queries, persistence providers, migration). - Link to repository: https://github.com/veggerby/shardis
Capabilities & limits
- ✅ Deterministic routing primitives and small, composable abstractions.
- ⚠️ This package exposes core primitives only — concrete providers live in other packages.
- 🧩 TFM:
net8.0,net9.0.
Samples & tests
- Samples: https://github.com/veggerby/shardis/tree/main/samples
- Tests: https://github.com/veggerby/shardis/tree/main/test/Shardis.Tests
Versioning & compatibility
- SemVer; see CHANGELOG: https://github.com/veggerby/shardis/blob/main/CHANGELOG.md
Contributing
Please read contribution guidelines: https://github.com/veggerby/shardis/blob/main/CONTRIBUTING.md
License
MIT — see https://github.com/veggerby/shardis/blob/main/LICENSE
Links
| 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)
-
net9.0
- Microsoft.Extensions.DependencyInjection (>= 9.0.8)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Shardis:
| Package | Downloads |
|---|---|
|
Shardis.Redis
Redis-backed shard map store for Shardis (atomic CAS & TryGetOrAdd) enabling deterministic key to shard assignments. |
|
|
Shardis.Query
Core query primitives (merge enumerators, LINQ MVP scaffolding) used by Shardis provider packages. |
|
|
Shardis.Marten
Marten integration for Shardis: per-shard sessions and query execution adapter. |
|
|
Shardis.Migration
Shardis key migration execution primitives (planner, executor, metrics hooks, in-memory implementations). |
|
|
Shardis.DependencyInjection
Fluent shard registration & per-shard resource factories for Shardis using Microsoft.Extensions.DependencyInjection. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.2 | 404 | 9/11/2025 |
| 0.2.2-prerelease0001 | 383 | 9/11/2025 |
| 0.2.1 | 382 | 9/10/2025 |
| 0.2.1-prerelease0001 | 382 | 9/9/2025 |
| 0.2.0 | 390 | 9/8/2025 |
| 0.1.0-prerelease0097 | 289 | 1/15/2026 |
| 0.1.0-prerelease0094 | 459 | 12/15/2025 |
| 0.1.0-prerelease0093 | 437 | 12/15/2025 |
| 0.1.0-prerelease0092 | 453 | 12/15/2025 |
| 0.1.0-prerelease0091 | 364 | 12/14/2025 |
| 0.1.0-prerelease0090 | 648 | 12/9/2025 |
| 0.1.0-prerelease0086 | 327 | 9/7/2025 |
| 0.1.0-prerelease0085 | 311 | 9/7/2025 |
| 0.1.0-prerelease0084 | 285 | 8/31/2025 |
| 0.1.0-prerelease0083 | 276 | 8/31/2025 |
| 0.1.0-prerelease0082 | 320 | 8/28/2025 |
| 0.1.0-prerelease0075 | 312 | 8/28/2025 |
| 0.1.0-prerelease0067 | 309 | 8/27/2025 |
| 0.1.0-prerelease0042 | 269 | 8/27/2025 |
| 0.1.0-prerelease0025 | 292 | 8/26/2025 |
Initial release. Full notes: https://github.com/veggerby/shardis/blob/main/CHANGELOG.md#010---2025-08-25