[Discuss] peer to peer software

Tom Metro tmetro+blu at gmail.com
Sun Jun 8 02:23:22 EDT 2014


Stephen Adler wrote:
> I'm looking to write a peer to peer application and was looking for some
> tool kits or libraries or other software bit which I could use to build
> my application. I did a quick search of peer to peer software...

Were you searching specifically for libraries?

I'd start by finding open source peer-to-peer applications that seem to
fit the architectural model that you think you'll need for your
application, and then dig into the code to see if they are using any
third party libraries, or if their code is directly reusable.

If nothing else, you should gather implementation and architecture ideas
from them.

So are there open source peer-to-peer applications that work similar to
the application you imagine?

Some to look at:
http://en.wikipedia.org/wiki/JXTA
http://en.wikipedia.org/wiki/Twister_%28software%29
http://en.wikipedia.org/wiki/Retroshare
and:
http://en.wikipedia.org/wiki/Peer-to-peer#Current_applications

and a library:
http://en.wikipedia.org/wiki/Libtorrent

The research and reference links are likely also worth a browse:
http://en.wikipedia.org/wiki/Peer-to-peer#Current_research


John Abreau wrote:
> Bittorrent historically used .torrent files that contained the address of a
> server, or "tracker", for locating peers sharing a particular file or set
> of files, but more recently it added something called a "magnet" uri that I
> understand is more of a peer discovery mechanism. Not sure how it works,
> but it may be worth looking into its design for ideas.

http://lifehacker.com/5875899/what-are-magnet-links-and-how-do-i-use-them-to-download-torrents

  A magnet link does away with the middleman. A magnet link is
  essentially a hyperlink containing the hash code for that torrent,
  which your torrent client can immediately use to start finding people
  sharing those files. Magnet links don't require a tracker (since it
  uses DHT...), nor does it require you to download a separate file
  before starting the download, which is convenient


The key bit is actually not the magnet link but the DHT - distributed
hash table[1]. The DHT is just a database that is spread across the
peers. Once you have the hash for a torrent - by obtaining a .torrent
file or via the magnet link - you can the find peers with that content
via the DHT.

1. http://en.wikipedia.org/wiki/Distributed_hash_table

 -Tom

-- 
Tom Metro
The Perl Shop, Newton, MA, USA
"Predictable On-demand Perl Consulting."
http://www.theperlshop.com/



More information about the Discuss mailing list