Comments (4)
I'd love to try to implement this but I'm still a bit of a rusty novice. So if I open a PR for this feel free to give it a healthy dose of criticism
from ractor.
This might be worth adding some "Node events" channel on the NodeServer
actor. Such that you could subscribe to node change events.
from ractor.
I've identified that
ractor/ractor_cluster/src/node/mod.rs
Line 434 in d79ea28
I was just wondering what you thought would be the best channel/method to notify any listeners to these events? @slawlor
from ractor.
You could use something like an output port, but their syntax still isn't ideal to me (it's the least "clean" aspect of ractor
imho right now). Otherwise I'd say a "broadcast" actor would make sense. It's message structure might look like
enum BroadcastMessage<TMessage, F>
// this function is what actually sends the message to the subscribing actor
where F: Fn(ActorCell, TMessage) -> () + 'static,
{
Subscribe(ActorCell, F),
SendMessage(TMessage),
}
There's probably some weird lifetime stuff, but I "think" this would work?
from ractor.
Related Issues (20)
- Support `async fn` in traits. HOT 1
- Request for TCP Echo Server Example with TcpListener and TcpStream as Actors HOT 1
- Enum contains type of itself HOT 4
- Add support to downcast a BoxedMessage to get a reference to it's wrapped type without consuming it HOT 4
- When panic=abort is on, panic is not captured. HOT 1
- Lifetimes do not match method in trait HOT 2
- Subscriber-Driven OutputPort Subscriptions
- Enhancing OutputPort Backpressure Handling via RecvError::Lagged Management and Buffer Configurability HOT 6
- `post_stop` of children are being called when supervisor fails. HOT 1
- Not depend protobuf-src on windows HOT 1
- Compiler panics HOT 2
- Handle multiple message types HOT 1
- Awaiting input in an actor HOT 1
- SpawnErr when spawning named actor will permanently pollute that name
- As a subscriber, I should can subscribe multiple type of messages from publisher HOT 2
- With async-trait turned off, it is impossible to use factory HOT 3
- flush() method to help testing HOT 1
- call_t! not working with predefined trait type HOT 1
- Add a pre_stop fn or some way to wait until post_stop has finished HOT 3
- Stashing messages during a specific state of an actor HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ractor.