Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

[Proposal] Feat/circuit interop #78

Closed
wants to merge 2 commits into from
Closed

Conversation

dryajov
Copy link
Member

@dryajov dryajov commented Apr 2, 2017

adding priorities for transports

Related PR:
libp2p/js-libp2p-switch#217

@RichardLitt RichardLitt added the status/in-progress In progress label Apr 2, 2017
@dryajov dryajov requested a review from daviddias April 2, 2017 22:58
@dryajov dryajov self-assigned this Apr 2, 2017
@daviddias
Copy link
Member

@dryajov Can you explain what you are trying to achieve with priorities? This is more than what relay should try to achieve. I don't see a necessity for it right now.

@dryajov
Copy link
Member Author

dryajov commented Apr 3, 2017

@diasdavid

The basic requirement is to be able to dial on certain transports before others.

Right now, when dialing happens, all the transports are tried in sequence in whatever order they happened to be returned by the const tKeys = swarm.availableTransports(pi). I want to be able to push a transport (i.e. Circuit) to be tried last, or after some other transports have been tried. The priority property would allow for this as I'm sorting the transports based on it, in the availableTransports method.

The requirement for circuit (and I might be a bit off on this one) is to be able to dial on circuit addresses only if all else failed. In this case, I'm setting all transports to a priority of 1 and Circuit to 100. This allows me to push it to the end of the list of available transports.

IMHO, this is a useful feature to have.

@dryajov dryajov changed the title Feat/circuit interop [WIP] Feat/circuit interop Apr 3, 2017
@daviddias daviddias mentioned this pull request Apr 3, 2017
53 tasks
@dryajov dryajov changed the title [WIP] Feat/circuit interop [Proposal] Feat/circuit interop Apr 3, 2017
@dryajov
Copy link
Member Author

dryajov commented Apr 3, 2017

@diasdavid Alternatively or in addition to this, we could also allow priority be controlled from the config as well, so that we can choose which transports are preferred based on environment conditions.

@daviddias
Copy link
Member

Going to skip this, for now.

@daviddias daviddias closed this Jul 8, 2017
@daviddias daviddias deleted the feat/circuit-interop branch July 8, 2017 20:03
@daviddias daviddias removed the status/in-progress In progress label Jul 8, 2017
@dryajov dryajov mentioned this pull request Feb 20, 2018
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants