-
Notifications
You must be signed in to change notification settings - Fork 2
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
True P2P #1
Comments
Unfortunately, no P2P network can escape the need for bootstrap servers/nodes of some kind, and with browsers, signaling servers are a must because browsers can't listen for incoming traffic. The problem with WebTorrent is the scarcity of tracker servers, which are the signaling servers for WebRTC. They are commonly overloaded. Gun is working on solving this for the Gun network with its AXE protocol. I can see AXE as a way to eventually decentralize WebTorrent tracker servers. Easypeers works pretty much the same way as P2PT. It creates a torrent that peers swarm around and connect to each other with. But as with P2PT, Easypeers also requires a signaling server for WebRTC connections. And, of course, it isn't finished yet. You might want to look into simple-peer, which is absent any signaling server, so requires some way to exchange WebRTC SDP. It is what WebTorrent uses under the hood, and it makes WebRTC pretty simple once you understand how it works. The bittorrent-tracker library is free. You can run your own tracker server with an easy 1-click deploy to Heroku with p2p-tracker. I have a domain name I would be willing to contribute to anything you come up with from a DNS perspective. Just ping me on twitter and we can work it out. Hope this info helps |
Speaking of 'Atlas' that makes me thing of MongoDB Atlas. I think I might whip something together with change streams for WebRTC signaling using that. |
Thanks for the answer. It helps a lot understanding the basics. Axe is definitly interesting, but for me the concept is already "too capitalistic" and too monopoly. I know i am counting peas, but my goal is independent or minimum quasi independant P2P. Which means, not dependant on one single network infrastructure, not my own, not a foreign one, but allowed to use every chance to connect as a fallback to reconnect. (in turn using different, already existing network infrastructures as needed. at the end of the day, we want the connection to the swarm, to update our DHT trackerlist/peertrackerlist/peerlist, to STAY connected) What about this MSC MEP concept then? (Multiple Strategy Concept, Multiple Entry Points) Having multiple strategies PLUS using multiple entry points I imagine it happening like this This is the users client on the "very first entry" domain, which is live for demo: https://cloud-atlas.app/ (only the Google Login is active) Every client is also a tracker itself, so its able to fetch connection adresses (DHT)
Summary So this is using two different ways taking advantage of the webtorrent/bittorrent network first, (Peerservers and Easypeers/ P2PT) but as soon as you have enough peers continously, these already online peers are becoming the 99% of the time used p2p trackers (some time after their launch, for instance Facebook, had minimum a few users online every second of a 24h day, which is the equivalent to 99,9% server uptime in a p2p network) Fallback 1 Besides exchanging their DHT steady, they also are able to get their dht via a classic torrent, saved on some torrent websites, or like a post somewhere with a magnet link you save every few hours automated on a/or multiple socialmedia websites, and god knows where else... ???Fallback 2 and possible "mainnet"??? (here mainnet is the most reliable fallback option which would equal a centralized server) Fallback 3 Your "very first entry" domain/site gets a 60sec updated dht list. But only used as last last last fallback, after everything else what i just wrote failed. You get the upside down concept, which causes pragmatically what we could call True P2P territory, right? ;) These beasts (clients) pretty much crawling their options for connections, the opposite way a centralized entity would do. 🥳 Would that work? Are my peers steady online now, independant from fixed infrastructure, which becomes just the fallback in case, or did i miss something out? You know whats cool? We are just about to figuring out how True P2P could work out. Which has the power to transform the internet from ground up. (so lets keep it open-source) Thats minimum so cool as figuring out True AI (like from the movies) ;D |
Just a quick note: AXE is part of Gun. All Gun modules/protocols are free & open source. @amark's ideas with AXE are very similar to some of those you mentioned about storing relay addresses on Github, elsewhere, etc. I do like the idea of one p2p technology being used to make another one more robust. Tristero does this to some degree with IPFS, WebTorrent and Firebase. |
Ok, then AXE definitly gets interesting as soon as its available. Well, do you see any struggles, shortages, narrow pipes in the concept? |
Considering I have yet to be successful with my 5-6 year long quest to decentralize tracker servers, yes there are many development struggles! :) Curious to see what you come up with |
Well, i have all your repos available plus the ones you suggested, plus my own research. I am pretty new in coding, so i cant really estimate, if having all these libraries available is a serious advantage? For me, it looks like puzzling it together with these libraries and than finetuning, finetuning, finetuning... or not? |
We switched the repo and i found a collaborator already. You can follow us on https://github.com/worldpeaceenginelabs/True-P2P, which is based on Trystero, and now we are adding modules (first is webtorrent) Thanks for your suggestions. It pushed the project forward a lot, making it much easier to realize (and finally find a starting point) |
Nice! Great to hear! I'll certainly be following along |
Oh man, I forgot about some of those old repos. They mostly represent failed attempts to get things working. I think |
Hi Draeder. Could you help me out maybe? I like to add two of your repos as modules to my repo. If i understand webtorrent beacon right, you could potentially do the following with it: My idea is to use a torrent as a beacon. So your app only has the name /signature of a torrent saved, which nobody knows about, except your app (like a secret). Everybody who is interested in this torrent (only people with your app, nobody else knows), is potentially one of your users, so you connect to them. For security, you could exchange this torrent from time to time, which is like changing the secret address or password from time to time. |
Take a look at the Easypeers code. It uses WebTorrent extensions, which will probably work better for you for that purpose. It's basically what P2PT and Bugout does as well. It creates a torrent based on a 'topic' and peers interested in that topic swarm around that torrent and connect to each other. |
so easypeers replaces tracker-swarm and webtorrent-beacon at once? did you use these two repos/concepts to realize easypeers? Sounds like it does exactly what i just wrote? |
Which one is more developed? (for production) Easypeers or P2PT? |
P2PT. Easypeers is a work in progress. I have to finish the gossip protocol. |
Ok, very honest. thx For understanding: |
I don't have much experience with P2PT really, so I'm not sure. It may connect all the peers together directly. Bugout certainly has a gossip protocol. |
ok. But does Trystero something different than Easypeers/p2pt does then? Or are they both/all three doing the same? (swarm surrounding a "topic", by searching for a dedicated torrent?) |
Because i like to integrate p2pt into Trystero, except i am thinking wrong, and they both doing the exact same thing... |
Because if not, i like p2pt to be the fallback option of Trystero. Every client is also a tracker itself, so its able to fetch connection adresses (DHT)
|
I believe Trystero/P2PT/Bugout/Easypeers all operate the same way when it comes to webtorrent. The problem you will face with
Is that browsers cannot be trackers, because they are unable to listen for incoming network traffic without first making an outbound connection (e.g. to a tracker). |
The moment, the client is connected through WebRTC to other clients, exchanging DHT lists with them, isnt it a tracker then? |
Imagine a client A already online 2h, has around 100 entrypoints on a dht. So client A is virtually the tracker for client B, or not? |
Browsers can't use the DHT because they can't listen on ports. |
Yes, i understand. But two clients exchanging DHT's via WebRTC, is the same what trackers do, or not? Where is my error in my thinking? |
Trackers crawl the DHT to find peers, accept the WebRTC signaling from those peers, and send it to the other peers. No new WebRTC connections can be created without some kind of way to coordinate this WebRTC signaling exchange. For example, Alice and Bob are connected to each other through Tracker1. Now Carl wants to connect to Alice and Bob, it is impossible for Carl to exchange WebRTC signaling data with Alice and Bob unless it is sent through the Tracker1 server. You could have 1000 WebRTC connections, all of them will have had to coordinate the WebRTC signaling somehow. In WebTorrent, those are the tracker servers. In Gun DB, those are the relay servers. In Hyperswarm-web, those are websockets servers. Take The biggest challenge with decentralization in browsers is this requirement for some kind of centralized way to connect the the peers together. If what you're building can solve this challenge by using multiple fallback mechanisms for WebRTC signaling exchange, that would be awesome. Gun's AXE protocol is striving to do this too. I've been working with @amark on developing tests to achieve it. When AXE is done, it could probably be used as one of the fallbacks in True-P2P |
Well explained. That was a big update. I got it now. Thank you very much.
Thats the goal ;)
definitly
well, i am thinking about a p2p "API"?/"DHT"? or easy said, a list with direct entrypoints running on the swarm network. As soon, as a client is connected, it receives multiple entrypoints to be able to get reconnected. (independant from torrents/ipfs) In turn, a client has always a hundred options of direct webrtc reconnects from the list. So i am running my own lists for direct connection, and use the open available lists (torrent/ipfs etc.) as fallback. |
Trystero is pretty much doing everything from my bucket list. Take a look at this: Thank you so much for suggesting Trystero to me 🙏🏼🙏🏼🙏🏼 |
Interesting.. I looked at Trystero a while back; I don't remember why I moved away from it. Notably, I'm working on building a decentralization based secure 1:1 tunnel at the moment. It could potentially be used for trust between True-P2P servers. |
sounds like p2p vpn? |
oh you mean like, if i run an app with mishmesh and another dev runs his own app with mishmesh, we could share resources and profit both from sharing nodes? |
For example: if the 'topic' matches on say, Bugout, and there's a matching 'topic' on Gun, the Gun and Bugout peers would just connect to each other over Mishmesh and drop the Bugout and Gun connections. |
But if AXE is ultimately successful, it will be AXE as the primary transport for Mishmesh... Mishmesh will just coordinate between other p2p technologies over AXE. |
Does someone now, when there is a stable GunDB and AXE? |
You understand that all browser-based P2P technology uses WebRTC, right? That includes WebTorrnet, Bugout, Gun, IPFS, etc. (any other p2p libraries that work in the browser). Also, that Bugout and P2PT (and Easypeers) are built on top of WebTorrent....? WebRTC can work in Node.js but requires a library called wrtc to make that happen. Yet, Node.js doesn't require WebRTC because it is server-side and can access TCP/IP directly. Timebeam, for example, uses hyperbeam and creates a server that can be reached on the provided ports. Theoretically, a browser could be configured to use a Timebeam server as it's web proxy server. I plan to test that soon, actually. Just some stuff to keep in mind as you're working through True-P2P |
Yes, but WebRTC is the one you want to replace with AXE in the future, or not? |
Until browsers support listening on ports, WebRTC will never be replaced, not even with AXE. What AXE will do, though, is enable communicating with other peers with it's daisy chaining protocol (gossip protocol), by relaying messages through the peers it is already connected to (via WebRTC). Some homework: what is Partial Mesh? |
partial mesh is were groupes of nodes acting, while in a full mesh you have one big group only. for instance, in my cloud atlas project, people collaborate on places or areas. here comes partial mesh into play and builds a fast network of short distance nodes. |
Partial mesh is Alice, Bob and Carl are all in a group and Carl, Dale and Ed are all in a group. Alice can talk to Ed through Carl. That is the Gossip Protocol, or Daisy Chaining, in a Partial Mesh network. If you used WebRTC connections between all peers, it would be a massive performance problem for all of the connected peers. |
ok, this would be my perfect high level abstraction of a true-p2p client. i know from our conversation, that i still got wrong concepts in my mind 😅
|
one of my other fallbacks i was thinking about: i would totally support my favourite website with installing this on my pc. for instance, if i could support wikipedia with this, i would run one of these background windows clients, of course. same could work for a very reliable p2p maptile server, for a decentralized Google Earth/Maps btw: whatever api you use for showing map tiles in a map application(cesium js for instance), with adding mishmesh/true-p2p to an application, the downloaded maptiles get distributed(like saved offline forever), without having to write an interface for the tile api and your p2p network. I think that is an interesting finding. I am sure there is more about to pop up in the future. Like weird, but great side effects of connecting p2p with the website/app environment/concepts of today. (with an eye on storing and caching, which is p2p all about) Esspecially when it comes in combination with JAMStack and PWA (which are both great concepts for themself already) |
Speaking of which, Mishmesh is working between Gun & Bugout! |
Motivation is everthing :D |
Hope to learn from your commits, how to write adapters |
One of the problems with Mishmesh is if you leave the adapter running, it has an event listener leak. Anyway, if you have any comments, problems with Mishmesh, open an issue over there.. 👍 |
Thank you so much for coding Mishmesh, and even in just one night. :D
something with unregister the event handler if not in use. a heartbeat could tact the scanner rate in general. I will use it as an opportunity to learn something ;) #1 (comment) |
There is no cost, and it does not use a blockchain.
It can be used for whatever you want. I have used it for a chatting app, Hyperbole, which runs in the browser only, with no server at all, and can even be launched by just opening the index.html file.
SEA is a security suite that Gun uses for authenticating users. But it can be used independently of Gun for encryption/decryption, too.
Bugout, P2PT and Easypeers all do this. WebRTC DHTs have been discussed with WebTorrent. I see you found that issue. If I recall correctly, the WebTorrent developers decided WebRTC is not performant or reliable enough to serve as a protocol for DHT. |
i meanwhile found some info. its similar to my priority/timeout/ distance/responsetime approach i am thinking of. for instance posts(missions) are related to an area, so i will only connect nodes from the same area of course, which will optimize the dataflow already. nodes are only subscribed to a post, not to another user. ergo= more users supporting a mission (with joining it, which pins the post), the more available the post gets.
could it emulate or be a p2p node.js server?
so it replaces my third-party "sign in with", but i have to store the profile somewhere, for instance gundb.
yes, i was wondering, why is there no direct connection dht running between the nodes. Like with spinach: 100 years long, people were convinced, spinach is rich in iron. A few years ago, someone made a second measure. Its not! :D |
Since you seem to be obsessed with true open-sourceness (which is good), i am sure you will have a oppionion about this: I usually dont think in terms of limiting or forcing people, but i thought, why not combining the MIT License and Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) into one "for-nonprofit only" license. The idea behind it is not limiting business. For instance if you do a for profit supermarket, you go for profit no matter what. its just such a little change in licensing and thinking, but it would totally shift the agendas of business. (and peoples minds, become rich doing good) its like banning this unfair unsustainable machines we call businesses. Because non-profit, doesnt mean, you not allowed to make a profit (thats a misconception) but in the case of a non-profit, the money flows were it belongs(legally and morally) I really love to know your oppinion to this one. |
https://worldpeaceenginelabs.org/decentralized-non-profit-as-a-service/ wolff makes a strong point in the video. i think what he says could work out with non-profit open source licensing as a standard. becoming the new normal. |
As a To me, unrestricted open source software provides equal opportunity for all. |
I think a MIT-for-nonprofit-only license would keep the unrestrictedness, even stay capitalistic, but without the bad side of capitalistic behaviour. Dont you think? Or would i be (unknowingly) the new enemy of freedom, with establishing this movement? 😅 |
At a philosophical, moral, ethical, and even legally enforceable level, who exactly would decide what is a 'psychopathic for money agenda'? With the MIT license as it is, that choice is up to left up to the developer who uses MIT licensed software. To me, liberty is: |
we are on the same side. i am not against anything, not capitalism, nor free market (both cultural technologies we need to improve, and not banishing it) just shifting the purpose of a business endevour. And with that letting our moral abilities come into play again. no one should decide whats psycho, but some things are obviously not right(kidswork, slavery, dept slavery, money printing, amm) today, you cant tell nestle to stop stealing water from small villages, and we just accept that some way, even there is some resistance of course. but if wwf (classic non-profit giant) would go hunt pandas, or greenpeace starts investing into oil, someone would come, cut their power, right? :D Because its logic! a non-profit doesnt do that. if a non-profit does the opposite of its written down statues, you could even cut their tax deduction for non-profits! ;) but in a classic business, doing bad things is handled as business as always. an with politicians having shares in this companies, makes it even worse. But that all said, just by incepting open-source for non-profit only. The already existing machinery does the rest. |
When you start to peal back the layers behind non-profits, you'll find many members secretly do the things they claim to be against. The non-profit organization serves as cover for their wickedness. Evil will always exist, no matter what it hides behind. Your idea is fine, I just personally won't use that kind of license. |
exactly this came to my mind too. we do not living on a ponyfarm, were everybody obeys the moral and laws, because he says so. But if the new narritive was sustainable, non profit open-source, in my oppinion, money would become rather a tool, instead of being the goal. (and third world countries would get vaccin production instructions for free, if it was oh oh oh so dangerous as say said) And with JAMStack already and coming P2P esspecially, everybody is able to start a global business without cost. So why not taking what bothers you, look if others have that issue too, develop a solution and make money with solving their problem? Thats a good thing. ( and the actual intention of business in a free market) I wouldnt even sue someone, not using it for non-profit purposes. Never ever :D Just want to change the narrative, because people love to do good. You get me? ;D *imagine kids. if you tell them, people like people who do good, they do. we as a species are kids too.
fair enough :) |
its not limiting anything. just the narrative changed. sell it for drugs and rock and roll if you like, nobody cares :D but i want kids say: if i am grown up, i want to start a non-profit like my father. (and get rich) |
Hi Draeder,
i asked "I am working on a True P2P project (without fixed signaling servers) Does anyone have experience with a combination from GunDB, webtorrent trackers and dyndns, maybe???" in the Gitter amark/gun chat.
Rococtz answered, that you have been trying something like that for a while now.
My definition of True P2P = "A swarm of P2P clients, independent of any dedicated servers, not even dedicated signaling servers"
If i did not super misunderstood this repo https://github.com/subins2000/p2pt, then it will make available the webrtc datachannel for your app, which are already established by webtorrent for file transfer purposes (i guess this is how they do it).
The webtorrents, websockets, bittorrents are free to use, so we are not talking about me, building a relay network, but using bittorrents relay network (75.000) for my p2p swarm, in the same time improving the bittorrent network (more nodes, better scale, better performance/reliability)
The further improvment is to have multiple such entrypoints (free signaling servers) like DHTs of free stun and turn servers, multiple dyndns trackers as fallback option and so on...
Anything wrong in my thinking? Maybe I cant use the trackers for free? I am really not sure, even though reading multiple blogs.
But if the trackers are free, it works out, right?
Is there any of your repos already doing this or in development to do so, coincidentally???
This is the repo i am working on:
https://github.com/worldpeaceenginelabs/CLOUD-ATLAS-TRUE-P2P
The text was updated successfully, but these errors were encountered: