1. P2P Introduction

  • Upload
    paco449

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

  • 7/28/2019 1. P2P Introduction

    1/52

    Eng. Tcnica

    Telecomunicacions

    Mobile Communication Networks Simon Oechsner - 2013 1

    1. Introduction to P2P

    Simon Oechsner

  • 7/28/2019 1. P2P Introduction

    2/52

    Peer-to-Peer (P2P) removes the strict

    separation between clients and servers

    Peer-to-Peer

    Mobile Communication Networks Simon Oechsner - 2013 2

  • 7/28/2019 1. P2P Introduction

    3/52

    Peer-to-Peer

    Peer-to-Peer (P2P) removes the strict

    separation between clients and servers

    In P2P, all participants are equal (peers)

    and autonomous

    Mobile Communication Networks Simon Oechsner - 2013 3

    server at the same time (servents)

    P2P typically also means to implement

    application intelligence at the edges of

    the network

    In the user software, not in separate server

    installations

  • 7/28/2019 1. P2P Introduction

    4/52

    History of P2P

    First Wave P2P Systems (~1999):

    Napster: direct peer-to-peer communication, central index server

    Gnutella: fully decentralized, use of unstructured overlay networks

    Second Wave (2000~2002):

    Mobile Communication Networks Simon Oechsner - 2013 4

    , . ,

    eDonkey: distributed index servers, multi-source download

    Current Wave (2003~)

    BitTorrent: use of tracker (centralized rendezvous nodes), tit-for-tat

    Kademlia, Pastry, Chord : fast resource discovery, distributed hash tables

    PPLive, Tribler, ...: optimized for video streaming

    Skype

  • 7/28/2019 1. P2P Introduction

    5/52

    Impact of P2P

    Cisco Visual networking index, 2011

    Although video streaming is eclipsing P2P file-sharing traffic, itsshare is still significant

    The amount oftraffic still grows

    Mobile Communication Networks Simon Oechsner - 2013 5

    Video streamingcan containP2P trafficas well!

  • 7/28/2019 1. P2P Introduction

    6/52

    P2P and mobile networks

    Two main connections between P2P and mobile communicationnetworks in the context of this course:

    Mobile Communication Networks Simon Oechsner - 2013 6

  • 7/28/2019 1. P2P Introduction

    7/52

    Mobiles/user equipment aspeers

    P2P and mobile networks

    Two main connections between P2P and mobile communicationnetworks in the context of this course:

    Mobile Communication Networks Simon Oechsner - 2013 7

    using P2P

    Mobile users consumingvideo streams

    Content distribution overlays

  • 7/28/2019 1. P2P Introduction

    8/52

    P2P as supporting technology

    Distribution of centralized

    P2P and mobile networks

    Two main connections between P2P and mobile communicationnetworks in the context of this course:

    Mobiles/user equipment aspeers

    Mobile Communication Networks Simon Oechsner - 2013 8

    components in the mobilecore network

    Mainly useful for databases

    Search overlays

    using P2P

    Mobile users consumingvideo streams

    Content distribution overlays

  • 7/28/2019 1. P2P Introduction

    9/52

    P2P and scalability

    Each new peer adds new resources to the system

    Upload bandwidth

    Storage capacity

    Computing power

    Mobile Communication Networks Simon Oechsner - 2013 9

    ,

    Each client is also a server

    Typically no need for additional infrastructure

    Less complexity for deploying systems

  • 7/28/2019 1. P2P Introduction

    10/52

    P2P and availability

    Peers are generally assumed to be end user hosts

    PCs

    In the future mobile devices

    Thus, peers are assumed to have a low availability and reliability

    Can go offline at any point in time

    Mobile Communication Networks Simon Oechsner - 2013 10

    Can crash, data can be corrupted, etc.

    Different client versions possible

    P2P networks need to consider this and provide mechanisms tocope with very dynamic structures

  • 7/28/2019 1. P2P Introduction

    11/52

    Overlays

    Logical

    overlay

    P2P systems create a

    logical network

    Consisting of the end-to-end

    connections between the

    peers

    Mobile Communication Networks Simon Oechsner - 2013 11

    Physical

    transport

    network,

    e.g. IP

    network

    This logical network is called

    overlay

    To distinguish it from the

    underlay, i.e., physical networksubstrate

    An overlay is defined on

    application layer

  • 7/28/2019 1. P2P Introduction

    12/52

    Overlays

    Different semantics than the underlying transport network, e.g.neighborhood, address space, and routing

    Typically large-scale environment; no administration

    Based on locally-made decisions

    Mobile Communication Networks Simon Oechsner - 2013 12

  • 7/28/2019 1. P2P Introduction

    13/52

    Overlays

    Different semantics than the underlying transport network, e.g.neighborhood, address space, and routing

    Typically large-scale environment; no administration

    Based on locally-made decisions

    Mobile Communication Networks Simon Oechsner - 2013 13

    Overlays enable deployment of distributed services without knowing thephysical network

    But: blind creation of overlay connections may lead to inefficient usage

    of network resources

  • 7/28/2019 1. P2P Introduction

    14/52

    Churn

    Churn: the continuous process

    of nodes joining and leaving

    the network

    Users may join or leave the

    overlay arbitrarily

    End user equipment: also

    Mobile Communication Networks Simon Oechsner - 2013 14

    requen no e a ures

  • 7/28/2019 1. P2P Introduction

    15/52

    Churn

    Churn: the continuous process

    of nodes joining and leaving

    the network

    Users may join or leave the

    overlay arbitrarily

    End user equipment: also

    Mobile Communication Networks Simon Oechsner - 2013 15

    Joining

    node

    requen no e a ures

  • 7/28/2019 1. P2P Introduction

    16/52

    Churn

    Churn: the continuous process

    of nodes joining and leaving

    the network

    Users may join or leave the

    overlay arbitrarily

    End user equipment: also

    Mobile Communication Networks Simon Oechsner - 2013 16

    Joining

    node

    requen no e a ures

    New connections due to new

    nodes

  • 7/28/2019 1. P2P Introduction

    17/52

    Churn

    Failednode

    Churn: the continuous process

    of nodes joining and leaving

    the network

    Users may join or leave the

    overlay arbitrarily

    End user equipment: also

    Mobile Communication Networks Simon Oechsner - 2013 17

    requen no e a ures

    New connections due to new

    nodes

  • 7/28/2019 1. P2P Introduction

    18/52

    Churn

    Churn: the continuous process

    of nodes joining and leaving

    the network

    Users may join or leave the

    overlay arbitrarily

    End user equipment: also

    Mobile Communication Networks Simon Oechsner - 2013 18

    requen no e a ures

    New connections due to new

    nodes

    Re-wiring upon node

    failures/leaves

    Danger of network

    separation

    Highly variable topology

    New

    overlayconnection

  • 7/28/2019 1. P2P Introduction

    19/52

    Churn - stochastic scalability

    While DHTs are built to scale in the number of nodes,they also have to be able to handle churn

    Churn threatens performance and data availability Especially in an enterprise environment, data loss isunacceptable!

    Mobile Communication Networks Simon Oechsner - 2013 19

    Functional Scalability

    22 nodes

    25 nodes

  • 7/28/2019 1. P2P Introduction

    20/52

    Churn - stochastic scalability

    While DHTs are built to scale in the number of nodes,they also have to be able to handle churn

    Churn threatens performance and data availability Especially in an enterprise environment, data loss isunacceptable!

    Mobile Communication Networks Simon Oechsner - 2013 20

    Functional Scalability Stochastic Scalability

    22 nodes

    25 nodes

    24 nodes,stable stationarystructure

    24 nodes,higher churn rate(joins and leaves)

  • 7/28/2019 1. P2P Introduction

    21/52

    Self-organization

    P2P overlays typically work without a centralizedmanagement authority

    or involvement of the user

    Global structures emerge and functionality is

    Mobile Communication Networks Simon Oechsner - 2013 21

    Overlay structure repair

    Routing of search messages

    Data exchange

  • 7/28/2019 1. P2P Introduction

    22/52

    P2P functionalities

    Resource mediation (search overlays)

    search and locate a resource

    Performance indicator: search success, search delay/number of routingsteps

    Examples: Kazaa, Kademlia, Chord

    Resource access and exchange (content distribution overlays)

    Mobile Communication Networks Simon Oechsner - 2013 22

    control, schedule, and conduct exchange of resources or content,

    e.g. audio or video files

    Performance indicator: download time, stream quality (streaming overlays)

    Examples: BitTorrent, eDonkey

    Both functionalities can independently be centralized or distributed Index server vs. Search overlay

    Download server vs. File-sharing/streaming overlay

  • 7/28/2019 1. P2P Introduction

    23/52

    Resource mediation/search overlays

    Essentially replace central index servers

    Provides information about the location, i.e., IP address, ofdata

    Data itself does not need to be stored in the overlay!

    Mobile Communication Networks Simon Oechsner - 2013 23

    and cost considerations Lookup table of several dozen GB in the memory of a server

    Often distributed systems provide a higher availability Especially since central servers can be switched off for non-technical reasons

  • 7/28/2019 1. P2P Introduction

    24/52

    Resource mediation/search overlays

    Search overlays do not have tostore actual user data

    No videos, audio, archives, etc.

    Mobile Communication Networks Simon Oechsner - 2013 24

    IP:72.26.203.99

    episodev.avi

    IP:132.187.16.21

  • 7/28/2019 1. P2P Introduction

    25/52

    Resource mediation/search overlays

    Search overlays do not have tostore actual user data

    No videos, audio, archives, etc.

    The important information that isstored is where to find afile/document

    Mobile Communication Networks Simon Oechsner - 2013 25

    This enables the storage (andfinding) of pointerson any node

    Not just on the node holding the

    actual file

    IP:72.26.203.99

    episodev.avi

    IP:132.187.16.21

    Pointer

  • 7/28/2019 1. P2P Introduction

    26/52

    Resource access/content distribution overlays

    Essentially replace download and streaming servers

    Enable the utilization of the normally unused uploadcapacity of end users

    Especially powerful if combined with dedicated servers

    Mobile Communication Networks Simon Oechsner - 2013 26

    Scale with the popularity of the file

    Handle flash crowdsbetter than servers

    Also, offer higher availability and less risk of serviceoutage

  • 7/28/2019 1. P2P Introduction

    27/52

    Issues with mobile peers

    Mobile peers might want different content than fixed-line peers

    Videos in lower resolution

    Different formats

    r v rl

    Mobile Communication Networks Simon Oechsner - 2013 27

    Who will provide the content? Back to client-server?

  • 7/28/2019 1. P2P Introduction

    28/52

    Issues with mobile peers

    State-of-the-art CDOs (BitTorrent, eDonkey) reward peers whoupload

    Incentive to provide resources

    Thus, mobile peers with potentially less upload capacity mightbe at an disadvantage

    Mobile Communication Networks Simon Oechsner - 2013 28

    ,

    Mobiles in WLANs are not that different from a laptop

    Mobile peers may be able to utilize multi-homing

    But current clients are typically not prepared for this

    WLANAccessPoint

    UMTSnodeB

  • 7/28/2019 1. P2P Introduction

    29/52

    Classes of P2P networks

    -

    Mobile Communication Networks Simon Oechsner - 2013 29

    unstructured

  • 7/28/2019 1. P2P Introduction

    30/52

    Classes of P2P networks

    -

    Mobile Communication Networks Simon Oechsner - 2013 30

    unstructured

    Hybrid P2P

  • 7/28/2019 1. P2P Introduction

    31/52

    Classes of P2P networks

    -

    Mobile Communication Networks Simon Oechsner - 2013 31

    unstructured

    Hybrid P2P Hierarchical P2P

  • 7/28/2019 1. P2P Introduction

    32/52

    Classes of P2P networks

    - -

    Mobile Communication Networks Simon Oechsner - 2013 32

    unstructured

    structured

    Hybrid P2P Hierarchical P2P

  • 7/28/2019 1. P2P Introduction

    33/52

    Unstructured P2P

    Simplest form of an overlay

    Random neighbor selection Mesh topology

    Mobile Communication Networks Simon Oechsner - 2013 33

    Just establish new connections with any potential neighbor

    May show small-world characteristics

    Any node can be reached from any other node with a smallnumber of (overlay) hops

  • 7/28/2019 1. P2P Introduction

    34/52

    Unstructured P2P - Resilience

    If all nodes are really equal, an unstructured P2P network is veryresilient against random node failures

    However, in reality, nodes are not equal Different amounts of resources

    Different uptime

    Mobile Communication Networks Simon Oechsner - 2013 34

  • 7/28/2019 1. P2P Introduction

    35/52

    Unstructured P2P - Resilience

    If all nodes are really equal, an unstructured P2P network is veryresilient against random node failures

    However, in reality, nodes are not equal Different amounts of resources

    Different uptime

    Mobile Communication Networks Simon Oechsner - 2013 35

    This may lead to preferential attachment of new nodes

    the rich get richer

    Power-law distribution for the number of connections of individualpeers

    If the nodes with a high number of connections fail, the networkcan become separated

  • 7/28/2019 1. P2P Introduction

    36/52

    Unstructured P2P - Search

    Problem: which nodeholds the data/entry/pointer

    searched for?

    No structure: any node may

    ??

    Mobile Communication Networks Simon Oechsner - 2013 36

    Or none!

    No informed search possible

    Easiest solution: flooding

    Fl di

  • 7/28/2019 1. P2P Introduction

    37/52

    Flooding

    Each node forwards received queries to all its neighbors

    Minus the node from which the query was received

    Mobile Communication Networks Simon Oechsner - 2013 37

    Fl di

  • 7/28/2019 1. P2P Introduction

    38/52

    Each node forwards received queries to all its neighbors

    Minus the node from which the query was received

    Flooding

    Mobile Communication Networks Simon Oechsner - 2013 38

    Fl di

  • 7/28/2019 1. P2P Introduction

    39/52

    Flooding

    Each node forwards received queries to all its neighbors

    Minus the node from which the query was received

    Mobile Communication Networks Simon Oechsner - 2013 39

    up ca e quer es

    received!

    Fl di

  • 7/28/2019 1. P2P Introduction

    40/52

    Flooding

    Each node forwards received queries to all its neighbors

    Minus the node from which the query was received

    Inefficient network resource usage Typically, only a few nodes hold the searched information

    In the worst case, every node is queried

    Mobile Communication Networks Simon Oechsner - 2013 40

    Duplicate queries due to random graph structure

    Overhead can be limited

    Lifetime of queries (TTL in hops)

    If not all nodes are queried, search may be unsuccessfulalthough the searched information exists!

    R d m lk h

  • 7/28/2019 1. P2P Introduction

    41/52

    Random walk search

    Instead of fowarding a query to all neighbors, onlyone is chosen randomly

    Or a small number k

    Limits the number of queries

    Mobile Communication Networks Simon Oechsner - 2013 42

    But also limits further the success probability of thesearch within a given time

    Alternatives for searching

  • 7/28/2019 1. P2P Introduction

    42/52

    Alternatives for searching

    Hierarchical overlays

    Higher layers compile theinformation from all nodesof lower layers

    Mobile Communication Networks Simon Oechsner - 2013 43

    Queries are routed tohigher layers with lessnodes

    There, flooding or othersearch algorithms can takeplace

    Hierarchical overlays

  • 7/28/2019 1. P2P Introduction

    43/52

    Hierarchical overlays

    Breaks up the concept of all peers being equal

    Some peers get more responsibility super peers

    Can be selected based on their characteristics

    Mobile Communication Networks Simon Oechsner - 2013 44

    Peers on each level or layer can form an additionalnetwork

    Mobile peers & hierarchical overlays

  • 7/28/2019 1. P2P Introduction

    44/52

    Mobile peers & hierarchical overlays

    A hierarchical overlay might be a good choice to integratemobile peers

    Especially when they cannot guarantee availability all the time

    Fixed-line superpeers can handle the more critical functions

    Search

    Mobile Communication Networks Simon Oechsner - 2013 45

    Possibly dedicated servers as proxies for mobiles

    Mobile peers only get the results

    Less overhead due to (mobile) churn

    Example Application: Skype

  • 7/28/2019 1. P2P Introduction

    45/52

    Example Application: Skype

    Skype is at its core still P2P VoIP, while offering additionalservices

    E.g., SkypeIn/SkypeOut, video conferencing,

    The Skype protocol is proprietary, but measurement studieshave been conducted

    Mobile Communication Networks Simon Oechsner - 2013 46

    Skype uses its participating nodes to store user data

    Contact list, status, preferences, IP

    Skype uses a hierarchical search and signaling overlay

    Ordinary nodes are connected to supernodes

    Supernodes are elected based on performance andonline time

    Alternatives for searching

  • 7/28/2019 1. P2P Introduction

    46/52

    Alternatives for searching

    Structured overlays

    Information is stored on specific nodes

    according to well-known rules Remember: pointers can be stored on any node!

    Mobile Communication Networks Simon Oechsner - 2013 47

    This enables queries for an information to be routed to the node

    containing it (key-based routing)

    Routing on overlay level

    Much higher guarantee of search sucess With less overhead in terms of search messages

    but higher overhead to keep the overlay structure!

    Internal overlay traffic

  • 7/28/2019 1. P2P Introduction

    47/52

    Internal overlay traffic

    Since overlays are a distributed system, most queries to thissystem are forwarded and routed internally

    (mainly true for search overlays)

    Mobile Communication Networks Simon Oechsner - 2013 48

    Internal overlay traffic

  • 7/28/2019 1. P2P Introduction

    48/52

    Internal overlay traffic

    Since overlays are a distributed system, most queries to thissystem are forwarded and routed internally

    (mainly true for search overlays)

    With each internal hop, the load on the system increases

    more bandwidth is needed

    Mobile Communication Networks Simon Oechsner - 2013 49

    Internal overlay traffic

  • 7/28/2019 1. P2P Introduction

    49/52

    Internal overlay traffic

    Since overlays are a distributed system, most queries to thissystem are forwarded and routed internally

    (mainly true for search overlays)

    With each internal hop, the load on the system increases

    more bandwidth is needed

    Mobile Communication Networks Simon Oechsner - 2013 50

    The real load on the system is the sum of the external load andinternal load

    dimensioning is based on this real load

    for the system as a black box, only the external load is aperformance indicator

    Internal load increase in overlays

  • 7/28/2019 1. P2P Introduction

    50/52

    Internal load increase in overlays

    0 = 2m

    IM 2

    Mobile Communication Networks Simon Oechsner - 2013 51

    Initial Query

    InternalMessage 1

    IM 3

    Factorinternal load/external load

    = 3!

    Traffic overhead vs mobile networks

  • 7/28/2019 1. P2P Introduction

    51/52

    Traffic overhead vs. mobile networks

    Each additional hop via a mobile peer means usage of the (incomparison) costly air interface

    Therefore, the less hops are taken via mobile peers, the moreresource-efficient an overlay is

    Mobile Communication Networks Simon Oechsner - 2013 52

    Traffic overhead vs. mobile networks

  • 7/28/2019 1. P2P Introduction

    52/52

    Traffic overhead vs. mobile networks

    Each additional hop via a mobile peer means usage of the (incomparison) costly air interface

    Therefore, the less hops are taken via mobile peers, the moreresource-efficient an overlay is

    Mobile Communication Networks Simon Oechsner - 2013 53

    It might even be better to not use the upload capacity ofmobiles/wireless devices in content distribution networks

    Might not contribute much anyways

    Upload might compete with download!