Replies: 1 comment
|
Thanks for sharing your ideas, @jano7 - I like them. The watch channel will have massive value in many use cases. If I understood it correctly - your proposal is to always have a pair of channels for every actor - the "standard" bounded channel for event stream and watch channel for system, state changes, is that correct? I was thinking about the watch channel use case but more in context as a replacement for bounded channel - so you either watch or stream. In your proposal we have two parallel data flows working in separate domains. Always. Do you have a specific use case in mind, so I could better visualise the idea? The |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
try_sendfunction to the context: it will return a failure immediately if the channel is full.try_send_with_timeout: returns error if the channel does not get freed within a timeout. Basicallytokio::time::timeout(duration, ctx.send(...)).await.updatefunction to the context: backed by thewatchchannel type.updateallow actors defineasync fn handle_update(&mut self, envelope: &Envelope<Self::Event>) -> Result<()>.async fn handle_event_miss(&mut self, envelope: &Envelope<Self::Event>) -> Result<()>alongsidehandle_event: an actor defining this method removes the back-pressure and is prepared to miss an event if slow. (Backed bybroadcastchannel.)These are a bit more vague:
All reactions