22
Breadbox p2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns

P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns

Embed Size (px)

Citation preview

Page 1: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns

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

OverviewObjectiveBackgroundDesign

PastryData ManagerClient

Future ImprovementsDemoQuestions

Page 3: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns

Project ObjectiveStorage that is:

PersistentAvailableReliableInexpensiveSecure

Page 4: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns

P2P Systems(Past/Present)NapsterGnutellaFreenetOceanstoreBitTorrent

Page 5: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns

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

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

PastryStoring stateRoutingMaintaining state

Page 8: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns

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

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

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

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

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

State maintenance: heartbeatNeighbors

Page 14: P2p file storage and distribution Team: Brian Smith, Daniel Suskin, Dylan Nunley, Forrest Vines Mentor: Brendan Burns

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

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

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

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

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

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

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

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

Demo