Evergrow Logo CoreGRID Logo
   
IST-2001-33234

PEPITO

 

P2PKit/P2PS: Memoires 2005/2006


P2PKit provides a set of abstractions for programming on top of the Mozart/Oz P2PS library. P2PKit was initially developed within the PEPITO[1] project. Development is continuing with funding from Evergrow and support from CoreGRID.

A number of UCL students are using P2PKit and P2PS for their memoires in the academic year 2005/2006. This page is for information useful and particular to them.

Name: login topic
Julien Lociurojulien.lociuroService Management for P2PKit
Thibaut Lenfantt.lenfantTransactions for P2PKit
Benoit De Remontbenoit.deremontTransactions for P2PKit
Anh Tuan Tang Macanh.tangmacReliable broadcast/key-based routing
Guy Henrardguy.henrardReliable broadcast/key-based routing
Alain Damiralalain.damiralSecure Communications in P2PKit
Damien Leroy (Intro to Research)damien.leroyGroups and Replicated Data Storage

Let's Get Started (the recommended way)

Here are some quick instructions for installing the required software and getting a network of P2PKit peers up and running.

Install Required Libraries

Libraries are available as Mozart Packages, use ozmake to install them. ozmake is included with Mozart, the ozmake documentation will tell you how to install the packages.

On all machines which will run either a P2PKit peer or a P2PKit client you must install my utility package of goodies from here.

On the machines where you will run peers you must install the P2PS library and the P2PKit Peer library. There are two versions of the P2PS library, one without debugging and one with lots of debugging. The P2PKit Peer library is here.

On the machines where you will run P2PKit clients you must install the P2PKitClient library.

Run an OzStore Server

We use OzStore, a simple persistent dictionary server, to store the addresses of all the peers currently available in the network. It must be running on a machine accessible from all the machines that will run peers or clients. To start the OzStore service, first download and compile the OzStore.oz code and then run an instance of the OzStore,
ozengine OzStore.ozf -t <path to OzStore ticket file>
Peers and clients will need to be able to load the OzStore ticket file in order to exchange information with the OzStore server, therefore it is useful to put the ticket file in a directory where it can be accessed via an url. For example, I usually run
ozengine OzStore.ozf -t ~/public_html/OzStoreTicket
Now peers and clients can talk to OzStore via url http://www.info.ucl.ac.be/~glynn/OzStoreTicket.

There are other options to ozmake, see the help information:

@s-ensor:memoire 4Q> ozengine OzStore.ozf --help
Usage: OzStore.ozf [option]
Options:
        -v <level>, --verbose <level>           Verbosity level
        -i, --init                              Create Empty Database
        -t <ticketfile>, --ticket <ticketfile>  Ticket File (default: /usr/staff/glynn/public_html/OzStoreTicket)
        -n <dbname>, --dbname <dbname>          Database Name (default: /usr/staff/glynn/.ozstore.db)
        -a <ip address>, --ipaddr <ip address>  Force this address in tickets (default: ask system)
        -p <port nr>, --port <port nr>          Force listen on this port (default: system picks)
        -h, --help                              This help
@s-ensor:memoire 4Q>

Start a Peer-to-Peer Network

Download and compile Node.oz, then create your network's first peer by
ozengine Node.ozf -m --network blabla --ozstoreticket=http://www.info.ucl.ac.be/~glynn/OzStoreTicket
where blabla is a unique name for your network. Then you can start as many other nodes as (and whenever) you like by
ozengine Node.ozf --network blabla  --ozstoreticket=http://www.info.ucl.ac.be/~glynn/OzStoreTicket
(i.e., without the -m argument). All the nodes started with the same network name will find each other via OzStore. You can also start with tracing by adding the -v <tracelevel> argument to your calls. Currently -v10 will get all possible tracing. Nodes can be started on different machines.

There is help for Node.ozf too:

@s-ensor:memoire 4Q> ozengine Node.ozf --help
Usage: Node.ozf [option]
Options:
        -m, --master                            Create New Network (default: false)
        -p <n>, --peers <n>                     Start <n> virtual peers (default: 1)
        --ozstoreticket <ticketfile>            ozstore ticket file (default: http://www.info.ucl.ac.be/~glynn/OzStoreTicket)
        -n <network>, --network <network>       Create/join <network>
        -v <level>, --verbose <level>           Verbosity level
        -h, --help                              This help
@s-ensor:memoire 4Q>

P2PKit Clients

Once you have a running peer-to-peer network you can install and invoke services via clients. Many small, sample clients are provided in opi_p2p.oz which can be run directly from the Oz OPI (you will have to fix the variables in the first few lines to refer to your OzStore and your peer-to-peer network).

The Control GUI is a useful and fun application that visualises your network, showing the network's topology and various statiustics about the peers.

To run the ControlGUI call

ozengine ControlGUI.ozf --network=blabla --ozstoreticket=http://www.info.ucl.ac.be/~glynn/OzStoreTicket

For more help:

@s-ensor:memoire 4Q> ozengine ControlGUI.ozf --help 
Usage: ControlGUI.ozf [option]
Options:
        -n <network>, --network <network>       Connect to <network>
        -w <earth img>, --world <earth img>     World view (PlanetLab only)
        -t <ticket>, --ticket <ticket>          Force Connection to this client ticket
        --ozstoreticket <ticketfile>            ozstore ticket file (default: http://www.info.ucl.ac.be/~glynn/OzStoreTicket)
        -v <level>, --verbose <level>           Verbosity level
        -h, --help                              This help
@s-ensor:memoire 4Q>

Finally, PActive.oz is a little application that prints all the peers that have registered with the OzStore:

ozengine PActive.ozf --network=blabla --ozstoreticket=http://www.info.ucl.ac.be/~glynn/OzStoreTicket

Access to P2PKit and P2PS Source Repositories

P2PKit and P2PS source are available from CVS repositories. If you have access to UCL/INGI staff accounts then you can check them out and hack on them yourself.

For P2PS:

   cvs -d<username>@ssh2.info.ucl.ac.be:/ingi/tools/cvs co s_chord
For P2PKit packages (P2PKitPeer, and P2PKitClient, and Util):
   cvs -d<username>@ssh2.info.ucl.ac.be:/ingi/tools/cvs co mogul
For P2PKit Software and Documentation (web page, P2PKit applications, sample services):
   cvs -d<username>@ssh2.info.ucl.ac.be:/ingi/tools/cvs co p2pkit

Kevin Glynn (kevin.glynn@gmail.com)

[1] PEPITO is a project funded by the EU IST FET proactive initiative on Global Computing

Attachments:
keving-lib-util-1.3.pkg
cetic_ucl-p2ps-2.5.pkg
dbg_cetic_ucl-p2ps-2.5.pkg (debug version)
keving-p2p-P2PKitPeer-1.12.pkg
keving-p2p-P2PKitClient-1.8.pkg
Node.oz
OzStore.oz
ControlGUI.oz
opi_p2p.oz
PActive.oz