Skip to content
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

Replace broker broadcast messages with directed equivalents where appropriate #74

Open
mycognosist opened this issue Jun 12, 2023 · 1 comment
Labels
good first issue Good for newcomers refactor Code rewrite for clarity or performance

Comments

@mycognosist
Copy link
Owner

For example, the connection_scheduler actor could be sending messages addressed directly to the dialer actor (instead of sending on the broadcast channel).

This is an optimisation and not urgent in any way.

@mycognosist mycognosist added the refactor Code rewrite for clarity or performance label Jun 12, 2023
@mycognosist
Copy link
Owner Author

In order for this to be possible we'll probably have to identify actors via their name and not their broker-assigned ID, since the ID assigned to an actor can not be known ahead of time. Note, however, that this name-based approach will only work for actors which are only spawned once (ie. the dialer or connection-scheduler, but not connection or classic replication actor).

Add actor_name field to BrokerEndpoint and match on it in the message loop when handling a BrokerEvent::Message.

https://github.com/mycognosist/solar/blob/main/solar/src/broker.rs#L227

@mycognosist mycognosist added the good first issue Good for newcomers label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactor Code rewrite for clarity or performance
Projects
None yet
Development

No branches or pull requests

1 participant