Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Orleans] Silo Metadata and Placement Filtering #44187

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

rkargMsft
Copy link
Contributor

@rkargMsft rkargMsft commented Jan 8, 2025

@rkargMsft rkargMsft requested review from IEvangelist and a team as code owners January 8, 2025 20:16
@dotnetrepoman dotnetrepoman bot added this to the January 2025 milestone Jan 8, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates PR is created by someone from the .NET community. label Jan 8, 2025
@rkargMsft
Copy link
Contributor Author

Note that dotnet/orleans#9271 has yet to be merged or included in an Orleans release yet.

Copy link
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's clean this up a bit and see what it looks like then. Also, we're need to ensure that these are added to the TOC.yml.

@IEvangelist IEvangelist added blocked Blocked for some reason DO NOT MERGE labels Jan 17, 2025
rkargMsft and others added 21 commits January 22, 2025 08:10
@rkargMsft
Copy link
Contributor Author

Reviewing to see if any updates are needed from the changes in the committed PR

Aligning with changes to implementation.
@rkargMsft
Copy link
Contributor Author

@IEvangelist PR for the implementation has been merged and docs updated for changes in the PR

moved Silo metadata to host configuration section
@IEvangelist
Copy link
Member

Hey @ReubenBond - could you please take a look at this as well?

public class MyGrain() : Grain, IMyGrain
{
// ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

ms.date: 01/08/2025
---

# Silo Metadata
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Silo Metadata
# Silo metadata


# Silo Metadata

Silo Metadata is a new feature in Orleans that allows developers to assign custom metadata to silos within a cluster. This metadata provides a flexible mechanism for annotating silos with descriptive information or specific capabilities.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Silo Metadata is a new feature in Orleans that allows developers to assign custom metadata to silos within a cluster. This metadata provides a flexible mechanism for annotating silos with descriptive information or specific capabilities.
Silo metadata is a feature in Orleans that allows developers to assign custom metadata to silos within a cluster. This metadata provides a flexible mechanism for annotating silos with descriptive information or specific capabilities.


This feature is particularly useful in scenarios where different silos have distinct roles, hardware configurations, or other unique characteristics. For example, silos can be tagged based on their region, compute power, or specialized responsibilities within the system.

Silo Metadata lays the groundwork for additional Orleans features, such as Placement Filtering.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Silo Metadata lays the groundwork for additional Orleans features, such as Placement Filtering.
Silo metadata lays the groundwork for additional Orleans features, such as [Grain placement filtering](../grains/grain-placement-filtering.md).


The `ISiloMetadataCache` provides a method to retrieve the metadata for a specific silo by its unique identifier (`SiloAddress`). The `ISoloMetadataCache` implementation is registered in the `UseSiloMetadata` method and can be injected as a dependency.

#### Example: Accessing Metadata for a Silo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Example: Accessing Metadata for a Silo
#### Example: Access metadata for a Silo

}
```

In this example:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this example:
In the preceding example:

Comment on lines +112 to +115

---

## Internal Implementation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
---
## Internal Implementation
## Internal implementation


## Internal Implementation

Internally, the `SiloMetadataCache` monitors changes in cluster membership on `MembershipTableManager` and will keep the local cache of metadata in sync with membership changes. Metadata is immutable for a given Silo so it will be retreived once and cached until that Silo leaves the cluster. Cached metadata for clusters that are `Dead` or have left the membership table will be cleared out of the local cache.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Internally, the `SiloMetadataCache` monitors changes in cluster membership on `MembershipTableManager` and will keep the local cache of metadata in sync with membership changes. Metadata is immutable for a given Silo so it will be retreived once and cached until that Silo leaves the cluster. Cached metadata for clusters that are `Dead` or have left the membership table will be cleared out of the local cache.
Internally, the `SiloMetadataCache` monitors changes in cluster membership on `MembershipTableManager` and keeps a local cache of metadata in sync with membership changes. Metadata is immutable for a given Silo, so it's retrieved once and cached until that Silo leaves the cluster. Cached metadata for clusters that are `Dead` or have left the membership table will be cleared out of the local cache.


Internally, the `SiloMetadataCache` monitors changes in cluster membership on `MembershipTableManager` and will keep the local cache of metadata in sync with membership changes. Metadata is immutable for a given Silo so it will be retreived once and cached until that Silo leaves the cluster. Cached metadata for clusters that are `Dead` or have left the membership table will be cleared out of the local cache.

Each silo hosts an ISystemTarget that provides that silo's metadata. Calls to `SiloMetadataCache : ISiloMetadataCache` then return a result from this local cache.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Each silo hosts an ISystemTarget that provides that silo's metadata. Calls to `SiloMetadataCache : ISiloMetadataCache` then return a result from this local cache.
Each silo hosts an `ISystemTarget` that provides that silo's metadata. Calls to `SiloMetadataCache : ISiloMetadataCache` return a result from the local cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked for some reason community-contribution Indicates PR is created by someone from the .NET community. DO NOT MERGE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants