Developed a p2pweb application for content addressable peer-to-peer hypermedia sharing. A command line interface was developed for the protocol. Any p2pweb node has three logical components Content Provider, Content Tracker and Client Gateway. Content Provider publishes metadata of content into p2pweb and employs mechanisms to avoid loops. Content Tracker keeps track of the content being published into the p2pweb. Client gateway takes HTTP request from a client, and delivers the requested content from p2pweb to that client. Peers were connected using TCP Sockets and SHA-1 is used as message digest algorithm
INTERPLANETARY FILE SYSTEM
- NODE is a multi-threaded application consisting of teh following threads
- Server Thread accepts connection from other NODE
- HTTP thread handles the request from client gateway
- CLI thread accepts command from the user
- Client Thread connects to other Nodes.
COMPILATION
- MAKEFILE is included in the parent directory.
- make - To Compile
- make clean - To clean all object files
- Node.o takes two arguments
- ./Node.o [port to listen for peers] [port to listen for http] - To run
USAGE The following commads can be provided in the NODE command prompt
- peer <host_name> <port_number> : Connect to a Node
- show_peers : Shows the peer list
- publish : publish file to peers
- unpublish : unpublish file
- show metadata : shows the content publised
- show published : shows the content published by publisher
PROJECT TREE
/NODE
|
|__/src
| |
| |__NodeServ.c
| |__NodeCli.c
| |__NodeClnt.c
| |__NodeHttp.c
| |__NodeCommon.c
| |NodeApi.c
|
|/inc
| |
| |__NodeCommon.h
| |__NodeServ.h
| |__NodeCli.h
| |__NodeClnt.h
| |NodeHttp.h
|
|/obj
| |
| |__NodeCommon.o
| |__NodeServ.o
| |__NodeCli.o
| |__NodeClnt.o
| |__NodeHttp.o
| |__NodeApi.o
|
|__NODE.o