-
Notifications
You must be signed in to change notification settings - Fork 13
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
Collecting P2P/DWeb Use Cases #22
Comments
ipfs/in-web-browsers#14 (comment):
Example: PeerPad is a realtime P2P collaborative editing tool, powered by IPFS and CRDTs. With local discovery and p2p transport it could be used in local browsers without uplink to the internet. ipfs/in-web-browsers#14 (comment):
Example: resources in IPFS are content-addressed so address itself is enough to apply cryptographic integrity checks before bookmark snapshot is loaded from the network. |
We have a PoC built with websockets/webrtc at https://github.com/ipfs/js-ipfs/tree/master/examples/exchange-files-in-browser |
ipfs/in-web-browsers#14 (comment):
Having local discovery method (eg. DNS-SD) and p2p transports in the browser context (such as TCP from libdweb, webrtc in worker or by some other means) would enable browsers in local network to share popular content with each other, effectively making the web more robust. Apart from opt-in from website owner, it could be also implemented on the client side:
This is a much harder problem and comes with additional security and privacy considerations, but here are some initial ideas at ipfs/ipfs-companion#535 (comment) |
P2P use case: Distributed Hash Tables DHTs are a fundamental building block of almost every P2P system. They are the primary routing layer in Bitcoin, IPFS, Dat, BitTorrent, and WebTorrent, for example. Almost every decentralized/distributed system needs to provide a lookup service similar to a key-value hash table. Using this distributed data structure, it's possible to build higher-level capabilities like peer-finding without a central signaling infrastructure. Limitations of WebRTC Data Channels: It's not possible to build a DHT on top of a WebRTC connection model. We need the ability to store the "contact information" for a peer, close the connection to that peer, and then re-connect to that peer at some point in the future (if they're still online). This is the way that DHT routing tables get built up over time. With TCP/UDP, this is quite easy to accomplish – simply store the ip:port (12.34.56.78:9000) and try to connect. If the peer is still online, it will just work. However, in WebRTC, the offer/answer connection model makes it impossible to store a peer's "contact information" and attempt to connect again later. A WebRTC connection offer or answer is one-time use. I think that rectifying this in WebRTC requires a few changes:
|
P2P use case: Peer-assisted delivery
|
P2P use case: Sending files directly browser-to-browser
|
@feross see the slides and recording from https://www.w3.org/2011/04/webrtc/wiki/June_19-20_2018 wrt |
Add ability for anyone to create a website without the use of DNS Currently the only way to create a website is to register a DNS name and have it point to your HTTP server of choice. There are several problems with this design:
Instead I'd propose a naming system using public/private key cryptography and a DHT network to notify users about where each address points to. Effectively a user can then create any This would allow much larger possibilities for the Web as we know it since anybody would be able to create a site. Domain names are becoming also less and less used as one simply either "clicks a link" or takes a picture using "QR code" to reach a website. |
ICN (Information Centric Networking) is meant to replace IP, would cover many of the properties mentioned in this thread (e.g., content's hash as a resolvable name, obtaining verifiable copies from local neighbors, serverless web and offline operation). So to the point of collecting use cases, you may find a good list in RFC7476 "Information-Centric Networking: Baseline Scenarios" from 2015, and more documents at the ICNRG's web site. |
@feross ORTC specification is here: http://draft.ortc.org/ ORTC lib (which supports forking) is here: https://ortclib.org/ |
dweb applications ipfs, dat, and secure-scuttlebutt are really databases. But the browser lacks sufficient access to storage to implement these successfully. I recommend adding low level file system access, in particular random access partial reads and appends to files. Also, move/rename. This file access can be in a reserved section allocated per domain, does not need to be in the user's home directory. |
to build something that is really decentralized, the code should also be decentralized - that is, the source, and wether or not to update should be under the user's control. ServiceWorkers provide much of this, but unfortunately they always do a forced update every 24 hours. This makes it hard to design a system that is robust in the case of server compromise. If we could disable automatic updates like this, we could make truly secure systems. (currently, the best we can do to prevent malicious updates is have an application self-destruct: if an unexpected update is detected, private keys and other sensitive data is destroyed. This at least means that attackers will not be motivated by profit, but does not exclude attackers motivated by spite) |
As mentioned in this Beaker Browser Issue the main problem browsers have right now, IMO, is the inability to discover and communicate with peers. In my opinion, having a high level API that would "discover peers for a key" and provide a duplex communication channel would be enough to build all sorts of P2P applications on. WebRTC was great in giving us to connect directly to other machines, but the inability to discover those machines without a centralized, internet-accessible, service makes it impossible to create truely p2p applications. |
I know there are specs/flags/extensions for some of these:
Good group of people in this thread :). |
I thin there is a lot of useful notes in this thread. I would propose organizing it in a following manner:
Here is an example Use case: Getting content across two devices in the same room without internet access.
Limitations:
Solution:
I think there are multiple benefits to this approach:
|
I suggest to create a set of requirements similar to the WebRTC NV Use Cases which also overlap with the interests brought up here. |
The WebRTC WG is still gathering use cases for the next version of WebRTC which will be discussed at the June interim. File your use cases if you haven't already. Furthermore, we need someone to present the DHT use cases (filed in w3c/webrtc-nv-use-cases#15) which potentially requires fundamental changes in WebRTC. I have already broken down the use case into requirements and I can also help with the technical details (what WebRTC can and currently cannot do) and presenting the requirements. But I'm not well-versed in DHTs, so someone else needs to join. |
@feross you do have experience with both WebRTC and it’s shortcomings in the p2p context, would you be compelled to engage in this (referring to WebRTC next mention earlier) ? |
@jhiesey might be able to help out with presenting the DHT/p2p use cases. |
See use cases here: libp2p/js-libp2p-webrtc-star#177 (comment) |
Summary
This is a meta-thread collecting use cases for adding P2P and DWeb technology to web browsers.
Feel free to refer to this issue when discussing interesting use case
or just add link and/or citation in comments below.
Motivation
Browser vendors would appreciate easy-to-explain examples of tangible use cases that could be unlocked by use of P2P/DWeb technologies in web browser. It will help making the case for investing resources and planning dweb-related work. We have a lot of various projects and ideas floating around, but there is no one good resource that can could be used as a starting point.
The text was updated successfully, but these errors were encountered: