-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Update cluster sharding documentation #5421
Conversation
…into DOC_Cluster_Sharding
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.
LGTM but we need to use the right DocFx tools for linking to documentation - helps us make sure that samples on the website don't rot between releases.
specialized projects but in this example, we will roll them into a single project and control their | ||
roles using an environment variable. | ||
|
||
```c# |
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.
Need to use DocFx Code Snippets for samples https://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#code-snippet-sample
That way when code gets refactored, the samples on the website are automatically updated.
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.
Apply this to all code samples in this PR
|
||
### Starting the Sharding Coordinator Actors | ||
|
||
There are two types of sharding coordinator actors; a normal coordinator coordinates messages and |
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.
Use a bulleted list to spell out both types of actors and make it clear that if you have a ShardRegion
you don't also need a ShardRegionProxy
to communicate with those sharded actors
|
||
### Sending Messages To the Sharded Actors | ||
|
||
Finally we can start sending messages to the sharded actors through the proxy coordinator actor. |
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.
From the front end node to the back end node?
### Message Envelope and Message Extractor | ||
|
||
The shard coordinator would need to know which shard and entity it needs to send the messages to, | ||
we do that by embedding the entity and shard id information in the envelope we send the message in. |
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.
shard id information in the envelope we send the message in
shard id information in the messages we send to the it. In this case, we're using a custom ShardEnvelope
message type to wrap all of our messages.
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.
LGTM
specialized projects but in this example, we will roll them into a single project and control their | ||
roles using an environment variable. | ||
|
||
[!code-csharp[Program.cs](../../../src/examples/Cluster/ClusterSharding/ShoppingCart/Program.cs?name=RoleSetup "Setting up node roles")] |
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.
LGTM
Closes #5401