You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no explanation of why Guid.Empty is used. Is Guid.Empty the key of the consuming grain? The declaration of ILiveStockGrain is not in the docs, so it's unclear what the grain's key type is. There's also no code showing how the grain reference was created, so again unclear as to what the key is.
It's not clear where ChannelNames comes from, is it a static class not shown in the docs?
The grain doesn't use ChannelNames.LiveStockTicker, so what's the relationship here between subscription in the grain, and producer in the background service?
One of the bullet points states The OnSubscribed method is called when the grain subscribes to the broadcast channel. It would be good to call out when this is. I assume it's when the grain is activated, and the grain then subscribes 'under-the-hood' due to the mechanism being implicit?
This may be a quirk of the API, but in the StockWorker constructor, ChannelNames.LiveStockTicker is used to get the channel provider, so why does it need to also be specified as part of ChannelId.Create?
A comparison between Broadcast Channels and Streams (probably in-memory streams as they seem similar to broadcast channels) would be great, as I'm not sure when to use one over the other and the pros and cons.
the documentation for Broadcasting Streams is very confusing/misleading. The existence of the GUID in the channel ID seems to indicate this channel will only send to a grain with that specific key which is counter intuitive to the word "Broadcast"
Type of issue
Missing information
Description
I am having a hard time trying to understand broadcast channels from the documentation.
One main source of confusion is this line of code in
StockWorker
:Guid.Empty
is used. IsGuid.Empty
the key of the consuming grain? The declaration ofILiveStockGrain
is not in the docs, so it's unclear what the grain's key type is. There's also no code showing how the grain reference was created, so again unclear as to what the key is.ChannelNames
comes from, is it a static class not shown in the docs?ChannelNames.LiveStockTicker
, so what's the relationship here between subscription in the grain, and producer in the background service?The OnSubscribed method is called when the grain subscribes to the broadcast channel
. It would be good to call out when this is. I assume it's when the grain is activated, and the grain then subscribes 'under-the-hood' due to the mechanism being implicit?StockWorker
constructor,ChannelNames.LiveStockTicker
is used to get the channel provider, so why does it need to also be specified as part ofChannelId.Create
?A comparison between Broadcast Channels and Streams (probably in-memory streams as they seem similar to broadcast channels) would be great, as I'm not sure when to use one over the other and the pros and cons.
/cc @ReubenBond
Clarifications to the docs might also help close dotnet/orleans#8292
Page URL
https://learn.microsoft.com/en-us/dotnet/orleans/streaming/broadcast-channel
Content source URL
https://github.com/dotnet/docs/blob/main/docs/orleans/streaming/broadcast-channel.md
Document Version Independent Id
7de240a6-146f-48d8-c652-58f0ff3571db
Article author
@IEvangelist
Metadata
The text was updated successfully, but these errors were encountered: