seminar 4: peer-to-peer systems - karlstad university · 2010-04-26 · seminar on peer-to-peer...
TRANSCRIPT
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 1
Topics in Computer Networks 2010
Seminar 4:
Peer-to-Peer Systems
Marcel C. Castro
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 2
Motivation
Internet Study
http://www.ipoque.com/resources/internet-
studies/
� Peer-to-Peer Systems:
� It is the dominating traffic type in the internet
� Based on application overlay routing
Protocol Type Distribution, Germany 2007
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 3
Seminar 4: Peer-to-Peer Systems
�Client-Server concept
�Understanding P2P
�P2P and Wireless Networks
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 4
Client-Server Model
� Simple Architecture
� Powerful central entity to host:� the whole resource index
� global management of resources (i.e. access rights etc)
� Low cost in messages for discovery
� Increase of clients may degrade the quality of service
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 5
Why (not) Client-Server Model
�Advantages:
� Fast and guaranteed discovery (if resource exists)
� Easy to deploy and charge system-wide services
� Easy to retain resource consistency
� Facilitates configuration for maximum security of delivered services
�Weaknesses:
� Single point of failure
� High initial installation and maintenance cost
� Performance bottleneck – scalability issue
�Preferable in small environments
� Good in relatively predictable growth patterns.
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 6
Seminar 4: Peer-to-Peer Systems
�Client-Server concept
�Understanding P2P
�P2P and Wireless Networks
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 7
Understanding P2P
� Issues addressed by P2P
� Eliminate the control that can be imposed on clients
� Provide high availability
� Provide scalability
� Provide privacy
� How to address them
� By distributing the logic and the resources
� By expanding horizontally not vertically (collaboration)
� By adapting to network changes on the fly
� By using direct client-to-client communication
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 8
P2P definition
�A self-organizing, distributed
network of entities which
contribute their individual
resources and collaborate in order
to reach the goal for which the
network was built.
� P2P networks are those which exhibit 3 characteristics:
� self-organization
� distributed control / resources
� symmetric communication Dan Pascu, “Overview of P2P SIP
Principles & Technologies”. Int. SIP Conf.
2007.
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 9
P2P Overlays
� No central entity: distribution among all nodes of� the whole resource index
� global resource management (i.e. access rights etc)
� Direct communication between nodes � Each node acts as both resource requestor and provider
� Application specific networks
� Increase of nodes may improve the quality of service
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 10
Why (not) P2P Overlays
�Advantages
� Robust and fault-resilient architecture
� Low installation and maintenance cost
� Enables inexpensive resource redundancy
�Weaknesses
� Slower not always guaranteed discovery
� Frequent join/leave actions of nodes
� Heterogeneous node capabilities
� High discovery cost– scalability issue
� Distributed data storage is hard to do in a consistent way
�Suitable for large systems
� unpredictable growth patterns
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 11
Overlay definition
� An overlay network is a virtual network of nodes and logical
links that is built on top of an existing network with the
purpose to implement a network service that is not available in
the existing network. (by I. Stoica)
� A P2P network is an overlay itself (over TCP/IP)
� E.g. of services:
• Routing (Resilient Overlay Networks, BGP routing, MPLS)
• Security (VPN)
• Application-level Multicast
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 12
IP
Overlay networks
Overlay
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 13
Overlay networks
IP
Overlay
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 14
P2P Overlay Classification
� Level of Centralization
� Hybrid: node grouping with central index
� Pure: no centralised entity – equal nodes
� Resource Location
� Unstructured: any node may host any resource
� Structured: resources are hosted by well-defined nodes
G. Exarchakos , “P2P Overlays for
Scalable Service Access”. ICCGI’08.
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 15
P2P overlay design
1. Choice of identifier space (IS)
- 128 bits overlay identifier
2. Map resources and peers to IS
- HASH(MAC, IP, or Locality)
3. Management of the IS by
peers (or Resource Location)
- Unstructured, structured
4. Routing strategy
- Flooding, random walk, Finger table
(Chord)
5. Maintenance strategy
- Proactive (probe), or reactive
correction
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 16
Management of the Identifier Space
�Local (Unstructured P2P)� Each peer only indexes its own content and flood queries widely
� Can perform complex searches (rich queries not just key lookups
� Blind techniques: random forwarding from node to node.
e.g.: Gnutela
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 17
Management of the Identifier Space
�Unstructured P2P
�Advantages
� Fast lookup
� Low join and leave overhead
� Popular files are replicated many times
�Weaknesses
� Not 100% success rate
� Very high communication overhead
� Uneven load distribution
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 18
Management of the Identifier Space
�Distributed (Structured P2P)
� Also known as Distributed Hash Table (DHT)
� Efficient key lookup / routing (no flooding)
� Can perform only exact key lookups
� Many recent academic systems –
• CAN, Chord , Kademlia, Pastry, Tapestry, Viceroy, Bamboo.
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 19
IDEA:
�Route a packet based on a key to the node in the
network that is currently responsible for the packet's
key.
� This process is referred to as indirect or key-based
routing.
DHT - Distributed Hash Table
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 20
K6
K46
K36
N1
N8
N14
N21
N32
N38
N42
N48
N51
� Large id space
DHT - Distributed Hash Table
root nodefor key
id space
nodeId
key
64 |0 (6 bits)
�NodeIds picked randomly from space
�Hash[192.168.1.1] = N1
�Keys picked randomly from space
�Hash[picture.jpg] = K46
�Key is managed by its root node:
� Live node with id closest to the key
� location of object or
actual object
Overlay
IPIP
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 21
Key-based routing
K46
N1
N8
N14
N21
N32
N38
N42
N48
N51
nodeId
key
Who’s respfor file K46
file K46stored here
I am
O(N) messages
on avg to resolve
query
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 22
The Chord DHT overlay
� Uses SHA-1 hashes (160 bits)
� Maps nodes and keys to a ring
� O(log N) lookup performance
� O(log N) routing table size
� Supports join and leave operations
for maintaining the network
� It basically supports one operation:
lookup a node for a given key
� Each node handles the resources which have their hashes mapped between the
node itself and its predecessor
file K46 ?
� Each node knows its predecessor, successor and keeps a list of successor nodes
known as the finger table, which is used to improve lookup performance and increase
fault tolerance
� If a lookup doesn’t yield a local resource, it is forwarded to the node in the finger
table which has the closest hash value preceding the hash of the queried resource
I. Stoica, et. al., “Chord: A Scalable Peer-topeer
Lookup Service for Internet Applications”, SIGCOMM’01
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 23
Tradeoff of routing table size
vs. network diameter
Full Mesh
Ring
Chord
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 24
Management of the Identifier Space
�Structured P2P
�Advantages
� Scalability: O(log N) routing
� Load-balancing
� Overlay robustness
�Weaknesses
� No control where data is stored
� Complex queries are not possible
� Join and leave overhead
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 25
Outline
�Client-Server concept
�Understanding P2P
�P2P and Wireless Networks
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 26
Challenges of P2P in Wireless Environments
�Differences between the Internet and a Mobile Wireless Networks:
� Bandwidth limitation
� Multi-access interference
� Node mobility
• Churn (frequent node joining and leaving the network)
� Limited energy
� State-efficiency trade-off
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 27
Example: P2P and Mobile Ad-hoc Network
Physical, to all nodes in
transmission range area
Virtual, multiple unicastsBroadcast
MobileFixedPeer Mobility
Proactive, reactive,
hybrid
Proactive, reactive,
hybrid
Routing
Physical structure
corresponding to logical
structure
Physical apart from
logical structure
Structure
Restricted areaAny Internet pointPeer location
Low ( wireless
connections)
High ( physical
connections)
Connection
confidence
Wireless and indirectFixed medium and directConnection Between
two nodes
A physical infrastructure
to provide connectivity
Logical infrastructure to
Provide a service
Motivation for
Creating the network
MANETP2P Networks
Physical, to all nodes in
transmission range area
Virtual, multiple unicastsBroadcast
MobileFixedPeer Mobility
Proactive, reactive,
hybrid
Proactive, reactive,
hybrid
Routing
Physical structure
corresponding to logical
structure
Physical apart from
logical structure
Structure
Restricted areaAny Internet pointPeer location
Low ( wireless
connections)
High ( physical
connections)
Connection
confidence
Wireless and indirectFixed medium and directConnection Between
two nodes
A physical infrastructure
to provide connectivity
Logical infrastructure to
Provide a service
Motivation for
Creating the network
MANETP2P Networks
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 28
How to integrate P2P and MANET
Key-based
routing MANET
(DHT routing)
Broadcast,
on demand
routing (AODV)
MANET
Routing
Structured,
DHT
Unstructured,
FloodingP2P techniques
1
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 29
ORION: Unstructure P2P over MANET
Qu
ery
Ph
ase
Re
spo
nse
P
ha
se
A. Klemm et al, “A special-purpose peer-to-peer file
sharing system for mobile ad hoc networks”.VTC 2003
1. Orion:
� Broadcast-based P2P lookup protocol over MANET on-demand routing protocols.
• Easy to implement
• Scalability problem
Strict layering of unstructured overlay approached on
top of wireless routing protocols is unlikely to work
in MANETs.
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 30
How to integrate P2P and MANET
Key-based
routing MANET
(DHT routing)
Broadcast,
on demand
routing (AODV)
MANET
Routing
Structured,
DHT
Unstructured,
FloodingP2P techniques
2
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 31
Bamboo/AODV: Structured P2P over MESH
2. Bamboo/AODV:� DHT-based P2P protocol
over MANET.
� P2P lookup can be scalable
� Underlying network routing protocol is based on broadcast
� Complexity of routing algorithm
• O(nlog n)
Fig. 1: : Impact of Bamboo Management traffic
0
200
400
600
800
1000
1200
4 9 16 25 36 49
Number of Nodes
To
tal O
verl
ay T
raff
ic (
Kb
ytes
)
NO management
CUSTOM management
STANDARD management
0,00
10,00
20,00
30,00
40,00
50,00
60,00
70,00
80,00
90,00
100,00
4 9 16 25 36 49
Number of Nodes
Su
cces
s R
atio
(%
)
NO management CUSTOM management STANDARD management
Fig. 2: Request Success rate
IPIP
A
B
A
B
OverlayOverlayA BA B
- Flooding is still necessary to discover routes and
maintain the DHT.
M. Castro et al, “Performance Evaluation of Structured
P2P over Wireless Multi-hop Networks”. MESH 2008
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 32
Oracle: Example of Overlay/Underlay interactions
� Oracle provided by an ISP
� Information is provided, like link delay, bandwidth estimations, etc.
� As input to the Oracle, a list of P2P nodes sharing a known content is given
and the list ranked according to different performance metrics is returned
from Oracle
� Results
� P2P applications won’t have to
perform such measurements by
themselves
� The Oracle gives ISPs a way to
control overlay routing
� Underlay to overlay
information exchange
improves overlay operations
and underlay network usage
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 33
Oracle: Example of Overlay/Underlay interactions
� Oracle provided by an ISP
� Information is provided, like link delay, bandwidth estimations, etc.
� As input to the Oracle, a list of P2P nodes sharing a known content is given
and the list ranked according to different performance metrics is returned
from Oracle
� Results
� P2P applications won’t have to
perform such measurements by
themselves
� The Oracle gives ISPs a way to
control overlay routing
� Underlay to overlay
information exchange
improves overlay operations
and underlay network usage
ALTO IETF Working Group:
(Application-Layer Traffic
Optimization )
Standardize information exchange
between applications and ISPs in order
to help in peer selection
ALTO IETF Working Group:
(Application-Layer Traffic
Optimization )
Standardize information exchange
between applications and ISPs in order
to help in peer selection
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 34
Caching: Example of Overlay/Underlay interactions
� Caching key-lookups to reduce
routing stretch:
� How much information can be
used by a node to reduce the
routing stretch?
• Use of current 2-hop neighbor
information in the hello
messages together with cache
information;
• How to gather Cache
information ?
– Key’s request that passes
through a node;
– Key’s request that nodes can
hear in its transmission range
(cross-layer information).
1000 Nodes: Stretch versus Node Density
1
1,5
2
2,5
3
3,5
4
~10 ~13 ~22 ~40
Node Density
Str
etch
default
NoN
NoN+Cache256
NoN+Cache-1
M. Castro et al, “Minimizing DHT Routing Stretch in
MANETs”. Adhoc'09, Sweden.
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 35
Georoy: Example of Overlay/Underlay interactions
� Georoy: a location-aware DHT for WMNs
� Mapping P2P Overlay to physical topology
• Able to obtain a small stretch factor
� It combines an unit ring topology and a butterfly
network topology
� Lookup performance of O(log n)
� Routing Table containing at most 7 entries
� Two-tier architecture
� Super Peers (SPs): provide
distributed resource
catalog.
� Leaf Peers (LPs): share and
request resources by
querying their associated
super peers.
� Home SP: responsible for
managing the point to the
LP’s physical location.
Leaf Peer
Super Peer
s - square region side R=[0,s)2
(x,y) - coordinate of peer in R
∆ – constant with 0 < ∆ < s
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 36
Georoy: Example of Overlay/Underlay interactions
� Simulations: ns-2
� Grid topology
� TwoRayGround propagation model
� AODV-UU routing
� Avg. of 100 random key lookups
� Comparison:
� Bamboo: better numb. of logical hops by
exploiting leafset information and routing
tables -> fast ring traversal
� Georoy: close-fitting mapping between
logical and physical hops
� Bamboo: small lookup latency for smaller
network size due to routing table
information
� Georoy: small lookup latency as number of
nodes increase -> logical and physical
topologies tightly coupled
• logical path is not very different from the
physical path.
M. Castro et al, “On the comparison between
performance of DHT-based protocols for opportunistic
networks”. FUNEMS, Italy, 2010.
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 37
Overlay networks in Wireless Context
� Interaction between Overlay networks and Underlay required!
� To enable ISPs to perform efficient traffic engineering by enabling traffic
control
� To enable overlays to create better overlay structure/topology
� To reduce overhead as overlay probe network for bandwidth
availability/delay
� Example: Wireless Mesh Networks as Underlay
� Increases the problem due to interference and control traffic overhead
� Multi-Channel operation required to allow higher capacity
� Internet Gateways are a strong topology element � could optimize the
overlay
� Need to engineer channel assignment to match with traffic demands and
topology
� Cross-layer approach can create an information exchange between
Overlay and Mesh Underlay
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 38
References
1. M. Gerla and C. Lindemann and A. Rowstron. “P2P MANET's - New Research Issues”. Perspectives Workshop: Peer-to-Peer Mobile Ad Hoc Networks -New Research Issues, 2005.
2. Thomas C. Zahn, “Structured Peer-to-Peer Services for Mobile Ad Hoc Networks”, PhD Thesis FU Berlin, 2006.
3. Jorg Eberspacher et al., “Structured P2P Networks in Mobile and Fixed Environments”HET-NETs04.
4. I. Stoica, R. Morris, D. Liben-Nowell, D. R. Karger, M. F. Kaashoek, F. Dabek, and H. Balakrishnan. “Chord: A scalable peer-to-peer lookup protocol for internet applications”. IEEE/ACM Transaction Network, 11(1):17–32, 2003.
5. M. Caesar, M. Castro, E. B. Nightingale, G. O’Shea, and A. Rowstron. “Virtual Ring Routing: Network routing inspired by DHTs”. In ACM SIGCOMM’06, pages 351-362, 2006.
6. T. Fuhrmann, P. Di, K. Kutzner, and C. Cramer , “Pushing Chord into the Underlay: Scalable Routing for Hybrid MANETs”, Technical Report, Universität Karlsruhe (TH) 2006-12, June 2006.
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 39
References
7. E. K. Lua, J. Crowcroft, M. Pias, R. Sharma, and S. Lim. “A survey and comparison of peer-to-peer overlay network schemes”. IEEE Communications Surveys, 7(2):72–93, 2005.
8. A. Klemm et al, “A special-purpose peer-to-peer file sharing system for mobile ad hoc networks”.VTC 2003.
9. K. Aberer, et al. The essence of P2P: a reference architecture for overlay networks. Fifth IEEE International Conference on Peer-to-Peer Computing, Sep 2005, Konstanz, Germany.
10. Y. Charlie Hu, Saumitra M. Das, and H. Pucha, "Peer-to-Peer Overlay Abstractions in MANETs“. Book Chapter in Theoretical and Algorithmic Aspects of Sensor, Ad Hoc Wireless, and Peer-to-Peer Networks,CRC Press, 2005.
11. T. Fuhrmann, “Performance of scalable Source Routing in Hybrid MANETs”. In Wireless on Demand Network Systems and Services (WONS), 2007.
12. L. Galluccio, G. Morabito, S. Palazzo, M. Pellegrini, M. E. Renda, and P. Santi. Georoy: A location-aware enhancement to viceroy peer-to-peer algorithm. Computer Networks, 2007.
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 40
Thank you!
Marcel C. Castro
www.cs.kau.se/~marccava
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 41
MANET - Mobile Ad-hoc Networks
�Mobile Ad-hoc Networks (MANET) consist of mobile
nodes communicating with each other using multi-hop
wireless links.
�Self-organization for communication.
�Self-healing to cope with network failures.
�Without (necessarily) using
a pre-existing infrastructure.
Sem
inar on Peer-to-Peer Systems
Mar
cel C
Cas
tro
Topics in Computer Networks 2010 • Seminar 4 42
Mandatory Reading
�"A survey and comparison of peer-to-peer overlay
network schemes” E. Keong Lua, J. Crowcroft, M. Pias,
R. Sharma, and S. Lim, IEEE Communications Surveys &
Tutorials, Second Quarter 2005, Volume: 7, Issue: 2 pp
72-93.
�"Theoretical and Algorithmic Aspects of Sensor, Ad Hoc
Wireless, and Peer-to-Peer Networks”. Y. C. Hu, S. M.
Das, and H. Pucha, CRC Press, 2005, ch. Peer-to-Peer
Overlay Abstractions in MANETs, pp. 858–871.