--- 1/draft-ietf-p2psip-service-discovery-06.txt 2013-02-16 21:09:26.983709918 +0100 +++ 2/draft-ietf-p2psip-service-discovery-07.txt 2013-02-16 21:09:27.011708113 +0100 @@ -1,95 +1,97 @@ P2PSIP Working Group J. Maenpaa Internet-Draft G. Camarillo Intended status: Standards Track Ericsson -Expires: April 4, 2013 October 1, 2012 +Expires: August 20, 2013 February 16, 2013 Service Discovery Usage for REsource LOcation And Discovery (RELOAD) - draft-ietf-p2psip-service-discovery-06.txt + draft-ietf-p2psip-service-discovery-07.txt Abstract REsource LOcation and Discovery (RELOAD) does not define a generic - service discovery mechanism as part of the base protocol. This + service discovery mechanism as a part of the base protocol. This document defines how the Recursive Distributed Rendezvous (ReDiR) service discovery mechanism used in OpenDHT can be applied to RELOAD overlays to provide a generic service discovery mechanism. Status of this Memo This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on April 4, 2013. + This Internet-Draft will expire on August 20, 2013. Copyright Notice - Copyright (c) 2012 IETF Trust and the persons identified as the + Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Introduction to ReDiR . . . . . . . . . . . . . . . . . . . . 4 4. Using ReDiR in a RELOAD Overlay Instance . . . . . . . . . . . 6 4.1. Data Structure . . . . . . . . . . . . . . . . . . . . . . 6 4.2. Selecting the Starting Level . . . . . . . . . . . . . . . 7 - 4.3. Service Provider Registration . . . . . . . . . . . . . . 7 + 4.3. Service Provider Registration . . . . . . . . . . . . . . 8 4.4. Refreshing Registrations . . . . . . . . . . . . . . . . . 8 4.5. Service Lookups . . . . . . . . . . . . . . . . . . . . . 9 - 4.6. Removing Registrations . . . . . . . . . . . . . . . . . . 9 - 5. Access Control Rules . . . . . . . . . . . . . . . . . . . . . 9 - 6. REDIR Kind Definition . . . . . . . . . . . . . . . . . . . . 10 - 7. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 - 8. Overlay Configuration Document Extension . . . . . . . . . . . 12 - 9. Security Considerations . . . . . . . . . . . . . . . . . . . 13 - 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 - 10.1. Access Control Policies . . . . . . . . . . . . . . . . . 13 - 10.2. Data Kind-ID . . . . . . . . . . . . . . . . . . . . . . . 13 - 10.3. ReDiR Namespaces . . . . . . . . . . . . . . . . . . . . . 13 - 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 14 - 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 14 - 12.1. Normative References . . . . . . . . . . . . . . . . . . . 14 - 12.2. Informative References . . . . . . . . . . . . . . . . . . 14 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 14 + 4.6. Removing Registrations . . . . . . . . . . . . . . . . . . 10 + 5. Access Control Rules . . . . . . . . . . . . . . . . . . . . . 10 + 6. REDIR Kind Definition . . . . . . . . . . . . . . . . . . . . 11 + 7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 + 7.1. Service Registration . . . . . . . . . . . . . . . . . . . 11 + 7.2. Service Lookup . . . . . . . . . . . . . . . . . . . . . . 13 + 8. Overlay Configuration Document Extension . . . . . . . . . . . 14 + 9. Security Considerations . . . . . . . . . . . . . . . . . . . 14 + 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 + 10.1. Access Control Policies . . . . . . . . . . . . . . . . . 14 + 10.2. Data Kind-ID . . . . . . . . . . . . . . . . . . . . . . . 14 + 10.3. ReDiR Namespaces . . . . . . . . . . . . . . . . . . . . . 15 + 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 15 + 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 15 + 12.1. Normative References . . . . . . . . . . . . . . . . . . . 15 + 12.2. Informative References . . . . . . . . . . . . . . . . . . 15 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 16 1. Introduction REsource LOcation And Discovery (RELOAD) [I-D.ietf-p2psip-base] is a peer-to-peer signaling protocol that can be used to maintain an overlay network, and to store data in and retrieve data from the overlay. Although RELOAD defines a Traversal Using Relays around Network Address Translation (TURN) specific service discovery mechanism, it does not define a generic service discovery mechanism - as part of the base protocol. This document defines how the + as a part of the base protocol. This document defines how the Recursive Distributed Rendezvous (ReDiR) service discovery mechanism [Redir] used in OpenDHT can be applied to RELOAD overlays. In a Peer-to-Peer (P2P) overlay network such as a RELOAD Overlay Instance, the peers forming the overlay share their resources in order to provide the service the system has been designed to provide. The peers in the overlay both provide services to other peers and request services from other peers. Examples of possible services peers in a RELOAD Overlay Instance can offer to each other include a TURN relay service, a voice mail service, a gateway location service, @@ -135,90 +137,103 @@ DHT: Distributed Hash Tables (DHTs) are a class of decentralized distributed systems that provide a lookup service similar to a hash table. Given a key, any participating peer can retrieve the value associated with that key. The responsibility for maintaining the mapping from keys to values is distributed among the peers. H(x): Hash calculated over x. - I(l,k): The unique interval at level l in the ReDiR tree that - encloses key k. + I(l,k): An interval at level l in the ReDiR tree that encloses key + k. n.id: Node-ID of node n. Namespace: An arbitrary identifier that identifies a service provided in the RELOAD Overlay Instance. An example of a namespace is "voice-mail". The namespace is an UTF-8 text string. numBitsInNodeId: Number of bits in a Node-ID. ReDiR tree: A tree structure of the nodes that provide a particular service. The nodes embed the ReDiR tree into the RELOAD Overlay Instance using RELOAD Store and Fetch requests. Successor: The successor of identifier k in namespace ns is the node - that has joined ns whose identifier most immediately follows k. + belonging to ns whose identifier most immediately follows k. 3. Introduction to ReDiR Recursive Distributed Rendezvous (ReDiR) [Redir] does not require new functionality from the RELOAD base protocol. This is possible since ReDiR interacts with the RELOAD overlay through a put/get API using RELOAD Store and Fetch requests. ReDiR builds a tree structure of the nodes that provide a particular service and embeds it into the RELOAD Overlay Instance using the Store and Fetch requests. ReDiR performs lookup in a logarithmic number of Fetch operations with high - probability. Further, if the tree's height is estimated based on - past lookups, the average lookup can be reduced to a constant number - of Fetch operations assuming that Node-IDs are distributed uniformly - at random. + probability. Further, if the height of the ReDiR tree is estimated + based on lookups carried out previously, the average lookup can be + reduced to a constant number of Fetch operations assuming that Node- + IDs are distributed uniformly at random. In ReDiR, each service provided in the overlay is identified by an - arbitrary identifier, called its namespace. All service providers - join a namespace and peers wishing to use a service perform lookups - within the namespace of the service. A ReDiR lookup for identifier k - in namespace ns returns a node that has joined ns whose identifier is - the closest successor of k. + identifier, called the namespace. All service providers of a given + service join the namespace of that service. Peers wishing to use a + service perform lookups within the namespace of the service. The + result of a ReDiR lookup for an identifier k in namespace ns is a + RedirServiceProvider structure (see Section 4.1) of a service + provider that belongs to ns and whose Node-ID is the closest + successor of identifier k in the namespace. - Each tree node in the ReDiR tree contains a list of Node-IDs of peers - providing a particular service. Each node in the tree has a level. - The root is at level 0, the immediate children of the root are at - level 1, and so forth. The ReDiR tree has a branching factor, whose - value is determined by a new element in the RELOAD overlay - configuration document, called branching-factor. At every level i in - the tree, there are at most branching-factor^i nodes. The nodes at - any level are labeled from left to right, such that a pair (i,j) - uniquely identifies the jth node from the left at level i. This tree - is embedded into the RELOAD Overlay Instance node by node, by storing - the values of node (i,j) at key H(namespace,i,j). As an example, the - root of the tree for a voice mail service is stored at H("voice- - mail",0,0). Each node (i,j) in the tree is associated with - branching-factor intervals of the DHT keyspace as follows: + Each tree node in the ReDiR tree contains a dictionary of + RedirServiceProvider entries of peers providing a particular service. + Each tree node in the ReDiR tree also belongs to some level in the + tree. The root node of the ReDiR tree is located at level 0. The + child nodes of the root node are located at level 1 of the ReDiR + tree. The children of the tree nodes at level 1 are located at level + 2, and so forth. The ReDiR tree has a branching factor, whose value + is determined by a new element in the RELOAD overlay configuration + document, called branching-factor. At every level l in the ReDiR + tree, there is room for a maximum of branching-factor^l tree nodes. + As an example, in a tree whose branching-factor is 2, the second + level can contain up to 4 tree nodes (note that a given level may + contain less than the maximum number of tree nodes since empty tree + nodes are not stored). Each tree node in the ReDiR tree is uniquely + identified by a pair (l,j), where l is a level in the ReDiR tree and + j is the position of the tree node (from the left) at that level. As + an example, the pair (2,3) identifies the 3rd tree node from the left + at level 2. - [2^numBitsInNodeID*b^(-i)*(j+(b'/b)), - 2^numBitsInNodeID*b^(-i)*(j+((b'+1)/b))), for 0<=b'