Skip to content

[Proposal] Support defining Silo metadata #8189

@cecilphillip

Description

@cecilphillip

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 to SiloOptions
  • Expose Metadata on SiloAddress
     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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions