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

Offer explicit API on SWIM.Instance for "start monitoring this node" #65

Open
ktoso opened this issue Aug 31, 2020 · 0 comments
Open

Offer explicit API on SWIM.Instance for "start monitoring this node" #65

ktoso opened this issue Aug 31, 2020 · 0 comments
Labels
1 - triaged Task makes sense, is well defined, and is ready to be worked on

Comments

@ktoso
Copy link
Member

ktoso commented Aug 31, 2020

Expected behavior

Shells today kind of work around this and implement it manually, each in its own slightly different way.

E.g. SWIMNIOShell does:

        let sequenceNumber = self.swim.nextSequenceNumber()
        targetPeer.ping(payload: self.swim.makeGossipPayload(to: nil), from: self.peer, timeout: .seconds(1), sequenceNumber: sequenceNumber) { (result: Result<SWIM.PingResponse, Error>) in

which is a bit hacky, since we have to reach into the instance more than we really should, both making a sequence number and a gossip explicitly should not be needed.

Alternatively, this can be solved via swim.addMember and just blindly adding it there, so swim starts monitoring it.

This honestly is probably just fine, but I was wondering if we should just expose the addMember or not, as in some impls where nodes do not have known UID before this adds more complexity than kicking off a ping which will return with the UID.

Actual behavior

Some explicit call to be made on the isntance which tells us how to deal with "start monitoring that node", including retries perhaps etc?

Version/commit hash

0.1.0

@ktoso ktoso added 0 - new Not sure yet if task is valid / going to be worked on 1 - triaged Task makes sense, is well defined, and is ready to be worked on and removed 0 - new Not sure yet if task is valid / going to be worked on labels Aug 31, 2020
@ktoso ktoso added this to the 0.1.1 milestone Aug 31, 2020
@ktoso ktoso modified the milestones: 0.2.0, 0.3.0 Sep 8, 2020
@ktoso ktoso modified the milestones: 0.3.0, 0.4.0 Oct 2, 2020
@ktoso ktoso removed this from the 0.4.0 milestone Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - triaged Task makes sense, is well defined, and is ready to be worked on
Projects
None yet
Development

No branches or pull requests

1 participant