![Page 1: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/1.jpg)
Breadboxp2p file storage and distribution
Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest VinesMentor: Brendan Burns
![Page 2: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/2.jpg)
OverviewObjectiveBackgroundDesign
PastryData ManagerClient
Future ImprovementsDemoQuestions
![Page 3: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/3.jpg)
Project ObjectiveStorage that is:
PersistentAvailableReliableInexpensiveSecure
![Page 4: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/4.jpg)
P2P Systems(Past/Present)NapsterGnutellaFreenetOceanstoreBitTorrent
![Page 5: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/5.jpg)
Hierarchical Design
Client
Java RMIData Manager
Pastry API
Pastry
![Page 6: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/6.jpg)
Architectural Design
ClientData
ManagerPastry
ClientData
ManagerPastry
Pastry Overlay Network
Node A Node X
![Page 7: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/7.jpg)
PastryStoring stateRoutingMaintaining state
![Page 8: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/8.jpg)
Storing stateLeaf set
Closest numericallyFinal routing
Neighborhood setLocality, upkeep
![Page 9: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/9.jpg)
Storing StateRouting table
Structure based on IDs
![Page 10: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/10.jpg)
RoutingOption 1: Leaf set
FastestOption 2: Routing table
Prefix-basedOption 3: Other
RandomizedOption 4: Deliver
![Page 11: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/11.jpg)
State maintenance: new nodesTwo phases
Request Build state for new node
Announce Tell others to add to state
![Page 12: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/12.jpg)
State maintenance: old nodesLazy
Routing failsAsk other nodes for new state. Either:
Leaf set Neighborhood set A single routing table entry
![Page 13: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/13.jpg)
State maintenance: heartbeatNeighbors
![Page 14: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/14.jpg)
ScalabilityUntested
But works in theoryState scales well
ID maximum digits x ID representation base + M + L
![Page 15: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/15.jpg)
ReliabilityLargely untested, but:
Lazy repairLow chance of entire leaf set going down
![Page 16: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/16.jpg)
Server/Data ManagerService that is run on each node of the networkConnection between client and pastry substrate
Client
Data Manager Service
Client
Data Manager Service
Pastry
![Page 17: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/17.jpg)
Data StorageService manages local file chunks
Data Manager Service
Data Chunk
Data Chunk
Data Chunk
![Page 18: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/18.jpg)
Scalability and Reliability:ReplicationEach node is responsible for replicating chunks whose
Ids are closest to its nodeIDEach chunk is replicated to the n closest nodesChunks that are no longer within the closest n will
timeout
![Page 19: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/19.jpg)
Client: Put
FILE DATA
CHUNK
MANAGER
compresschunk
send
log
LOG
![Page 20: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/20.jpg)
Client: Get
FILE DATA
CHUNK
MANAGER
decompress
unchunk receive
LOG
GET
check
request
![Page 21: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/21.jpg)
Future ImprovementsPastry
Security (Malicious Nodes)Manager
CachingMessage aggregation
ClientHash CheckGUIEncryption
![Page 22: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649f205503460f94c3847e/html5/thumbnails/22.jpg)
Demo