User User name Password  
   
Wednesday 25.11.2009 / 10:43 PM
Search AfterDawn.com:        In English   Suomeksi   På svenska
afterdawn.com > news > tinyp2p, the world's smallest p2p application
Show topics
News
News

TinyP2P, the world's smallest P2P application

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

Get AfterDawn's news to your favourite feed reader! Share this story with your friends!
 

 
Related articles:

  • P2P networks are here to stay (23 January 2005)
  •  

    « Previous news article
    Apple sued over iTunes-iPod tie
    Next news article »
    iTunes launches in Ireland
    Discuss this article! 
     Post your comment
     

    Subscribe to our newsfeed

    Get the latest headlines delivered directly to your favourite RSS reader or content aggregation service by using the links below.

    AfterDawn.com: News - RSS feed
    Add to Google
    Add to My Yahoo!
    Add to MyMSN

    Search for headlines

    Search through our news archive.

    Last week's most popular software downloads

    Digital video: AfterDawn.com | AfterDawn Forums
    Music: MP3Lizard.com
    Gaming: Blasteroids.com | Blasteroids Forums | Compare game prices
    Software: Software downloads
    Blogs: User profile pages
    RSS feeds: AfterDawn.com News | Software updates | AfterDawn Forums
    International: AfterDawn in Finnish | AfterDawn in Swedish | download.fi
    Navigate: Search | Site map
    About us: About AfterDawn Ltd | Advertise on our sites | Rules, Restrictions, Legal disclaimer & Privacy policy
    Contact us: Send feedback | Contact our media sales team
     
      © 1999-2009 by AfterDawn Ltd.