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

Smart portal selection #5

Open
MSevey opened this issue Mar 22, 2021 · 0 comments
Open

Smart portal selection #5

MSevey opened this issue Mar 22, 2021 · 0 comments

Comments

@MSevey
Copy link
Contributor

MSevey commented Mar 22, 2021

Issue by m-cat
Friday Jul 31, 2020 at 11:14 GMT
Originally opened as NebulousLabs/skynet-docs#21


Smart Portal Selection

Eventually we want to be smarter with portal selection across our SDKs. This means we will need to extend the client model to all of our SDKs so that we can perform the portal selection only once, when initializing the client. Then we want to implement some checks to select the best portal in the absence of user/dev input.

Design

The priority should be:

  1. Prefer user-configured portal (the portal hosting the sky app) (skynet-js only)
  2. Prefer dev-configured portal (option passed to the Client constructor)
  3. Prefer siasky.net

We also may want to factor in locally-running siad instances as well as user configuration (dotfile or a cookie).

We will need to test for missing capabilities (min version, feature support) for each portal picked. We should hit an endpoint like /version (we might want to make this more specific like skynet-capabilities).

This will also catch the case in point 1 where we are running a web app that is not a sky app on a portal.

When initiating a client we may want to assume that it'll fail, so we'll actually ping the:

  • current portal
  • dev portal
  • siasky portal

all at once, and then use the best one that doesn't return an error or a response that indicates missing capabilities.

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

No branches or pull requests

1 participant