Download presentation
Presentation is loading. Please wait.
Published byAdam Dwayne Harrell Modified over 9 years ago
1
© Chinese University, CSE Dept. Distributed Systems / 4 - 1 Distributed Systems Topic 4: Naming, Trading, and Peer-to-Peer Systems Dr. Michael R. Lyu Computer Science & Engineering Department The Chinese University
2
© Chinese University, CSE Dept. Distributed Systems / 4 - 2 Outline 1. Naming 2. Trading 3. P2P Systems 4. Summary
3
© Chinese University, CSE Dept. Distributed Systems / 4 - 3 1 The Need: Location Transparency Avoid using physical locations for locating components! Naming: –Locating components by external names –Similar to white pages Trading: –Locating components by service characteristics –Similar to yellow pages
4
© Chinese University, CSE Dept. Distributed Systems / 4 - 4 1 Naming 1. Names, Addresses and Other Attributes 2. Naming Service Examples - Network File System (NFS) - Internet Domain Service 3. Common Characteristics 4. Limitations
5
© Chinese University, CSE Dept. Distributed Systems / 4 - 5 1.1 Names and Their Attributes Names are used to refer to a wide variety of resources (computers, services, remote files, or users). Names are not the only useful means of identification: descriptive attributes are another. A name is resolved when it is translated into data about the named resource or object, often in order to invoke an action upon it. The association between a name and an object is called a binding. In general, names are bound to attributes of the named objects. An attribute is the value of a property associated with an object.
6
© Chinese University, CSE Dept. Distributed Systems / 4 - 6 1.2 Name Services Name service: To store a collection of one or more naming contexts, which are sets of bindings between textual names and attributes for objects such as users, computers, services and remote objects. Name service operations: binding a name and resolve a name Name management is separated from other services for openness: –Unification: using the same naming scheme. –Integration: sharing name resources in different administrative domains. Name space: the collection of all valid names recognized by a name service. Hierarchic name space: names are hierarchically organized so each part of a name is resolved relative to a separate context. Name service examples: Network File Service (NFS) Directories, Internet Domain Name Service, and X.500 Directory Service.
7
© Chinese University, CSE Dept. Distributed Systems / 4 - 7 1.2.1 NFS Directories lec lyu teaching course_web www usr sbin bin inetd ls rlogin uac king cprj Example1: /uac/lec/lyu/course_web Example2: /uac/cprj/king/www
8
© Chinese University, CSE Dept. Distributed Systems / 4 - 8 1.2.2 Internet Domain Name Service The object named by DNS are IP addresses of computers as (naming) domains. In DNS, any name can be resolved by any client, due to –Hierarchical partitioning of name database –Replication of naming data –Caching Internet DNS name space is partitioned both organizationally and according to geography.
9
© Chinese University, CSE Dept. Distributed Systems / 4 - 9 1.2.2 Internet Domain Name Service a.root-servers.net (root) edu.hk ac.uk cse.cuhk.edu.hk se.cuhk.edu.hk ns1.cuhk.edu.hk 137.189.6.1 (edu.hk) ns1.cs.ucl.ac.uk (ac.uk) ic.ac.uk qmw.ac.uk city.ac.uk nameserv.city.ac.uk (city.ac.uk) *.city.ac.uk *.cse.cuhk.edu.hk beryl.cuhk.edu.hk 137.189.91.187 (cse.cuhk.edu.hk)
10
© Chinese University, CSE Dept. Distributed Systems / 4 - 10 1.2.2 Composed Naming Domains from URL http://www.cdk3.net:8888/WebExamples/earth.html URL Resource ID (IP number, port number, pathname) Network address 2:60:8c:2:b0:5a file Web server 55.55.55.55WebExamples/earth.html8888 DNS lookup Socket
11
© Chinese University, CSE Dept. Distributed Systems / 4 - 11 1.2.2 Uniform Resource Identifier (URI) URL is a particular type of URI in identifying web resources. URLs scale up to an unlimited set of web resources for efficient access. URLs are essentially addresses of web resources, which do not support mobility transparency. Uniform Resource Name (URN) allows web resources to move around. Uniform Resource Characteristic (URC), a subset of URN, describes attributes of web resources.
12
© Chinese University, CSE Dept. Distributed Systems / 4 - 12 1.2.2 Navigation Navigation is the process of locating naming data from among more than one name server in order to resolve a name. Iterative navigation: a client presents the name to the local name server which attempts to resolve it. Multicast navigation: a client multicasts the name to be resolved to the group of name servers. Server-controlled navigation: A name server coordinates the resolution of the name and passes the result back to the user agent. –Non-recursive vs. recursive
13
© Chinese University, CSE Dept. Distributed Systems / 4 - 13 1.2.2 Iterative Navigation Iterative navigation: A client iteratively contacts name servers NS1–NS3 in order to resolve a name In multicast navigation, the client multicasts the name to be resolved to a group of name servers. Client 1 2 3 NS2 NS1 NS3 Name servers
14
© Chinese University, CSE Dept. Distributed Systems / 4 - 14 1.2.2 Server-Controlled Navigation 1 2 3 5 1 2 3 4 4 A name server NS1 communicates with other name servers on behalf of a client client Recursive server-controlled NS2 NS1 NS3 NS2 NS1 NS3 Non-recursive server-controlled
15
© Chinese University, CSE Dept. Distributed Systems / 4 - 15 1.2.2 Name Caching Caching is a general computing scheme to improve performance of data access. Name caching is a process in maintaining the results of previous name resolutions in server memory space. In addition to name service’s performance, caching helps to maintain the availability of both the name service and other services. Caching is widely applicable because naming data are changed relatively rarely.
16
© Chinese University, CSE Dept. Distributed Systems / 4 - 16 1.3 Common Characteristics Concerns to be addressed by a naming service: Names. Name Spaces. Naming service provides operations for –Defining names of components (bind). –Lookup components by name (resolve). Persistence of bindings.
17
© Chinese University, CSE Dept. Distributed Systems / 4 - 17 1.3 Common Characteristics Qualities of service: Distribution of name spaces Performance profile –Caching –Replication Transaction properties of concurrent naming operations
18
© Chinese University, CSE Dept. Distributed Systems / 4 - 18 1.4 Limitations Limitation of Naming: Client always has to identify the server by name. Inappropriate if client just wants to use a service at a certain quality but does not know who is the service provider. Example: –Automatic cinema ticketing, –Video on demand, –Electronic commerce.
19
© Chinese University, CSE Dept. Distributed Systems / 4 - 19 2 Trading 1. Characteristics 2. Example 3. A Typical Trading Service
20
© Chinese University, CSE Dept. Distributed Systems / 4 - 20 2.1 Trading Characteristics Trader operates as broker between client and server. Enables client to change perspective from ´who?´ to ´what?´ Selection between multiple service providers. Similar ideas in: –yellow pages –insurance broker –stock brokerage.
21
© Chinese University, CSE Dept. Distributed Systems / 4 - 21 2.1 Trading Characteristics Common language between client and server: –Service types –Qualities of service Server registers service with trader. Server defines assured quality of service: –Static QoS definition –Dynamic QoS definition.
22
© Chinese University, CSE Dept. Distributed Systems / 4 - 22 2.1 Trading Characteristics Clients ask trader for –a service of a certain type –at a certain level of quality Trader supports –service matching –service shopping
23
© Chinese University, CSE Dept. Distributed Systems / 4 - 23 2.2 Example Distributed system for video-on-demand: Trader Video-on- demand provider MGM Warner Independent User Server
24
© Chinese University, CSE Dept. Distributed Systems / 4 - 24 2.3 Typical Trading Service Trader Client Server (1) Register (2) Lookup (2a) Monitor QoS (3) Application
25
© Chinese University, CSE Dept. Distributed Systems / 4 - 25 3 Peer-to-Peer Systems 1.Introduction 2.Napster and its legacy 3.Peer-to-peer middleware 4.Routing overlays
26
© Chinese University, CSE Dept. Distributed Systems / 4 - 26 3.1 Introduction The goal of peer-to-peer systems is to enable the sharing of data and resources. It aims to support useful distributed services and applications using data and computing resources available in the personal computers and workstations as application. Shirky: “ Applications that exploit resources available at the edges of the Internet – storage, cycles, content, human presence. ” Discuss the general techniques that simplify the construction of peer-to-peer applications and enhance their scalability, reliability and security.
27
© Chinese University, CSE Dept. Distributed Systems / 4 - 27 3.1.1 Characteristics of Peer-to-Peer Systems Ensure each user contributes resources to the systems. All nodes have the same functional capabilities and responsibilities. Their correct operation does not depend on the existence of any centrally-administered systems. Offer limited degree of anonymity to the providers and users of resources. Choice of algorithm for the placement of data.
28
© Chinese University, CSE Dept. Distributed Systems / 4 - 28 3.1.1 Example: Distributed Video Streaming –Traditional client/server solution is not appropriate for video streaming –Bottlenecks »Server load l The server bandwidth is the major bottleneck »Edge capacity l One connection to one client l The connection may degrade »End to end bandwidth –Scalability?
29
© Chinese University, CSE Dept. Distributed Systems / 4 - 29 3.1.1 Example: P2P-Based Solution –Collaboration between client peers –Source server alleviated –Better scalability –Better reliability
30
© Chinese University, CSE Dept. Distributed Systems / 4 - 30 3.1.2 Peer-to-Peer Systems Three generations of peer-to-peer system and application development can be identified. The first generation was launched by the Napster music exchange service The second generation of file sharing applications offering greater scalability, anonymity and fault tolerance quickly. The third generation is characterized by emergence of middleware layers for the application-independent management.
31
© Chinese University, CSE Dept. Distributed Systems / 4 - 31 3.2 Napster The first application in which a demand for a globally-scalable information storage and retrieval service emerged. Popular for music exchange. Napster ’ s architecture included centralized indexes but users supplied the files.
32
© Chinese University, CSE Dept. Distributed Systems / 4 - 32 3.2.1 Napster ’ s Method of Operation
33
© Chinese University, CSE Dept. Distributed Systems / 4 - 33 3.2.2 Napster ’ s Legacy The original Napster was shut down as a result of legal proceedings. Anonymity for the receivers and the providers of shared data and other resources is a concern for the designers of peer-to-peer systems. Napster demonstrated the feasibility of building a useful large-scale service which depends almost wholly on data and computers owned by ordinary Internet users.
34
© Chinese University, CSE Dept. Distributed Systems / 4 - 34 3.3 Peer-to-Peer Middleware Provide a mechanism to enable clients to access data resources quickly and dependably whenever they are located throughout the network. Designed specially to meet the need for the automatic placement and subsequent location of the distributed objects.
35
© Chinese University, CSE Dept. Distributed Systems / 4 - 35 3.3.1 Functional Requirement Simplify the construction of services that are implemented across many hosts in a widely distributed network. Enable clients to locate and communicate with any individual resources. Ability to add new resources (or hosts) and to remove them.
36
© Chinese University, CSE Dept. Distributed Systems / 4 - 36 3.3.2 Non-Function Requirements Global scalability Load balancing Optimization for local interactions between neighboring peers Accommodating to highly dynamic host availability Security of data in an environment with heterogeneous trust Anonymity, deniability and resistance to censorship
37
© Chinese University, CSE Dept. Distributed Systems / 4 - 37 3.1.3 Routing Overlays versus IP Routing Routing overlays share many characteristics with IP packet routing infrastructure. Additional application-level routing mechanism is required.
38
© Chinese University, CSE Dept. Distributed Systems / 4 - 38 3.4 Routing Overlay Information Distribution Object: Node: D C’s routing knowledge D’s routing knowledgeA’s routing knowledge B’s routing knowledge C A B
39
© Chinese University, CSE Dept. Distributed Systems / 4 - 39 3.4 Routing Overlays The distributed algorithm known as a routing overlay takes responsibility for locating nodes and objects. The routing overlay ensures that any node can access any object by routing each request through a sequence of nodes. Peer-to-peer systems usually store multiple replicas of objects to ensure availability.
40
© Chinese University, CSE Dept. Distributed Systems / 4 - 40 3.4 Routing Overlays The main task: –Routes the request to a node at which a replica of the object resides. Other tasks –Ensures that a new object is reachable by all other clients. –Make the object unavailable when its client requests a removal. –When a node leaves, its responsibilities are distributed amongst the other nodes.
41
© Chinese University, CSE Dept. Distributed Systems / 4 - 41 4 Summary Naming services provide facilities to give external names to components. Trading services match service types requested by clients to servers that can satisfy them. P2P systems exploit existing naming, routing, data replication and security techniques for resource sharing. Read Chapters 10 and 13 of the textbook.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.