Sekiban.Dcb.BlobStorage.AzureStorage 10.23.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Sekiban.Dcb.BlobStorage.AzureStorage --version 10.23.1
                    
NuGet\Install-Package Sekiban.Dcb.BlobStorage.AzureStorage -Version 10.23.1
                    
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="Sekiban.Dcb.BlobStorage.AzureStorage" Version="10.23.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sekiban.Dcb.BlobStorage.AzureStorage" Version="10.23.1" />
                    
Directory.Packages.props
<PackageReference Include="Sekiban.Dcb.BlobStorage.AzureStorage" />
                    
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 Sekiban.Dcb.BlobStorage.AzureStorage --version 10.23.1
                    
#r "nuget: Sekiban.Dcb.BlobStorage.AzureStorage, 10.23.1"
                    
#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 Sekiban.Dcb.BlobStorage.AzureStorage@10.23.1
                    
#: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=Sekiban.Dcb.BlobStorage.AzureStorage&version=10.23.1
                    
Install as a Cake Addin
#tool nuget:?package=Sekiban.Dcb.BlobStorage.AzureStorage&version=10.23.1
                    
Install as a Cake Tool

Sekiban.Dcb.BlobStorage.AzureStorage

Azure Blob Storage integration for Sekiban Dynamic Consistency Boundary (DCB) framework.

📚 Full Documentation: sekiban.dev

Sekiban Implementations

Implementation Status
Sekiban DCB ✅ Recommended
Sekiban.Pure ⚠️ Deprecated

Overview

This package provides Azure Blob Storage-based snapshot offloading for Sekiban DCB MultiProjection. It enables efficient storage of large projection state snapshots in Azure Blob Storage, reducing memory pressure and improving scalability for projections with significant state.

Features

  • Binary Snapshot Storage: Efficiently stores projection snapshots as binary data in Azure Blob Storage
  • Automatic Container Management: Automatically creates blob containers if they don't exist
  • Flexible Configuration: Supports both connection string and BlobServiceClient-based initialization
  • Prefix Support: Organize snapshots with custom prefixes for multi-tenant scenarios

Installation

dotnet add package Sekiban.Dcb.BlobStorage.AzureStorage --version 1.0.2-preview03

Usage

Basic Setup with Connection String

services.AddSingleton<IBlobStorageSnapshotAccessor>(sp =>
{
    var connectionString = configuration["AzureStorage:ConnectionString"];
    return new AzureBlobStorageSnapshotAccessor(
        connectionString,
        "multiprojection-snapshots", // Container name
        "production"                  // Optional prefix
    );
});
services.AddSingleton<IBlobStorageSnapshotAccessor>(sp =>
{
    var blobServiceClient = sp.GetRequiredService<BlobServiceClient>();
    return new AzureBlobStorageSnapshotAccessor(
        blobServiceClient,
        "multiprojection-snapshots"  // Container name
    );
});

With Aspire and Keyed Services

services.AddSingleton<IBlobStorageSnapshotAccessor>(sp =>
{
    // Use Aspire-configured BlobServiceClient
    var blobServiceClient = sp.GetRequiredKeyedService<BlobServiceClient>("MultiProjectionOffload");
    return new AzureBlobStorageSnapshotAccessor(
        blobServiceClient,
        "multiprojection-snapshots"
    );
});

Integration with Sekiban DCB Orleans

This package is designed to work seamlessly with Sekiban.Dcb.Orleans for snapshot offloading in MultiProjection grains:

// In Orleans silo configuration
siloBuilder.ConfigureServices(services =>
{
    // Register the Azure Blob Storage snapshot accessor
    services.AddSingleton<IBlobStorageSnapshotAccessor>(sp =>
    {
        var blobServiceClient = sp.GetRequiredKeyedService<BlobServiceClient>("MultiProjectionOffload");
        return new AzureBlobStorageSnapshotAccessor(blobServiceClient, "snapshots");
    });
});

Configuration Options

Container Names

  • Default: multiprojection-snapshots
  • Customize based on your application needs
  • Containers are created automatically if they don't exist

Prefixes

  • Use prefixes to organize snapshots by environment, tenant, or feature
  • Example: production/, tenant-123/, feature-x/

From DCB 10.23.0, the configured prefix applies to all newly written snapshot blobs. Seekable writes use {prefix}/{projector}/{sha256}.bin (row snapshots include the version in {projector}); null or empty prefixes keep the existing keys. Only trailing / characters are trimmed from the prefix. Non-seekable writes keep their existing prefixed GUID keys.

Deterministic keys from seekable writes since df24f127 were un-prefixed. Those blobs stay at their old keys and remain readable without migration; non-seekable writes and writes before that commit could already be prefixed. Identical content is stored once more under the prefix after upgrading. Any listing or deletion by prefix must also account for old un-prefixed keys using OffloadKeyEnumerator and the referenced-key safety rules. When snapshot and cold-event storage are registered from the same options, they share the configured prefix. Cold-event paths are relative to their storage root, which can include a format scope in addition to the prefix; they are not always directly under {prefix}/control/... or {prefix}/segments/....

Keep prefixes short, with no leading slash and forward slashes only; provider naming rules still apply. Prefixed deterministic keys over 512 characters throw InvalidOperationException before upload. A prefix of at most 57 characters keeps every projector name/version within PostgreSQL's valid bounds (256/128 characters) inside that limit. Null or empty prefixes introduce no length check.

Downloaded snapshots are retained in localCacheDirectory (default <temp>/sekiban-snapshot-cache); cache hits bypass storage, missing cache files are downloaded again, and only temporary download files are cleaned up, so size or clear the directory as distinct blobs accumulate. See snapshot pruning and local read cache.

Requirements

  • .NET 9.0 or later
  • Azure Storage Account (or Azurite for local development)
  • Sekiban.Dcb package

Dependencies

  • Azure.Storage.Blobs (12.22.2)
  • Sekiban.Dcb (1.0.2-preview03)

License

Apache-2.0

Support

For issues, questions, or contributions, please visit: https://github.com/J-Tech-Japan/Sekiban

Product Compatible and additional computed target framework versions.
.NET 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 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on Sekiban.Dcb.BlobStorage.AzureStorage:

Package Downloads
Sekiban.Dcb.ColdStorage

Sekiban DCB cold object storage implementations and factory

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.23.2 105 10/8/2026
10.23.1 125 10/7/2026
10.23.0 133 10/6/2026
10.22.0 570 9/16/2026
10.21.0 435 9/11/2026
10.20.0 203 9/2/2026
10.19.0 554 8/23/2026
10.18.0 141 8/22/2026
10.17.0 181 8/18/2026
10.16.0 186 8/17/2026
10.15.0 155 8/16/2026
10.14.1 136 8/15/2026
10.14.0 831 8/14/2026
10.13.0 152 8/11/2026
10.12.0 147 8/11/2026
10.11.0 142 8/11/2026
10.10.0 135 8/8/2026
10.9.0 131 8/7/2026
10.8.2 363 8/3/2026
10.8.1 144 7/30/2026
Loading failed