-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Serverless P2P #52
Comments
It will be awesome to see briefing working on top of IPFS. |
The main goal was to ensure end to end security is in place. Which got better with #55. This is a nice to have feature, but not adding additional security IMO. |
I would like to point out that another honorable goal of using something like libp2p is to have censorship resistance. A fully p2p video chat platform that could be run in a single |
I'd love to see volunteers doing such an implementation. I just don't have the time right now to do it myself. |
@waynenilsen @litvintech I would like to follow up on libp2p. Right now I know too little about it and where to have a good starting point. Can you provide a basic overview of how this goal could be achieved best? If the signaling layer could become decentralized I would be very happy. If even the STUN requirements could be eliminated that would be even better. Then the app itself would even work without any hosting e.g. as a browser extension or served locally etc. Any help is very much appreciated. Thanks! |
Another nice to have would be to run without additional software installed. Of course, it should work from mobile devices as well. If any possible with browser side JS only. |
Seems to still need a server: Not Browser-to-browser: |
After some research over the weekend I get to the following conclusions:
To wrap it up: For a web based software (but very likely for any other) it is not possible to offer p2p without the involvement of some kind of server. Spontaneous p2p connection groups will only work as long as the app is active and the network setting does not change. Ideas for bypassing:
Why not use an existing solution? I would not yet exclude that option, but none really convinced me fully yet. The infrastructure also quickly becomes complex and requires running software, that does not easily run on mobile out of the box.
|
Hey @holtwick I saw your twitter thread, and wanted to get involved. This is technically possible. You just need to represent your use case in the IETF. Companies that build with WebRTC just have full-time representatives pushing their businesses needs, you need to represent yours :) For P2P to happen two WebRTC Agents need the following values. There is no reason this two things can't be stable values.
This is the work in the area so far.
I would love to help. I am passionate/excited about these ideas. I just haven't been able to find likeminded people. |
Hi @Sean-Der Thanks a lot for your feedback and getting involved, I just saw it today, sorry. Well, I did hope to solve the problem technically and not politically ;) Before reading your comment I started to build a playground for evaluating different ways to pass around connection data. It has no working demo yet, due to lack of time: https://github.com/holtwick/spontan/ I came to the conclusion, that STUN is not avoidable at all. What do you think? I'd be happy to work with you on the topic. Looks like we like-minded people need to get organized ;) |
Hey @holtwick https://discourse.wicg.io/t/idea-local-devices-api-lan-services/5056 is looking super promising, but it is just LAN. I am really interested in https://github.com/GrumpyOldTroll/wicg-multicast-receiver-api/blob/master/explainer.md maybe users can distribute offers/answers via that. Then establish a 1:1 connection from it? |
Hey guys!
aggree, very interesting reading so far :) I am working on a non-profit, open-source project, a PWA which is a mix from, visualized Wikipedia articles on a digital globe (which is not the topic in this post), and a distributed social network (thats the topic) to achieve the sustainable development goals and the global enforcement of the human rights...
The sourcecode of https://cloud-atlas.app (client) lies on Github, which gets build by Cloudflare Pages and distributed to 200+ CDN's worldwide for free (JAMstack)
Ditch the CockroachDB, making the backend distributed instead. (WebRTC, IPFS.js, Gun.js?) If the UI is done, a user will be able to place a mapmarker with a mission/post on the map. At this moment, your post has only one node. You. Now, when someone "just" likes your post, their client also pins the post, acting as a node for your mission. Kind of spreading the word, because every join or like of your mission, makes the mission available to more people, because more people are acting as available nodes at different daytimes, making/keeping your post more available. If a mission is done, the client unpins all posts, so the next garbage collection deletes it. And because its a PWA, we could ask the user who installed it, to allow background sync while on wifi or even on mobile (at work, at home, at hotel, in restaurant, in malls, in shopping streets), increasing the availability of the net and the posts, making them a node, while not using the app/website. So we talking about a decentralized/distributed jamstack hybrid, that scales and cleans up itself. Nice? ;)
From all i read in the docs of all the single mentioned .js libraries above, and from the experience with my already running JAMstack repo, it looks like its possible. I just cant verify it, because i am missing the coding experience, maybe you can verify that the masterplan is possible, even so with some changes or tweaks to make it possible?
The reason why i write here: Its not a science fiction like, full/strict? distributed system, if you need a server with a fixed IP. (for instance STUN) -POSSIBLE SOLUTION
Inspired by this, i thought about the following: Usually you would start evaluting the solution from the first two and only users of the PWA, right? How to connect them? But i thought, lets saddle the horse from behind. If there where already, lets say 1000 users connected, each could hold a list of 100 nodes, choosen by "best latency" related to their client, updating in an interval. One interval refreshs the 100 nodes, or deletes old ones and adds new ones (again by best latencies) So if the net is running, it keeps running, because its very unlikely all 100 nodes are going offline all at once. Possible tweaks are for instance:
So back to the first two users. How do the two first nodes find each other? Why not just using everything we have technologically available for onboarding? So multiple solutions?
If the new users drop a mission, they share, they'll be joined, receiving the list, and so on...... I think its a bumpy road at the begin, but possible. But after the rough start, its actually nice and easy to onboard and stay in the net, you just need to find an actual mission, receive the list, and you all in. btw: the node list is not limited to the location range of the post. the other node supporting you is able to be on the other side of the planet, just having a not so good latency of course. Multiple local nets of missions of different social circles will arrise everywhere on the planet, but if two networks meet each other coincidentally (two users from two networks sharing the same friends or social network post), the clients of the two nets merging into one, just by their client sharing the node list by the lowest latency. They blend into each other, based on availability. Voila!!!
I think interesting will be the effect of not seeing so many post at first, but then, step by step, your list gets updated with more and more nodes, merging with more and more nets, social circles, the people and their missions, till something like a hugh mesh is there. Think in terms of igniting a single straw on multiple locations of a barley field with a fire-match, slowly start to burn the whole field, kind of... Its almost 4 o'clock in the morning in Cologne, i am writing for almost two hours, and i am sooo excited about your thoughts. But i was so excited and inspired by this issues entries, which is exactly my topic since weeks, and i had to write that down. Kind regards Bo |
Hi @worldpeaceenginelabs Thanks for sharing your thoughts on decentralized networking! It sounds all valid. Although, in theory it seems to be easy, the devil probably is in the details. In particular keeping a decentralized network alive needs some critical mass. But I'm not an expert in this field, just saw that even IPFS uses and needs fixed entry nodes to get started. For the project you describe I guess https://dat.foundation/ comes closest to what you need. The considerations that led me to open this ticket where in fact about establishing a connection between two peers without the need of any central instance. Imagine trying to start a communication in a hostile and fully controlled network, where any central node could be switched off by the network controllers. So the fundamental idea is to bypass the controlled channels and directly establish a point to point connection. In WebRTC context that might be possible by sending the SDP info via a side channel. The remaining challenge is to get out of the own local network and avoiding STUN that is the tool of choice for now. See https://github.com/holtwick/spontan/ for details. It seems, that a convenient solution a regular user would appreciate is not possible to create right now. It always involves some hurdles to get it going on user side. Probably one should only implement such a solution, if it is really required or live with some trade-offs like providing some fixed nodes but keep it decentralized from there on. Again, thanks for sharing and best luck for your project. I'm happy you found some inspirations for your project here. |
What do you think about a Wifi, or Bluetooth, or even both combined, beacon? Using these wireless technologies for ad hoc communication, kind of like this one from above for instance https://berty.tech/blog/bluetooth-low-energy/ (maybe there is a project more advanced then berty already? hard to Google "bluetooth", i get mostly advertising) :D Like an off-grid point to point network with a range between 1m and 10km? (UDP?) Only exchanging fresh node lists (1kb in a 6h interval) over Wifi and Bluetooth? Then connecting to this nodes via an online connection (3G, 4G, 5G, public Wifi Hotspot, Wifi@home or @school or @work) Already downloaded data will be available offline, in case of a lost connection. (PWA offline cache) What do think? I see security issues and maybe energy and data plan draining... Is there something like an encryption possible for Wifi or Wifi Direct, Bluetooth? |
Some new related links:
@worldpeaceenginelabs sure it all sounds good. E2E encryption in general is not a problem IMO, maybe identity validation is a bigger one. However, I'm currently not actively developing in this area. This is a more general discussion about possible solutions to give the word "privacy" and "secure" more weight in P2P chats and not only see them as marketing terms. Therefore, thanks for your contributions and inspirations. |
The text was updated successfully, but these errors were encountered: