Shardis 0.2.2

dotnet add package Shardis --version 0.2.2
                    
NuGet\Install-Package Shardis -Version 0.2.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Shardis" Version="0.2.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Shardis" Version="0.2.2" />
                    
Directory.Packages.props
<PackageReference Include="Shardis" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Shardis --version 0.2.2
                    
#r "nuget: Shardis, 0.2.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Shardis@0.2.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Shardis&version=0.2.2
                    
Install as a Cake Addin
#tool nuget:?package=Shardis&version=0.2.2
                    
Install as a Cake Tool

Shardis

Deterministic sharding primitives for .NET: routing, hashing, and core DI extension points used across the Shardis ecosystem.

NuGet Downloads License

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> and DefaultShardRouter — 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

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

Versioning & compatibility

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

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed