-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
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 . 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 toSiloOptions
- Expose
Metadata
onSiloAddress
builder.Host.UseOrleans((context, siloBuilder) =>
{
siloBuilder
.Configure<SiloOptions>(opts =>
{
opts.SiloName = "MySilo";
opts.Metadata = new Dictionary<string, string>()
{
["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
Romanx, SebastianStehle, hoopsomuah, KSemenenko, jaredthirsk and 3 more