mycognosist / solar

A minimal Secure Scuttlebutt replication node.
Other
20 stars 2 forks source link

Replace broker broadcast messages with directed equivalents where appropriate #74

Open mycognosist opened 1 year ago

mycognosist commented 1 year ago

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 commented 1 year ago

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