Nabs.Launchpad.Core.SiloClient 10.0.221

Prefix Reserved
dotnet add package Nabs.Launchpad.Core.SiloClient --version 10.0.221
                    
NuGet\Install-Package Nabs.Launchpad.Core.SiloClient -Version 10.0.221
                    
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="Nabs.Launchpad.Core.SiloClient" Version="10.0.221" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nabs.Launchpad.Core.SiloClient" Version="10.0.221" />
                    
Directory.Packages.props
<PackageReference Include="Nabs.Launchpad.Core.SiloClient" />
                    
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 Nabs.Launchpad.Core.SiloClient --version 10.0.221
                    
#r "nuget: Nabs.Launchpad.Core.SiloClient, 10.0.221"
                    
#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 Nabs.Launchpad.Core.SiloClient@10.0.221
                    
#: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=Nabs.Launchpad.Core.SiloClient&version=10.0.221
                    
Install as a Cake Addin
#tool nuget:?package=Nabs.Launchpad.Core.SiloClient&version=10.0.221
                    
Install as a Cake Tool

Nabs Launchpad Core Silo Client Library

A .NET 10 library providing Orleans client configuration for connecting to Orleans silos in the Nabs Launchpad framework. This library simplifies the setup of Orleans clients in web applications, APIs, and other services that need to communicate with Orleans grains.

Key Features

  • Simple Configuration: Easy-to-use extension methods for Orleans client setup
  • Azure Integration: Built-in support for Azure Table Storage clustering
  • Localization Support: Automatic localization configuration
  • Serialization Options: Configurable Orleans serialization settings
  • Service Discovery: Compatible with .NET Aspire service discovery

Installation

This library is part of the Nabs Launchpad framework and is typically referenced as a project dependency:

<ProjectReference Include="..\Nabs.Launchpad.Core.SiloClient\Nabs.Launchpad.Core.SiloClient.csproj" />

Dependencies

  • Microsoft.Orleans.Client: Orleans client framework
  • Microsoft.Orleans.Clustering.AzureStorage: Azure Table Storage clustering provider
  • Aspire.Azure.Data.Tables: Azure Tables integration for .NET Aspire
  • Microsoft.Extensions.Localization: Localization support
  • Nabs.Launchpad.Core.Interfaces: Shared grain interfaces and serialization options

Quick Start

Basic Configuration

Add the Orleans client to your application using the AddSiloClient extension method:

var builder = WebApplication.CreateBuilder(args);

builder.AddSiloClient(options =>
{
    options.SiloServiceId = "my-service";
});

var app = builder.Build();

Advanced Configuration

Configure Orleans serialization options for your specific grain interfaces:

builder.AddSiloClient(options =>
{
    options.SiloServiceId = "my-service";
    
    // Configure serialization for your grain interfaces
    options.OrleansSerializationOptions.ConfigureSerializationProviders = services =>
    {
        services.AddSerializer(builder =>
        {
            builder.AddJsonSerializer(isSupported: type => type.Namespace?.StartsWith("MyApp.Contracts") == true);
        });
    };
});

Configuration Options

SiloClientServicesOptions

Property Type Description Required
SiloServiceId string Unique identifier for the Orleans service Yes
OrleansSerializationOptions OrleansSerializationOptions Serialization configuration options No

OrleansSerializationOptions

Inherits from Nabs.Launchpad.Core.Interfaces.OrleansSerializationOptions and provides:

  • Serialization provider configuration
  • Type registration for Orleans serialization
  • Custom serializer setup

Integration with Other Components

This library integrates seamlessly with other Nabs Launchpad components:

  • Core.Interfaces: Provides grain interfaces and shared serialization configuration
  • Core.Silo: Server-side Orleans configuration that clients connect to
  • Core.ServiceDefaults: Common observability and service configuration
  • Core.Portal: Blazor applications that use Orleans clients to communicate with grains

Azure Configuration

The client automatically configures Azure Table Storage for Orleans clustering. Ensure your application has access to an Azure Storage account with the connection string configured under the key "clustering".

Connection String Configuration

Configure your Azure Storage connection string in your application settings:

{
  "ConnectionStrings": {
    "clustering": "DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;EndpointSuffix=core.windows.net"
  }
}

Usage Examples

In a Blazor Application

// Program.cs
var builder = WebApplication.CreateBuilder(args);

builder.AddPortalServices(options => 
{
    options.PortalName = "MyPortal";
});

builder.AddSiloClient(options =>
{
    options.SiloServiceId = "launchpad-service";
});

var app = builder.Build();
app.UsePortalServices<App>();
app.Run();

In a Web API

// Program.cs
var builder = WebApplication.CreateBuilder(args);

builder.Services.AddControllers();

builder.AddSiloClient(options =>
{
    options.SiloServiceId = "api-service";
});

var app = builder.Build();
app.MapControllers();
app.Run();

Using Orleans Grains in Controllers

[ApiController]
[Route("api/[controller]")]
public class UsersController : ControllerBase
{
    private readonly IClusterClient _clusterClient;

    public UsersController(IClusterClient clusterClient)
    {
        _clusterClient = clusterClient;
    }

    [HttpGet("{id}")]
    public async Task<IActionResult> GetUser(string id)
    {
        var userGrain = _clusterClient.GetGrain<IUserGrain>(id);
        var user = await userGrain.GetUserAsync();
        return Ok(user);
    }
}

Service Registration

The AddSiloClient method registers the following services:

  • IClusterClient: Orleans cluster client for grain communication
  • Azure Table Service Client: For Orleans clustering (keyed as "clustering")
  • Localization Services: For multi-language support

Best Practices

  1. Service ID Consistency: Use the same SiloServiceId for both client and silo configurations
  2. Connection Management: The Orleans client manages connections automatically - no need for manual connection handling
  3. Grain Interface Versioning: Use proper versioning strategies for grain interfaces to maintain compatibility
  4. Error Handling: Implement proper error handling for grain calls, including timeout and unavailability scenarios
  5. Resource Cleanup: The Orleans client will be disposed automatically by the DI container

Testing

For testing scenarios, use the Nabs.Launchpad.Core.Testing.Silos library which provides:

  • In-memory Orleans test clusters
  • Mock grain implementations
  • Integration testing utilities
// In test projects
[Fact]
public async Task Should_Communicate_With_Test_Silo()
{
    using var testCluster = new TestClusterBuilder()
        .AddSiloBuilderConfigurator<TestSiloConfigurator>()
        .Build();
    
    await testCluster.DeployAsync();
    
    var grain = testCluster.Client.GetGrain<ITestGrain>(0);
    var result = await grain.DoSomethingAsync();
    
    Assert.NotNull(result);
}

Troubleshooting

Common Issues

  1. Connection Failures: Verify Azure Storage connection string and network connectivity
  2. Serialization Errors: Ensure all grain interface types are properly configured for serialization
  3. Service ID Mismatch: Verify client and silo use the same service ID
  4. Missing Dependencies: Ensure all required NuGet packages are installed

Logging

Enable Orleans client logging to troubleshoot connection issues:

builder.Logging.AddFilter("Orleans", LogLevel.Debug);

Contributing

This library follows the Nabs Launchpad coding standards:

  • Use C# 13 features and latest language constructs
  • Follow nullable reference types conventions (is null, is not null)
  • Implement proper async/await patterns
  • Include comprehensive unit tests
  • Use file-scoped namespace declarations

License

Copyright � Net Advantage Business Solutions

Product Compatible and additional computed target framework versions.
.NET 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

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
10.0.221 32 2/3/2026
10.0.220 52 1/14/2026
10.0.219 97 1/5/2026
10.0.218 91 1/4/2026
10.0.217 105 1/4/2026 10.0.217 is deprecated because it is no longer maintained.
10.0.216 105 1/4/2026 10.0.216 is deprecated because it is no longer maintained.
10.0.215 109 1/4/2026 10.0.215 is deprecated because it is no longer maintained.
10.0.214 164 1/1/2026 10.0.214 is deprecated because it is no longer maintained.
10.0.213 109 1/1/2026 10.0.213 is deprecated because it is no longer maintained.
10.0.212 108 1/1/2026 10.0.212 is deprecated because it is no longer maintained.
10.0.211 111 12/31/2025 10.0.211 is deprecated because it is no longer maintained.
10.0.210 113 12/30/2025 10.0.210 is deprecated because it is no longer maintained.
10.0.209 106 12/30/2025 10.0.209 is deprecated because it is no longer maintained.
10.0.208 105 12/30/2025 10.0.208 is deprecated because it is no longer maintained.
10.0.207 109 12/29/2025 10.0.207 is deprecated because it is no longer maintained.
10.0.206 111 12/29/2025 10.0.206 is deprecated because it is no longer maintained.
10.0.205 207 12/24/2025 10.0.205 is deprecated because it is no longer maintained.
10.0.204 191 12/21/2025 10.0.204 is deprecated because it is no longer maintained.
10.0.203 290 12/18/2025 10.0.203 is deprecated because it is no longer maintained.
10.0.202 289 12/17/2025 10.0.202 is deprecated because it is no longer maintained.
10.0.200 303 12/17/2025 10.0.200 is deprecated because it is no longer maintained.
10.0.199 446 12/10/2025 10.0.199 is deprecated because it is no longer maintained.
10.0.197 189 12/5/2025 10.0.197 is deprecated because it is no longer maintained.
10.0.196 697 12/3/2025 10.0.196 is deprecated because it is no longer maintained.
10.0.195 699 12/3/2025 10.0.195 is deprecated because it is no longer maintained.
10.0.194 688 12/3/2025 10.0.194 is deprecated because it is no longer maintained.
10.0.193 689 12/2/2025 10.0.193 is deprecated because it is no longer maintained.
10.0.192 195 11/28/2025 10.0.192 is deprecated because it is no longer maintained.
10.0.190 212 11/27/2025 10.0.190 is deprecated because it is no longer maintained.
10.0.189 190 11/23/2025 10.0.189 is deprecated because it is no longer maintained.
10.0.187 187 11/23/2025 10.0.187 is deprecated because it is no longer maintained.
10.0.186 179 11/23/2025 10.0.186 is deprecated because it is no longer maintained.
10.0.184 419 11/20/2025 10.0.184 is deprecated because it is no longer maintained.
10.0.181-rc3 298 11/11/2025 10.0.181-rc3 is deprecated because it is no longer maintained.
10.0.180 313 11/11/2025 10.0.180 is deprecated because it is no longer maintained.
10.0.179-rc2 262 11/11/2025 10.0.179-rc2 is deprecated because it is no longer maintained.
10.0.178-rc2 224 11/10/2025 10.0.178-rc2 is deprecated because it is no longer maintained.
10.0.177-rc2 206 11/10/2025 10.0.177-rc2 is deprecated because it is no longer maintained.
10.0.176-rc2 179 11/6/2025 10.0.176-rc2 is deprecated because it is no longer maintained.
10.0.175-rc2 174 11/6/2025 10.0.175-rc2 is deprecated because it is no longer maintained.
10.0.174-rc2 182 11/5/2025 10.0.174-rc2 is deprecated because it is no longer maintained.
10.0.173-rc2 175 11/3/2025 10.0.173-rc2 is deprecated because it is no longer maintained.
10.0.172-rc2 115 11/2/2025 10.0.172-rc2 is deprecated because it is no longer maintained.
10.0.170-rc2 111 11/1/2025 10.0.170-rc2 is deprecated because it is no longer maintained.
10.0.169-rc2 100 11/1/2025 10.0.169-rc2 is deprecated because it is no longer maintained.
10.0.168-rc2 103 10/31/2025 10.0.168-rc2 is deprecated because it is no longer maintained.
10.0.166-rc2 106 10/31/2025 10.0.166-rc2 is deprecated because it is no longer maintained.
10.0.164-rc2 176 10/28/2025 10.0.164-rc2 is deprecated because it is no longer maintained.
10.0.162-rc2 171 10/24/2025 10.0.162-rc2 is deprecated because it is no longer maintained.
9.0.151 147 10/17/2025 9.0.151 is deprecated because it is no longer maintained.
9.0.150 217 9/10/2025 9.0.150 is deprecated because it is no longer maintained.
9.0.146 151 8/15/2025 9.0.146 is deprecated because it is no longer maintained.
9.0.145 210 8/11/2025 9.0.145 is deprecated because it is no longer maintained.
9.0.144 226 8/8/2025 9.0.144 is deprecated because it is no longer maintained.
9.0.137 190 7/29/2025 9.0.137 is deprecated because it is no longer maintained.
9.0.136 173 7/29/2025 9.0.136 is deprecated because it is no longer maintained.
9.0.135 209 7/28/2025 9.0.135 is deprecated because it is no longer maintained.
9.0.134 220 7/9/2025 9.0.134 is deprecated because it is no longer maintained.
9.0.133 210 7/9/2025 9.0.133 is deprecated because it is no longer maintained.
9.0.132 225 7/9/2025 9.0.132 is deprecated because it is no longer maintained.
9.0.131 222 7/9/2025 9.0.131 is deprecated because it is no longer maintained.
9.0.130 210 7/7/2025 9.0.130 is deprecated because it is no longer maintained.