To design peer-to-peer (P2P) software systems is a challenging task, because of their highly decentralized nature, which may cause unexpected emergent global behaviors. The last fifteen years have seen many P2P applications to come out and win favor with millions of users. From success histories of applications like BitTorrent, Skype, MyP2P we have learnt a number of useful design patterns. Thus, in this article we present a P2P pattern language (shortly, P2P-PL) which encompasses all the aspects that a fully effective and efficient P2P software system should provide, namely consistency of stored data, redundancy, load balancing, coping with asymmetric bandwidth, decentralized security. The patterns of the proposed P2P-PL are described in detail, and a composition strategy for designing robust, effective and efficient P2P software systems is proposed.
ACM Subject Classification C.2.4 Distributed SystemsKeywords and phrases Peer-to-peer; Pattern language; Efficiency; Robustness
IntroductionOver the last fifteen years, peer-to-peer (P2P) computing has become explosively popular, particularly for massive file sharing [23,32,13] and multimedia Internet streaming [19,40,42], whereas very high scalability has also been sought more recently in additional application domains, namely online gaming and location-aware services.As the P2P paradigm is gaining a forefront position in distributed computing techniques [67], it is important to recap good practices in P2P software system design and express them in terms of pattern language. Before reviewing previous P2P pattern languages and introducing our proposal for a P2P-PL, we deem necessary to illustrate the essential properties of a P2P system. A P2P network is a complex software system whose elements (peer nodes, or simply peers) cooperate by partitioning tasks and workloads, in order to ensure correctness, efficiency and robustness with invariance of scale. In the most radical view of P2P computing, peers participate in the application with equal privileges. Peers are said to form an overlay network of nodes, on top of the underlying computer (typically IP) network [69].Such a (well recognized) definition implies that peers share their resources: CPU, storage, bandwidth, cache, files, applications, services. Sharing implies that resources are discoverable. Some peers are greedy but share a minimal quantity of resources, which is why they are denoted as free riders. Usually, all peers implicitly provide basic shared resources (e.g., storage and bandwidth). We denote as consumable resources those that cannot be obtained by replication and can only be exploited upon contracting with their hosts. Usually, a limited number of peers can concurrently access the consumable resources of a peer. Services are special resources that can be grouped in two categories: distributed services, whose execution involves several peers, each one contributing with its basic shared resources, and local services, Resource sharing mechanisms in P2P software systems (P2P systems, hencefor...