|
6 January 2005 21:04 by James "Dela" Delahunty
Consisting of just 16 lines of Python code, the worlds smallest P2P application, TinyP2P, was written by Ed Felten, with help from Alex Halderman. Edward W. Felten is a Professor at Princeton University and Alex Halderman is a PhD student in computer science at Princeton University. It was written to prove how easy it is to write a P2P application, and it has shown that any programmer with moderate skills could come up with their own P2P application. For this reason, both men believe that it's near possible to regulate P2P and/or to ban it completely.
The program creates a small-world network, which might be used by a group of friends or business associates to share files. The program does not work well for very large networks; instead, many small networks can coexist. Each network is protected by a password; a network can be accessed only by people who know its password. (But networks are not secure against attackers who can eavesdrop on their traffic.) The program uses the HTTP and XML-RPC communication protocols. The program can be run in either server or client mode. To run it as a server you would have to type the command:
python tinyp2p.py password server hostname portnum [otherurl]
Here password is the password for the network, hostname and portnum will be used to construct the URL on which the server will listen (http://hostname:portnum), and otherurl (which is optional) is the URL of another server that is already running as part of the network. (Otherurl will be used to hook up your server to the network. If you don't provide an otherurl, the program will assume that your server is starting a new network.) When run as a server, the program connects to a network of other servers, and makes all of the files in the current directory available for downloading by users of the network. To run the program in client mode you would type the command:
python tinyp2p.py password client serverurl pattern
Here password is the network's password, serverurl is the URL of a server that belongs to the network, and pattern is a character string. This command looks at every file being shared by every server on the network. A file is downloaded, and stored in the current directory, if two things are true: (a) the file's name contains the substring pattern, and (b) there is not already a file of the same name in the current directory.
The TinyP2P code can be downloaded here.
Source:
Freedom-to-tinker.com
Permalink to this article
| |
Related articles:
P2P networks are here to stay (23 January 2005)
|
|
|
|
|
|
Latest newsLatest news from AfterDawn.com. Japanese man marries virtual video game character 25 Nov, 2009 | 9 comments 'Wii Bubble could be deflating,' says analyst 25 Nov, 2009 | 5 comments Kindle 2 adds PDF support, large battery life improvement 25 Nov, 2009 | 1 comment Facebook app very popular on Xbox 360 25 Nov, 2009 | 2 comments New York to send emergency broadcast alerts via XBL 25 Nov, 2009 Panasonic to use Winter Olympics to promote 3D 25 Nov, 2009 Redbox launches iPhone app 25 Nov, 2009 Wii adds pay-per-view service 25 Nov, 2009 | 5 comments Legal music sales in Sweden jump following piracy crackdown 24 Nov, 2009 | 14 comments Microsoft patents in-game guides, video help 24 Nov, 2009 | 13 comments RIM, Motorola sued over visual voicemail 24 Nov, 2009 | 3 comments Google Maps Navigation now available for Android 1.6 users 24 Nov, 2009
More news... 
Search for headlinesSearch through our news archive. 
Latest threadsRecently updated discussion threads. More... 
Last week's most popular software downloads
Most popular devicesLast week's most popular products in our product comparison service. More products... 
Top linksMost popular links - Blasteroids.com
Download game trailers, demos and more - TorrentReactor.Net
The most active torrents on the web - Digital-Digest
Latest DivX, XviD, DVD, Blu-Ray, HD DVD News - OpenSubtitles.org
download DivX subtitles from the biggest open database - CDRInfo.com
The Hardware Authority - DVDHelp.us
DVD help, tutorials, FAQ, and very popular free help forum! - dvd ripper
rip DVD to VCD, DivX, MPEG, SVCD, AVI easily and quickly. - Torrentreactor.TO
The most active torrents on the web

|