Open goodboy opened 3 years ago
resource dump, will do writeup later.
internal existing issues: https://github.com/goodboy/tractor/issues/184
resources to work toward our own discovery sys: https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing https://spec.matrix.org/unstable/server-server-api/#room-state-resolution https://spec.matrix.org/unstable/rooms/v2/ https://en.wikipedia.org/wiki/Multicast_DNS https://en.wikipedia.org/wiki/Name_Service_Switch https://en.wikipedia.org/wiki/Link-Local_Multicast_Name_Resolution https://en.wikipedia.org/wiki/Zero-configuration_networking#Name_service_discovery https://en.wikipedia.org/wiki/Service_Location_Protocol https://en.wikipedia.org/wiki/Peer_Name_Resolution_Protocol https://en.wikipedia.org/wiki/Name_Service_Switch https://raft.github.io/raft.pdf
This issue is a more practical and immediate equivalent of the discussion in #184.
From the start of the project a hacky naive approach to finding the addresses of other "actors" has been this idea of an arbiter which we implement as a "special actor" with methods for looking up (socket) addresses by name. This is of course not an ideal system since there will always be a race during a multi-tree startup for the "arbiter" address as well no flexible consensus system for how that position can be transferred to another tree / root actor when the first is torn down / fails. The fragility is further emphasized in how root actors "check" for the registry (arbiter) existing which is simply do a fast TCP connect and drop on the supposed arbiter socket address.
Summarizing the current naive/questionable design for an address registry:
trio.BrokenResourceError
s to an internalTransportClosed
error which is ignore silentlyDigging into "why" this is in the code:
This "arbiter" idea was originally adopted from other "actor system" projects:
Places to start some research
WIP, will come back.