microsoft / microsoft/aspire

Aspire.Hosting.Orleans: model grain journaling providers

Open
#19,609 1 comment 0 reactions 0 assignees View on GitHub
area-integrations triage:bot-seen
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

## Summary

Add an Orleans AppHost operation for grain journaling so an Aspire resource reference can emit the configuration consumed by Orleans journaling provider builders.

Orleans grain journaling providers register under the `GrainJournaling` capability. Azure Table Storage, Azure Blob Storage, and Redis implementations support configuration-driven activation and can consume keyed service clients, named connections, or direct connection values.

## Proposed experience

Provide an API consistent with the existing Orleans resource operations, for example:

```csharp
var storage = builder.AddAzureStorage("storage").RunAsEmulator();
var blobs = storage.AddBlobs("journals");

var orleans = builder.AddOrleans("cluster")
.WithClustering(...)
.WithGrainJournaling(blobs);
```

The resource reference should emit an `Orleans:GrainJournaling` configuration section containing the inferred or explicitly selected provider type plus `ServiceKey`, `ConnectionName`, and resource-specific connection properties using the same secret-handling and identity behavior as other Orleans provider operations.

The API should also support an explicit provider type when a resource class name does not match the Orleans alias.

## Runtime contract

Orleans consumes a single `Orleans:GrainJournaling` provider section. Current provider aliases include:

- `AzureTableStorage`
- `AzureBlobStorage`
- `Redis`

The configured provider owns journal persistence while the Aspire resource owns provisioning and lifecycle of the backing service.

## Testing

Please add AppHost model tests covering:

- inferred and explicit provider types;
- generated environment/configuration;
- service-key and connection-name propagation;
- invalid or incompatible resource/provider combinations.

This is tracked from dotnet/orleans#10784.

Contributor guide

Open the contributing guide

Research direction

Start with the existing Orleans resource operations and their AppHost model tests. Trace how resource references generate provider configuration, then cover inferred and explicit provider types, service-key and connection-name propagation, generated environment/configuration, and invalid resource/provider combinations for grain journaling. Done means the new operation emits the documented Orleans:GrainJournaling contract consistently with existing provider operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, redis
Domain
backend, cloud, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.