Professional Documents
Culture Documents
Client-server
Peer-to-Peer (P2P)
clients:
communicate with server
client/server may be intermittently
connected
may have dynamic IP addresses
do not communicate directly
with each other
application application
socket controlled by
process process app developer
transport transport
application underlying
application layer protocol transport protocol
www.someschool.edu/someDept/pic.gif
time
6. Steps 1-5 repeated for each of
10 jpeg objects
ebay 8734
usual http request msg Amazon server
cookie file creates ID
usual http response
1678 for user create backend
ebay 8734
set-cookie: 1678 entry database
amazon 1678
usual http request msg
cookie: 1678 cookie- access
specific
usual http response msg action
msecs
Cost: increased access link speed (not cheap!)
Kurose & Ross 2-35
Caching example: install local cache
assumptions:
avg object size: 100K bits
avg request rate from browsers to
origin servers:15/sec origin
servers
avg data rate to browsers: 1.50 Mbps public
RTT from institutional router to any Internet
origin server: 2 sec
access link rate: 1.54 Mbps
or “close by”
Also possible to specify a Public DNS
gaia.cs.umass.edu
examples:
file distribution
(BitTorrent)
Streaming (KanKan)
VoIP (Skype)
time to distribute F
to N clients using Dc-s > max{NF/us,,F/dmin}
client-server approach
time to distribute F
to N clients using DP2P > max{F/us,,F/dmin,,NF/(us + ui)}
P2P approach
increases linearly in N …
… but so does this, as each peer brings service capacity
Kurose & Ross 2-71
Client-server vs. P2P: example
client upload rate = u, F/u = 1 hour, us = 10u, dmin ≥ us
3.5
P2P
3
Minimum Distribution Time
Client-Server
2.5
1.5
0.5
0
0 5 10 15 20 25 30 35
N
Alice arrives …
… obtains list
of peers from tracker
… and begins exchanging
file chunks with peers in torrent
application application
socket controlled by
process process app developer
transport transport
network network controlled
link by OS
link Internet
physical physical
write reply to
serverSocket read datagram from
specifying clientSocket
client address,
port number close
clientSocket
write reply to
connectionSocket read reply from
clientSocket
close
connectionSocket close
clientSocket