You are not logged in.
Pages: 1
Hi guys,
I'll be writing a program soon, that will be decentralised (without server). I know its possible. But how...
If my program can find at least one client, that client can tell the other one some other IP's.
You can do it like this:
-Connect to a certain port and check the service. => check 255^4 ip's to check (in ipv4!)...
-Broadcast a message (aka ping 255.255.255.0 ) and see who answers with the right bytes/strings.
How's it done? I know some torrents do it like this...
Ruben
Last edited by rubdos (2011-10-22 19:49:33)
Offline
There are several possibilities... And broadcasting is not one of them .
- You can maintain a list of IPs in a centralized place (I think StealthNet did this.) Not the best option.
- You can use a DHT (or BitTorrent's DHT) to store the IPs of users. Like kademlia for eMule. Each client needs a list of IPs to "bootstrap" the DHT. If the list becomes empty or all IPs invalid, the user (or client) needs to download a fresh list from somewhere.
- You can adopt a "friend to friend" topology, and then it's up to each user to enter the information of each friend. For people with a dynamic IP address, they can use dyndns, or again a DHT to inform others of their new IP, or even use the network of friends to propagate their new IP. See RetroShare.
Last edited by stqn (2011-10-23 11:44:20)
Offline
There are several possibilities... And broadcasting is not one of them
.
- You can maintain a list of IPs in a centralized place (I think StealthNet did this.) Not the best option.
Yup, not decentralised...
- You can use a DHT (or BitTorrent's DHT) to store the IPs of users. Like kademlia for eMule. Each client needs a list of IPs to "bootstrap" the DHT. If the list becomes empty or all IPs invalid, the user (or client) needs to download a fresh list from somewhere.
So basically, I make a txt file on a server around the world, which holds some ip's. The rest of the IP's can be downloaded by the client.
- You can adopt a "friend to friend" topology, and then it's up to each user to enter the information of each friend. For people with a dynamic IP address, they can use dyndns, or again a DHT to inform others of their new IP, or even use the network of friends to propagate their new IP. See RetroShare.
Mmm... I think I'll do it the second way.
Thanks!
Last edited by rubdos (2011-10-23 15:19:28)
Offline
Umm, a DHT is a distributed hash table. It isn't just a bunch of text files. You need to actually have a lookup table that is distributed across several or more clients.
In Zen they say: If something is boring after two minutes, try it for four. If still boring, try it for eight, sixteen, thirty-two, and so on. Eventually one discovers that it's not boring at all but very interesting.
~ John Cage
Offline
That's what I'm planning to do! Thanks guys.
To be opensource (the resulting app WILL be opensource, if succeeds):
Clients will have at least one ip in a local file.
Every time the system starts, it will poll the ip's in that list for more IP's and append it to that list. The list will be sorted on how much chance there is to be able to connect to one...
Ruben
Offline
Pages: 1