apple / swift-distributed-actors

Peer-to-peer cluster implementation for Swift Distributed Actors
https://apple.github.io/swift-distributed-actors/
Apache License 2.0
584 stars 54 forks source link

Remove system._cluster as we have the clusterControl now #111

Open ktoso opened 5 years ago

ktoso commented 5 years ago

Follow up to https://github.com/apple/swift-distributed-actors/pull/89#issuecomment-530667606 or discussion

We should not need system._cluster as we should be able to do anything we want through the cluster control;

Would solve a fixme we have now: let remoteControls = context.system._cluster!.associationRemoteControls // FIXME: should not be needed and use cluster members instead

drexin commented 5 years ago

ClusterControl currently does not contain ClusterShell, as we are creating a deadLetter ClusterControl if clustering is not enabled and we can't create a ClusterShell without creating the actor. We could of course make the field in ClusterControl optional and handle sending to deadLetter directly, but then we would need to store a reference to deadLetters as well.