-
Notifications
You must be signed in to change notification settings - Fork 6k
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
base: main
Are you sure you want to change the base?
Conversation
Note that dotnet/orleans#9271 has yet to be merged or included in an Orleans release yet. |
There was a problem hiding this 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.
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: David Pine <[email protected]>
Reviewing to see if any updates are needed from the changes in the committed PR |
Aligning with changes to implementation.
@IEvangelist PR for the implementation has been merged and docs updated for changes in the PR |
moved Silo metadata to host configuration section
Hey @ReubenBond - could you please take a look at this as well? |
public class MyGrain() : Grain, IMyGrain | ||
{ | ||
// ... | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ms.date: 01/08/2025 | ||
--- | ||
|
||
# Silo Metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#### Example: Accessing Metadata for a Silo | |
#### Example: Access metadata for a Silo |
} | ||
``` | ||
|
||
In this example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this example: | |
In the preceding example: |
|
||
--- | ||
|
||
## Internal Implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--- | |
## 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
Summary
Documentation for code changes here: dotnet/orleans#9271
Internal previews