150 likes | 244 Views
Simple PEer to peER File System (SPEERFS). Done by: Assaf Waksman Benny Pano Supervised by: Uri Schonfeld On Spring 2005. Background. P2P – A way of sharing information among many equal work stations File System – A database that supports and stores information units called files.
E N D
Simple PEer to peERFile System(SPEERFS) Done by: Assaf Waksman Benny Pano Supervised by: Uri Schonfeld On Spring 2005
Background • P2P – A way of sharing information among many equal work stations • File System – A database that supports and stores information units called files. • A need for sharable space that holds file-system instances arises: Achieves availability of information everywhere, as well as decrease in bandwidth load over a single server.
Objective Designing and implementing a distributed file system with a P2P approach. The system will let a user the ability to mount and use roots, which will be shared among the peers.
Considerations and Assumptions • The files are small • There are no sudden crashes of peers • A peer’s bandwidth is of domestic type • There are no simultaneous reads and/or writes to the same file (not including directories)
System’s goal characteristics • Scalable P2P network • Maintain data integrity • Equality among peers • Support basic FS operations needed by the OS • Ease of use
SPEERFS Architecture overview Create / Delete roots Create / Delete / Write / Read roots, files, directories Interface / Driver File-System Find a value’s holder P2P
NFS Protocol • Client Server relationship • Gives the ability for remote users to mount a file system that populates the server • Uses the RPC mechanism • Supports {READ, WRITE, CREATE, REMOVE, MKDIR, RMDIR, READDIR, etc.} remote procedure calls
Chord Protocol • Each peer has a unique value. • Each peer has a successor and a predecessor in the network. • A peer is responsible for a values’ range between his predecessor and himself. • When a new peer joins the network, his successor’s responsibility range is updated accordingly.
Chord Qualities • Maintains scalability • Search for a value: O(logN) • Join / departure of a peer: O((logN)^2) • Maintains data integrity and organization
File-System’s Data Structures • Every file in the file system is physically stored by the appropriate peer, according to the chord protocol. • Each peer has a database file that holds a list of all the files stored by this peer. • Each directory in the file system has a physical database file that contains a list of all the content of that directory. • The system supports passwords enforcement.
System’s Packages Were made: • chord – supports the ChordPeer class • com – supports communication operations • misc – stores helper classes • scome – supports the ScomePeer class Was altered: • nfsserver – implements an NFS server and contains the main method Was used: • org.acplt.oncrpc – implements the RPC mechanism needed by the NFS server
Major Classes • Peer – supports communication’s and basic peer’s functionality. • ChordPeer – inherits from Peer and implements the chord protocol. • ScomePeer – inherits from Peer and supports file system’s functionality. • Listener – Receives messages from other peers and initiates their handling.
Future Improvements • Handle simultaneous joins of peers to the chord network • Handle hostile messages • Support file links in the SCOME layer • Support multiple copies of files’ data • Limit the amount of data a peer can hold • Write a designated driver for the OS • Encrypt and compress messages and databases