[Proposal] Support defining Silo metadata
- Dominant language
- C#
- Stars
- 10.9k
- Forks
- 2.1k
- Avg merge
- 13h 56m
- Merged PRs (30d)
- 351
Description
### Overview
I'd like to propose the ability for developers to attach additional metadata attributes to their silo definitions.
### Use cases
Enabling this feature would open up the ability to better categorize, inspect, and filter out silo instances. Similar capabilities exist in other frameworks such as [AkkaDotNet ](https://getakka.net/articles/clustering/member-roles.html). This would be particularly useful when creating custom placement strategies.
### Possible workaround
Today, the `SiloOptions` only has a single property,`SiloName`. Also it is possible to create a non standard naming structure to embed metadata into silo, this is a bit of a hack.
```
// structure => "siloName.siloRole.SiloCategory"
opts.SiloName = "MySilo.workflo.blue";
```
### Possible API changes
* Add `Metadata` property to `SiloOptions`
* Expose `Metadata` on `SiloAddress `
```csharp
builder.Host.UseOrleans((context, siloBuilder) =>
{
siloBuilder
.Configure(opts =>
{
opts.SiloName = "MySilo";
opts.Metadata = new Dictionary()
{
["category"] = "blue",
["custom.data"] = "My Custom Value",
[Constants.DefaultRolesNameKey] = "role1, role2, role3"
};
})
});
```
### Conditions
* Silo metadata should be immutable. Once the silo has started, the properties cannot be changed
* Silo metadata should be added to the Membership table records
Contributor guide
Research direction
Start by tracing SiloOptions and SiloAddress, then inspect the membership-table record path referenced by the proposal. Compare the existing SiloName handling with the requested metadata API and verify how startup configuration is applied. Done means the metadata is exposed, immutable after startup, and represented in membership records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100