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

Document compelling use cases for IPFS in the browser #14

Open
flyingzumwalt opened this issue Feb 7, 2017 · 9 comments
Open

Document compelling use cases for IPFS in the browser #14

flyingzumwalt opened this issue Feb 7, 2017 · 9 comments
Assignees

Comments

@flyingzumwalt
Copy link
Contributor

flyingzumwalt commented Feb 7, 2017

Collect descriptions of compelling use cases for IPFS in the browser. This info can then be used in #26

Background

@Gozala:

I probably have repeated this many times already, but I think most important is to figure out what IPFS in browser supposed to give users and try to figure out all from that perspective.

@Gozala in #22:

As to what I'm proposing - IMO there needs to be a particular, well defined feature that IPFS in browser provides that would gain a user traction. For example Opera shipped p2p file sharing, chat & static site server back in 2009 and so did AllPeers Firefox extension in 2006 but neither end up being successful, it's either due to lack of that particular feature or maybe they were just ahead of time. Either way I think it's something worth taking time to consider.

@flyingzumwalt
Copy link
Contributor Author

Some things that are currently on the web but not accommodated by browsers: VR, Blockchains, IoT

@flyingzumwalt
Copy link
Contributor Author

flyingzumwalt commented Feb 9, 2017

Things that create new possibilities in browsers

  • disconnected operation & offline (ie. local chat, share files without access to backbone, easy way to load simple applications and work with the person next to you)
  • when you're in an environment, being able to see local nodes around you (geographically local or metaphorically local, ie. nodes run by people with shared affiliations) and see which applications you can run with them -- similar to how airdop works on macs, chat, collaborative doc editing

Examples:

CREATING THE COUNTERPOINT TO: "your machine is a portal to the cloud."
INSTEAD EMPHASIZING: visibility of what's around you. Treating all data as social data and all interactions between nodes as social activity.

@flyingzumwalt
Copy link
Contributor Author

Use case Inspired by @jefft0's comments in #21: bookmark a page and snapshot it and serve that snapshot to the network. Plus, by extension, copy that snapshot to any additional nodes (i.e. Newspaper, Library, Legal Proceedings) with cryptographic integrity checks.

@ghost
Copy link

ghost commented Feb 14, 2017

UX probably similar to the Wayback Machine browser extensions and bookmarklet? https://blog.archive.org/2017/01/25/see-something-save-something/

@jefft0
Copy link

jefft0 commented Feb 14, 2017

These Wayback Machine extensions require manual intervention for the user to click the snapshot button. The whole awesomness of IPFS is that I am already viewing a snapshot, and the link I bookmark or put in a blog post can automatically be a link to an IPLD object which has the snapshot plus the mutable IPNS link. The browser already needs to be IPLD-aware (to display directory objects, etc.), so it can handle this transparently for the user.

@jefft0
Copy link

jefft0 commented Feb 14, 2017

... People are used to copying from the address bar or doing "right-click Copy Link Address". It has to work in this case or the web will continue to be connected by rotting links.

@haadcode
Copy link
Member

One use case for IPFS is lightning-fast download speeds and to use it as a local cache where possible.

Not sure yet what the ideal technical approach would be, but continuing @whyrusleeping's add-on prototype, I added an experiment how it would feel to download files at IP-speeds whyrusleeping/ipfs-webext#1. This approach requires the serving websites to change their links' hrefs to contain a multihash which is not ideal and something automated would be preferred in the future.

@ghost ghost removed the status/ready Ready to be worked label Mar 28, 2017
@ghost ghost added the vendors label Apr 18, 2017
@reit-c
Copy link

reit-c commented Apr 24, 2017

Regarding browser vendors, the chief way to persuade them to support this or that is to show it as already being in wide use. To this end js-ipfs is incredibly powerful; if use of it gains traction (and I have no reason to believe it won't if it does what it says on the box), then it'll be possible to present their support as an optimization rather than a new feature. If nothing else, there'll be a very strong case for granting ipfs security exceptions (such as allowing multiple tabs to share ipfs instances etc.). In other words, presenting hypotheticals to them of what ipfs could or might do is all well and good, but to sell accounting on it there needs to be practical calculation of what definitely would happen were support added. Best way to do that is to actually implement sites that use ipfs and get ordinary people actively using it on a regular basis. I certainly intend on doing that and can assure you that you will see ipfs integration spring up on fringe sites, but the killer argument would be if a more mainstream site adopted it. If ipfs could be marketed as a direct alternative to Cloudflare that might be a good way to pull it off.

Ideally, js-ipfs would be a horrendous RAM/CPU hog based on having to create new nodes for each tab, and it'd be a widespread enough of a complaint from ordinary users that the vendors' would be receptive to reducing that load. These are companies that spend inordinate amounts of effort shaving that extra millisecond off javascript rendering times, this sort of optimization argument is the one that will resonate with them.

@lidel
Copy link
Member

lidel commented Aug 6, 2018

We are making progress with IPFS in Service Worker (#55, ipfs-shipyard/service-worker-gateway) and a great use for it would be a drop-in replacement for old school CDN.

At some point we will solve local discovery and transports in the browser context (libdweb, webrtc in worker or by some other means) and get it to a point where it is faster and cheaper than a free CDN 🙃

Namely:

  • Web developer adds a single script (with optional configuration) to the bundle.
  • User visits the website that now uses IPFS for its CDN needs
  • On first visit, the website installs a service worker for paths with immutable assets (css, js, images, videos, data files)
    • Every /ipfs/ asset gets fetched via IPFS node running in worker + fallback to HTTP gateway if anything goes wrong or user uses ancient browser
    • If user has IPFS browser extension installed, or browser runs IPFS node natively, it will be used instead of spawning a new instance, saving resources and battery.
  • If someone else on your LAN visited website before, most of assets will be fetched from them.
    No CDN can provide that. On top of that, even without LAN nodes, browser node could use DHT implementation optimized for minimizing roundtrip/maximizing load speeds, matching current CDNs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants