Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

feat: preload on content fetch requests#1475

Merged
alanshaw merged 4 commits into
masterfrom
feat/preload-on-fetch
Jul 29, 2018
Merged

feat: preload on content fetch requests#1475
alanshaw merged 4 commits into
masterfrom
feat/preload-on-fetch

Conversation

@alanshaw

Copy link
Copy Markdown
Member

When JS IPFS requests content not stored locally it needs to ask the peers it knows about to provide it if they have it. The peers are not relays so if they don't have it, they won't just go and find it and provide it to JS IPFS.

However, if we issue a preload request prior to these requests we prompt the preload nodes to fetch the content using their DHT and they can then provide it to JS IPFS.

This fixes the story of adding content to go-ipfs and retrieving it from js-ipfs.

When JS IPFS requests content not stored locally it needs to ask the peers it knows about to provide it if they have it. The peers are not relays so if they don't have it, they won't find it and provide it to JS IPFS. However, if we issue a preload request prior to these requests we prompt the preload nodes to fetch the content using their DHT and they can then provide it to JS IPFS.

License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
@ghost ghost assigned alanshaw Jul 28, 2018
@ghost ghost added the status/in-progress In progress label Jul 28, 2018
* chore: update libp2p and is-ipfs dependencies

License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>

* chore: update all the deps

* fix: rm non used boostrappers from tests

* test: increase mfs preload timeout

* test: pin-set timeout increase
@ghost ghost assigned daviddias Jul 28, 2018
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
@alanshaw alanshaw changed the title [WIP] feat: preload on content fetch requests feat: preload on content fetch requests Jul 28, 2018
@alanshaw alanshaw requested a review from daviddias July 28, 2018 20:26
@alanshaw

Copy link
Copy Markdown
Member Author

CI green!

@daviddias

Copy link
Copy Markdown
Member

Put it in a boat 🚣‍♂️

@mitra42

mitra42 commented Jul 29, 2018

Copy link
Copy Markdown

Its breaking - possibly breaking one of my demos - see #1476

@alanshaw

Copy link
Copy Markdown
Member Author

We’re waiting on the CORS settings for the preload nodes to be updated. The failing requests are async and should not effect anything else.

License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
@alanshaw alanshaw merged commit 649b755 into master Jul 29, 2018
@ghost ghost removed the status/in-progress In progress label Jul 29, 2018
@alanshaw alanshaw deleted the feat/preload-on-fetch branch July 29, 2018 08:49
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