Upload
mickey
View
33
Download
1
Embed Size (px)
DESCRIPTION
incentive mechanism as a solution of the free riding problem. Design Document of P2P simulator 19971241 김종욱. content. design requirement simulator initialization simulation simulation end peer protocol network. Design requirement. easy to change protocol ex) Chord and others - PowerPoint PPT Presentation
Citation preview
incentive mechanismas a solution of the free riding problem
Design Document of P2P simulator19971241 김종욱
content
design requirement simulator
initialization simulation simulation end peer protocol network
Design requirement
easy to change protocol
ex) Chord and others peer action model
ex) with free riding mechanism, or not network topology
Simulator
Peer
P2P Protocol
Network
Peer
P2P Protocol
Peer
P2P Protocol......
Topology
EventTimer
•global
Simulator
P2PSystem
Initialization
simulator
network peer factory
peer
protocol
job queue
1
2
3
4
5
topology
6
chord
Simulation
PeerProtocol
query
Networksend(src, trg, packet)
jobqueue
workerthread
dequeue
queue( job, delay )
simulator
start
receivereturn result
joinleave
topology
latency
Simulation end
condition all peers leave the system there's no shared thing in the system
Event Thread
Event Object attribute
who label to execute args time to execute
interface void doAction( label, args )
using time priorty queue simplely run who.doAction( label, args )
EventTimer EventQueue
EventThread
schedule( Event e, delay ) queue( Event e, delay )
schedule( Event e )
dequeue()
delay = 0
- time priority queue- time 이 같다면 먼저 들어온 event 가 우선순위를 가진다 .
getCurrentTime()
- simulation 의 현재 시간
Event Thread
dequeue
current <request time
update current time
yes
do job()
Peer
start
if enough
makeToBDownload List
increasewaitCntr
if waitCntr> Threshold
No
Leave the system
wait random times
choose a fileto download
download
wait for random times
SimplePeerModel without free riding control mechanism
SimplePeer( Detail )
Peer
Protocol
Global File List
Shared File List
Downloaded File List
To Be DownloadList
querydownload
WaitCntr and ETC
network
node(nid) node(nid) node(nid)......
protocol protocol protocol
peer peer peer
topology
eventtimer
p2psystem
initialization
simulator P2P system peerprotocolnetworktopology
initinit
init
init with peer info
joinjoin
start
peerfactory
init
create peers
init
SimplePeer(flow)
Peer P2PSystem Protocol
get global file list
return
make a list to be download
if not enoughWaitCntr++& retry
select a file
request download
location return
download complete
sleep for a while
query
get file location
return file location
Protocolon another
Network
send
generate receive event
send dummy datareceive data event
leave
leave
Peer Protocol Network
query( callee, what )
query_result : query, pid list
download( callee, filename, pid )
send( src nid, trg nid, download request )
receive( src nid, download complete )
Protocol
receive( src nid, download request )
senddummy( src nid, trg nid, size )
download complete event: filename
P2P system global variable
File
FID Size
peer
sharedFileList
sharingpeerlist
PID
USER P2P application
join
leave
query
download
P2P Protocol
Protocol
SimpleProtocol query
always successful searching
Chord
Network
SimpleNetwork the latency between peers is zero bandwidth : constant k
implement others on demand
network
topology
latency(src,trg) bandwidth
protocol
send(src,trg, packet)