BeyondImmersion.Bannou.AssetLoader.Server 2.0.0

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

Bannou Asset Loader Server

Mesh-based asset source for game servers and backend services.

Overview

This package provides BannouMeshAssetSource, an IAssetSource implementation that uses the generated IAssetClient for URL resolution via the service mesh.

Important: Most server use cases don't need this package. If you only need:

  • Asset metadata queries
  • Download URLs to pass to clients/workers
  • Bundle validation

Then use the generated IAssetClient directly (see "Direct API Access" below).

Use this package when your server needs to actually load bundle contents into memory.

Installation

dotnet add package BeyondImmersion.Bannou.AssetLoader.Server

When to Use This Package

Use Case This Package? Alternative
Query asset metadata No Direct IAssetClient
Get download URLs No Direct IAssetClient
Validate uploads No Direct IAssetClient
Server-side physics/collision Yes -
NPC AI reading asset data Yes -
Asset processing pipelines Maybe Direct MinIO access

Direct API Access (Most Common)

For metadata and URL queries, use the generated client directly:

public class AssetQueryService
{
    private readonly IAssetClient _assetClient;

    public AssetQueryService(IAssetClient assetClient)
    {
        _assetClient = assetClient;
    }

    public async Task<AssetWithDownloadUrl> GetAssetInfoAsync(string assetId)
    {
        var request = new GetAssetRequest { AssetId = assetId, Version = "latest" };
        return await _assetClient.GetAssetAsync(request);
    }

    public async Task<string> GetBundleUrlAsync(string bundleId)
    {
        var request = new GetBundleRequest { BundleId = bundleId };
        var response = await _assetClient.GetBundleAsync(request);
        return response.DownloadUrl;  // Pre-signed URL
    }
}

Full Asset Loading (When Needed)

When your server needs actual asset bytes:

With Dependency Injection

// Service registration
services.AddSingleton<IAssetSource>(sp =>
{
    var assetClient = sp.GetRequiredService<IAssetClient>();
    var logger = sp.GetService<ILogger<BannouMeshAssetSource>>();
    return new BannouMeshAssetSource(assetClient, Realm.Arcadia, logger);
});

// Optional: memory cache for containers (or FileAssetCache for VMs)
services.AddSingleton<IAssetCache>(sp =>
    new MemoryAssetCache(maxSizeBytes: 256 * 1024 * 1024));

services.AddSingleton<AssetLoader>();

Direct Usage

using BeyondImmersion.Bannou.AssetLoader;
using BeyondImmersion.Bannou.AssetLoader.Server;
using BeyondImmersion.Bannou.AssetLoader.Cache;

// Create source from injected client
var source = new BannouMeshAssetSource(assetClient, Realm.Arcadia);

// Optional cache
var cache = new MemoryAssetCache(maxSizeBytes: 256 * 1024 * 1024);

// Create loader
var loader = new AssetLoader(source, cache);

// Load assets
var result = await loader.EnsureAssetsAvailableAsync(new[]
{
    "polygon-adventure/level-1",
    "polygon-adventure/enemies"
});

// Get raw bytes
var levelData = await loader.GetAssetBytesAsync("polygon-adventure/level-1");

Caching Recommendations

Environment Cache Type Reason
Kubernetes/Docker MemoryAssetCache Ephemeral filesystem
VMs with disk FileAssetCache Survives restarts
Serverless None Minimal lifetime
Processing workers MemoryAssetCache Process then discard

Features

Feature Description
Mesh-based resolution Uses service-to-service mesh for URL resolution
No auth overhead Service identity handles authentication automatically
Metabundle support Automatically prefers metabundles when available
Pre-signed URLs Downloads use pre-signed URLs for direct storage access

Comparison with Client SDK

Feature Asset Loader Client Asset Loader Server
Transport WebSocket HTTP mesh
Authentication User credentials Service identity
Use case Game clients, dev tools Game servers, backend
Connection Long-lived Per-request
Facade AssetManager None (use AssetLoader directly)

Further Reading

License

MIT

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1-preview.manual... 43 1/17/2026
2.0.1-preview.11 39 1/29/2026
2.0.1-preview.10 42 1/22/2026
2.0.1-preview.9 39 1/19/2026
2.0.0 89 1/17/2026
1.0.0 89 1/16/2026
0.1.0-preview.manual... 42 1/16/2026