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

Expose and restore indirect peers #46

Closed
wants to merge 2 commits into from

Conversation

awh
Copy link
Contributor

@awh awh commented May 26, 2016

In order to implement weaveworks/weave#2187 we need a way to expose and restore 'indirect peers' - targets that have been added via peer discovery instead of InitiateConnections.

weaveworks/weave#2317 implements the changes in the router that depend on this modification.

This is pretty grotty, and really only meant as a strawman with the hope someone else can think of a cleaner way. Some possibilities:

  1. Have additional methods specifically to extract and restore indirect peers (meh)
  2. Modify InitiateConnections and Targets so that they take/return a slice of a new struct which has a type field (e.g. direct or indirect) instead of string
  3. Have some kind of memento API that takes/returns an opaque interface{} blob that can be saved and restored by an external agent (this might complicate matters if the router ever has to do a schema upgrade of the datastore)
  4. Inject the ConnectionMaker with some kind of interface that it uses at appropriate points to a) get a set of direct/indirect peers (e.g. in newConnectionMaker) and b) notify when they have changed (e.g. on InitiateConnections/ForgetConnections or when new targets are added through discovery)

Thoughts?

@awh awh self-assigned this May 26, 2016
@awh awh force-pushed the issues/2187-persist-discovered-peers branch 4 times, most recently from a323602 to b463c9e Compare May 31, 2016 11:09
@awh
Copy link
Contributor Author

awh commented May 31, 2016

Tests are failing because coreos/etcd/storage got renamed.

@awh awh changed the title [WIP] Expose and restore indirect peers Expose and restore indirect peers May 31, 2016
@awh awh removed their assignment May 31, 2016
@peterbourgon peterbourgon force-pushed the issues/2187-persist-discovered-peers branch from b463c9e to 225eac5 Compare June 6, 2016 09:55
@peterbourgon
Copy link
Contributor

LGTM

awh and others added 2 commits January 23, 2017 14:53
Add facilities to extract, restore and notify on change of discovered
targets.
@bboreham bboreham force-pushed the issues/2187-persist-discovered-peers branch from db2ff0d to 827aaf4 Compare January 23, 2017 14:53
@bboreham
Copy link
Contributor

Going to close this because we never really pursued it.

@bboreham bboreham closed this Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants