-
Couldn't load subscription status.
- Fork 6.1k
Clarify Orleans Broadcast Channels documentation with missing context and comparisons #49373
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: IEvangelist <[email protected]>
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
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.
Pull Request Overview
This PR enhances the Orleans Broadcast Channels documentation by clarifying previously unclear concepts and adding missing code examples. The changes address confusion about the relationship between publishers and consumers, the purpose of key parameters, and when to use broadcast channels versus streams.
Key Changes:
- Added missing code snippets for
ILiveStockGraininterface andChannelNamesclass - Enhanced explanations of publisher and consumer behavior with detailed parameter descriptions
- Added comprehensive comparison table between Broadcast Channels and Orleans Streams
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.
This LGTM. Let's ![]()
Fixes #[issue_number]
Summary
This PR addresses confusion in the Orleans Broadcast Channels documentation by adding missing code snippets, clarifying key concepts, and providing a comprehensive comparison with Orleans Streams.
Changes Made
Added Missing Code Snippets
The documentation now includes two critical code snippets that were previously referenced but not shown:
ILiveStockGraininterface - Shows that the grain usesIGrainWithGuidKey, clarifying the grain's key typeChannelNamesclass - Displays the static class containing the channel name constant used throughout the exampleEnhanced Publisher Section
Added detailed explanations for the
StockWorkerpublisher code:ChannelId.Createparameters: Clarified thatGuid.Emptyis used as the namespace parameter to indicate a single shared broadcast where all subscribers receive all messagesChannelNames.LiveStockTickerappears in bothGetBroadcastChannelProviderandChannelId.Create, and that both must match the name used in silo configurationEnhanced Consumer Section
Improved the consumer grain explanation:
IOnBroadcastChannelSubscribedenables automatic subscription when grains are activatedOnSubscribedtiming: Clarified that this method is called automatically when the grain is activated (first use or after recovery from failure)[ImplicitChannelSubscription]attribute: Highlighted this attribute's role in marking grains for automatic subscriptionAdded Comparison with Orleans Streams
Created a new section comparing Broadcast Channels with Orleans Streams (including in-memory streams):
Validation
ai-usage: ai-assistedfrontmatter as requiredRelated Issue
This PR addresses all points raised in the issue:
Guid.Emptyusage inChannelId.CreateChannelNamesclass sourceILiveStockGraininterface declarationOnSubscribedis calledcc @ReubenBond @IEvangelist
Original prompt
Fixes #39496
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
Internal previews