Introduction to P2P Computing - Technical University of ... ?? Open-source software development ... • Overlay maintenance ... Unstructured VS Structured P2P Networks

  • View
    212

  • Download
    0

Embed Size (px)

Transcript

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Introduction to P2P Computing Nicola Dragoni Embedded Systems Engineering DTU Compute

    1. Introduction

    A. Peer-to-Peer vs. Client/Server

    B. Overlay Networks

    2. Common Topologies

    3. Data location

    4. Gnutella Protocol

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    From the First Lecture (Architectural Models)...

    2

    The architecture of a system is its structure in terms of separately specified components and their interrelationships

    4 fundamental building blocks (and 4 key questions):

    Communicating entities: what are the entities that are communicating in the distributed system?

    Communication paradigms: how do these entities communicate, or, more specifically, what communication paradigm is used?

    Roles and responsibilities: what (potentially changing) roles and responsibilities do these entities have in the overall architecture?

    Placement: how are these entities mapped on to the physical distributed infrastructure (i.e., what is their placement)?

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    To Avoid Any Misunderstanding

    3

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Introduction

    4

    Peer-to-peer (P2P) systems have become extremely popular and contribute to vast amounts of Internet traffic

    P2P basic definition:

    A P2P system is a distributed collection of peer nodes, that act both as servers and as clients provide services to other peers

    consume services from other peers

    Very different from the client-server model!!

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    It's a Broad Area

    5

    P2P file sharing

    Gnutella

    eMule

    BitTorrent

    P2P communication

    Instant messaging

    Voice-over-IP: Skype

    P2P computation

    Seti@home

    DHTs & their apps

    Chord, CAN, Kademlia,

    P2P wireless

    Ad-hoc networking

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    P2P History: 1969 - 1990

    6

    The origins:

    In the beginning, all nodes in Arpanet/Internet were peers

    Each node was capable of:

    Performing routing (locate machines)

    Accepting ftp connections (file sharing)

    Accepting telnet connections (distribution computation)

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    P2P History: 1999 - Today

    7

    The advent of Napster:

    Jan 1999: the first version of Napster was released by Shawn Fanning,

    student at the Northeastern University

    July 1999: Napster Inc. founded

    Feb 2001: Napster closed down

    After Napster:

    Gnutella, KaZaa, BitTorrent,

    Skype

    Content creation in Wikipedia

    Open-source software development

    Crowd-sourcing

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Napster

    8

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Client/Server vs. Peer-to-Peer

    9

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Example Video Sharing (YouTube vs BitTorrent)

    10

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Example Video Sharing (YouTube vs BitTorrent)

    11

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    P2P vs Client-Server

    12

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    P2P Environment

    Dynamic

    Nodes may disconnect temporarily

    New nodes are continuously joining the system, while others leave permanently

    Security

    P2P clients runs on machines under the total control of their owners

    Malicious users may try to bring down the system

    Selfishness

    Users may run hacked clients in order to avoid contributing resources

    13

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Why P2P?

    Decentralisation enables deployment of applications that are:

    Highly available

    Fault-tolerant

    Self-organizing

    Scalable

    Difficult or impossible to shut down

    This results in a democratisation of the Internet

    14

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    P2P and Overlay Networks

    Peer-to-Peer networks are usually overlays

    Logical structures built on top of a physical routed communication infrastructure (IP) that creates the allusion of a completely-connected graph

    15

    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

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Overlay Networks

    16

    Overlay Network: links based on logical relationships (knows) rather than physical connectivity

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Overlay Networks

    17

    Physical network: who has a communication link to whom

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Overlay Networks

    18

    Logical network: who can communicate with whom

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Overlay Networks

    19

    Overlay network (ring): who knows whom

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Overlay Network

    20

    Overlay network (tree): who knows whom

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Overlay Networks

    Virtual edge

    TCP connection

    or simply a pointer to an IP address

    Overlay maintenance

    Periodically ping to make sure neighbour is still alive

    Or verify liveness while messaging

    If neighbour goes down, may want to establish new edge

    21

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Overlay Networks

    Tremendous design flexibility

    Topology

    Message types

    Protocols

    Messaging over TCP or UDP

    Underlying physical net is transparent

    to developer

    22

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    P2P Problems

    Overlay construction and maintenance

    e.g., random, two-level, ring, etc.

    Data location

    locate a given data object among a large number of nodes

    Data dissemination

    propagate data in an efficient and robust manner

    Per-node state

    keep the amount of state per node small

    Tolerance to churn (dynamic system)

    maintain system invariants (e.g., topology, data location, data availability) despite node arrivals and departures

    23

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    P2P Topologies

    1. Introduction

    A. Peer-to-Peer vs. Client/Server

    B. Overlay Networks

    2. Common Topologies

    3. Data location

    4. Gnutella Protocol

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Overlay Topologies

    25

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Evaluating Topologies

    Manageability

    How hard is it to keep working?

    Information coherence

    How reliable is info?

    Extensibility

    How easy is it to grow?

    Fault tolerance

    How well can it handle failures?

    Censorship

    How hard is it to shut down?

    26

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Evaluating Topologies: Centralized

    Manageable (how hard is it to keep working?)

    System is all in one place

    Coherent (how reliable is info?)

    Information is centralized

    Extensible (how easy is it to grow?)

    No

    Fault tolerance (how well can it handle failures?)

    Single point of failure

    Censorship (how hard is it to shut down?)

    Easy to shut down

    27

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Evaluating Topologies: Hierarchical

    Manageable (how hard is it to keep working?)

    Chain of authority

    Coherent (how reliable is info?)

    Cache consistency

    Extensible (how easy is it to grow?)

    Add more leaves, rebalance

    Fault tolerance (how well can it handle failures?)

    Root is vulnerable

    Censorship (how hard is it to shut down?)

    Just shut down the root

    28

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Evaluating Topologies: Decentralized

    Manageable (how hard is it to keep working?)

    Difficult, many owners

    Coherent (how reliable is info?)

    Difficult, unreliable peers

    Extensible (how easy is it to grow?)

    Anyone can join in

    Fault tolerance (how well can it handle failures?)

    Redundancy

    Censorship (how hard is it to shut down?)

    Difficult to shut down

    29

  • DTU ComputeDepartment of Applied Mathematics and Computer Science

    Evaluating Topologies: Centralized + Decentralized

    Manageable (how hard is it to keep working?)

    Same as decentralized

    Coherent (how reliable is info?)

    Better than decentralized

    Extensible (how easy is it to grow?)

    Anyone can join in

    Fault tolerance (how

Recommended

View more >