Nabs.Launchpad.Core.Silo
10.0.228
Prefix Reserved
See the version list below for details.
dotnet add package Nabs.Launchpad.Core.Silo --version 10.0.228
NuGet\Install-Package Nabs.Launchpad.Core.Silo -Version 10.0.228
<PackageReference Include="Nabs.Launchpad.Core.Silo" Version="10.0.228" />
<PackageVersion Include="Nabs.Launchpad.Core.Silo" Version="10.0.228" />
<PackageReference Include="Nabs.Launchpad.Core.Silo" />
paket add Nabs.Launchpad.Core.Silo --version 10.0.228
#r "nuget: Nabs.Launchpad.Core.Silo, 10.0.228"
#:package Nabs.Launchpad.Core.Silo@10.0.228
#addin nuget:?package=Nabs.Launchpad.Core.Silo&version=10.0.228
#tool nuget:?package=Nabs.Launchpad.Core.Silo&version=10.0.228
Nabs Launchpad Core Silo Library
A .NET 10 library providing Orleans silo hosting capabilities and configuration for distributed computing in the Nabs Launchpad framework.
Overview
The Nabs.Launchpad.Core.Silo library enables hosting Microsoft Orleans silos with pre-configured clustering, persistence, and authorization features. Orleans is a cross-platform framework for building robust, scalable distributed applications using the Virtual Actor Model.
Key Features
- Orleans Silo Hosting: Complete silo configuration with Azure Table clustering and blob storage persistence
- Authorization Framework: Built-in grain call authorization with anonymous method support
- Orleans Dashboard: Integrated dashboard for monitoring grain activity and cluster status
- Azure Integration: Configured for Azure Table Storage clustering and Azure Blob Storage persistence
- Entity Framework Integration: SQL Server database connectivity through Aspire
- Service Defaults: Integration with Nabs Launchpad service configuration standards
Key Components
ProjectExtensions
The main entry point for configuring Orleans silo services:
public static IHostApplicationBuilder AddSiloServices(
this IHostApplicationBuilder builder,
Action<SiloServicesOptions> siloServicesOptionsSetup)
SiloServicesOptions
Configuration options for the Orleans silo:
public class SiloServicesOptions
{
// Authorization filter configuration
public List<string> AuthorizationFilterTypePrefixes { get; set; } = [];
// Orleans cluster configuration
public string ClusterId { get; set; } = "default";
public string ServiceId { get; set; } = string.Empty;
// Serialization options
public OrleansSerializationOptions SerializationOptions { get; } = new();
}
AuthorisationFilter
Grain call authorization filter that:
- Validates user context for protected grain methods
- Supports anonymous methods via
[Anonymous]attribute - Applies to grain interfaces matching configured type prefixes
AnonymousAttribute
Attribute to mark grain methods as not requiring authorization:
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public class AnonymousAttribute : Attribute
Dependencies
- Microsoft.Orleans.Server: Core Orleans silo functionality
- Microsoft.Orleans.Clustering.AzureStorage: Azure Table Storage clustering
- Microsoft.Orleans.Persistence.AzureStorage: Azure Blob Storage persistence
- OrleansDashboard: Monitoring and administration dashboard
- Aspire.Azure.Data.Tables & Aspire.Azure.Storage.Blobs: Azure service integrations
- Ardalis.Result & Ardalis.Result.FluentValidation: Result pattern support
- Entity Framework Core SQL Server: Database connectivity
Usage Example
Configuring the Silo
var builder = Host.CreateApplicationBuilder(args);
builder.AddSiloServices(options =>
{
options.ClusterId = "my-cluster";
options.ServiceId = "my-service";
options.AuthorizationFilterTypePrefixes.Add("MyApp.Grains.Interfaces");
options.SerializationOptions.SupportedPrefixes.Add("MyApp.Models");
});
var app = builder.Build();
await app.RunAsync();
Creating Protected Grains
public interface IUserGrain : IGrainWithStringKey
{
// Requires authorization
Task<User> GetUserAsync();
// Anonymous access allowed
[Anonymous]
Task<bool> CheckHealthAsync();
}
public class UserGrain : Grain, IUserGrain
{
public Task<User> GetUserAsync()
{
// This method requires a valid UserContext in RequestContext
var userContext = RequestContext.Get("UserContext");
// Implementation...
}
public Task<bool> CheckHealthAsync()
{
// This method allows anonymous access
return Task.FromResult(true);
}
}
Setting User Context (in Gateway/API)
// Before calling grains, set the user context
RequestContext.Set("UserContext", currentUserContext);
var grain = grainFactory.GetGrain<IUserGrain>(userId);
var user = await grain.GetUserAsync();
Authorization Flow
- Grain Call Initiated: Client calls a grain method
- Filter Evaluation:
AuthorisationFilterchecks if the grain interface matches configured prefixes - Anonymous Check: Verifies if the method has
[Anonymous]attribute - User Context Validation: Ensures
UserContextexists inRequestContextfor protected methods - Method Execution: Proceeds with grain method execution if authorized
Integration with Launchpad
This library integrates with other Nabs Launchpad components:
- Core.Interfaces: Provides grain interfaces and shared contracts
- Core.Context: Database context integration for grain persistence
- Core.ServiceDefaults: Common service configuration and observability
- Core.SiloClient: Client-side Orleans configuration for connecting to silos
Azure Configuration
The silo expects the following Azure services to be configured:
- Azure Table Storage: For Orleans clustering (connection key: "clustering")
- Azure Blob Storage: For grain state persistence (connection key: "grain-state")
- SQL Server: For application data persistence
Monitoring
The Orleans Dashboard is automatically configured and available for monitoring:
- Grain activation statistics
- Cluster membership status
- Performance metrics
- Call tracing
Testing
The library includes comprehensive unit tests in the Launchpad.Core.Silo.UnitTests project. For integration testing, use the Nabs.Launchpad.Core.Testing.Silos library which provides test cluster capabilities.
Best Practices
- Grain Design: Follow Orleans best practices for grain state management
- Authorization: Use type prefixes to apply authorization selectively
- Anonymous Methods: Mark health checks and public APIs with
[Anonymous] - Error Handling: Implement proper error handling in grain methods
- Resource Management: Use proper disposal patterns for long-running operations
Contributing
This library follows the Nabs Launchpad coding standards:
- Use C# 13 features and latest language constructs
- Follow nullable reference types conventions
- Implement proper async/await patterns
- Include comprehensive unit tests
License
Copyright � Net Advantage Business Solutions
| Product | Versions 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. |
-
net10.0
- Ardalis.Result (>= 10.1.0)
- Ardalis.Result.FluentValidation (>= 10.1.0)
- Aspire.Azure.Data.Tables (>= 13.3.5)
- Aspire.Azure.Storage.Blobs (>= 13.3.5)
- Aspire.Microsoft.Data.SqlClient (>= 13.3.5)
- Aspire.Microsoft.EntityFrameworkCore.SqlServer (>= 13.3.5)
- Microsoft.Orleans.Clustering.AzureStorage (>= 10.1.0)
- Microsoft.Orleans.Persistence.AzureStorage (>= 10.1.0)
- Microsoft.Orleans.Server (>= 10.1.0)
- Nabs.Launchpad.Core.Context (>= 10.0.228)
- Nabs.Launchpad.Core.Interfaces (>= 10.0.228)
- Nabs.Launchpad.Core.ServiceDefaults (>= 10.0.228)
- OrleansDashboard (>= 8.2.0)
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.234 | 0 | 5/31/2026 | |
| 10.0.233 | 33 | 5/31/2026 | |
| 10.0.232 | 48 | 5/30/2026 | |
| 10.0.230 | 43 | 5/30/2026 | |
| 10.0.229 | 38 | 5/30/2026 | |
| 10.0.228 | 41 | 5/30/2026 | |
| 10.0.226 | 111 | 4/26/2026 | |
| 10.0.221 | 72 | 2/3/2026 | |
| 10.0.220 | 82 | 1/14/2026 | |
| 10.0.219 | 128 | 1/5/2026 | |
| 10.0.218 | 124 | 1/4/2026 | |
| 10.0.217 | 139 | 1/4/2026 | |
| 10.0.216 | 144 | 1/4/2026 | |
| 10.0.215 | 143 | 1/4/2026 | |
| 10.0.214 | 142 | 1/1/2026 | |
| 10.0.213 | 139 | 1/1/2026 | |
| 10.0.212 | 138 | 1/1/2026 | |
| 10.0.211 | 147 | 12/31/2025 | |
| 10.0.210 | 151 | 12/30/2025 | |
| 10.0.209 | 145 | 12/30/2025 |