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

Set DNSLink *after* pinning #396

Merged
merged 4 commits into from
Sep 1, 2020
Merged

Set DNSLink *after* pinning #396

merged 4 commits into from
Sep 1, 2020

Conversation

expede
Copy link
Member

@expede expede commented Aug 31, 2020

Existing Code

  1. Update database record
  2. Set DNSLink
  3. Pin

Problem

Well, in practice this is completely backwards! We have situations where the files aren’t synced, the user closes their window / stops transfer. Since the DNSLink is already set, there’s no way to get the new data.

Updated Code

  1. Pin
  2. Set DNSLink
  3. Update database record

@expede
Copy link
Member Author

expede commented Aug 31, 2020

Open question — do we want to do this with app as well? Kind of nice that they are live “instantly”, and devs will generally wait for stuff to be live. Will be especially good once there’s streaming % feedback.

Apps tend to be fairly small, though, so maybe also an overoptimization? 🤔

@bmann
Copy link
Member

bmann commented Aug 31, 2020

I think sharing the “local” hash solves the instant bit.

@expede
Copy link
Member Author

expede commented Aug 31, 2020

I think sharing the “local” hash solves the instant bit.

Yeah absolutely for user data. Because apps get served over the gateway, that strategy doesn’t actually work for them. After reflecting on it a bit, data integrity is more important than raw speed, our DNS is actually _ surprisingly quick_ most of the time, and people can fall back to the CID if running IPFS locally. Making the change 👍

@expede expede marked this pull request as ready for review August 31, 2020 19:21
@expede expede requested a review from dholms August 31, 2020 19:30
@expede expede self-assigned this Aug 31, 2020
@expede expede added ☁️ server Web API 💗 enhancement New feature or request labels Aug 31, 2020
Copy link
Collaborator

@dholms dholms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup yup makes sense, looks good! 👌

@expede expede merged commit a89103b into master Sep 1, 2020
@expede expede deleted the ensure-dns-last branch September 1, 2020 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💗 enhancement New feature or request ☁️ server Web API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants