CHAPTER 5: NAMING
- DR. TRẦN HẢI ANH
CHAPTER 5: NAMING DR. TRN HI ANH Outline 2 Names. Identifiers - - PowerPoint PPT Presentation
CHAPTER 5: NAMING DR. TRN HI ANH Outline 2 Names. Identifiers and Address 1. Flat Naming 2. Structured Naming 3. 1. Names. Identifiers and Address 3 Cc h phn tn @ Trn Hi Anh 3/27/2010 2014 Entity & Name 4
2
1.
2.
3.
3/27/2010
Các hệ phân tán @ Trần Hải Anh 2014
2014 Các hệ phân tán @ Trần Hải Anh 2014
4
Entity Operation 2 Operation 1 Operation 3 Name Naming system
5
Entity Access Point Access Point Name Address Address
6
Access Point Access Point Access Point Entity Entity Address Address Address
7
¨ An identifier refers to at most one entity. ¨ Each entity is referred to by at most one
¨ An identifier always refers to the same entity (it
¨ Name-to-address binding ¨ Problem: not appropriate to large network ¨ Naming systems ¨
8
¨ URI: ¤ a string of characters used to identify a resource. ¤ interact with representations of the resource over a network ¤ URL and URN ¤ It comprises 5 parts: scheme, authority, path, query and fragment ¨ URN: ¤ ISBN 0486275574 (run:isbn:0-486-27557-4) ¨ URL: ¤ file:///home/username/RomeoAndJuliet.pdf
9
11
¤ Identifiers are simply random bit strings (unstructured) ¤ It does not contain any information of location ¤ Goal: how flat names can be resolved
1.
2.
3.
4.
¨ 2.2.1. Broadcasting and Multicasting ¨ 2.2.2. Forwarding pointers
12
13
¨ Condition: System supports broadcasting
¤ A message containing the identifier of the entity is
¤ Each machine is requested to check whether it has that
¤ Only the machines that can offer an access point for
14
¨ Inefficient when the network grows
¤ Wast network bandwidth by request messages ¤ Too many hosts may be interrupted by requests they
¨ à multicasting
15
16
17
¨ When an entity moves from A to B, it leaves behind
¨ Advantage:
¤ Simplicity: By using a traditional naming service, a client
¨ Drawbacks
¤ A chain of FP can become so long à locating that entity is
¤ All intermediate nodes have to maintain their part of the
¤ Broken links à cannot reach the entity
18
19
20
21
¨ Server root quá tải ¨ Vấn đề đường đi
22
¨ Chord system ¨ Create the ring with prev(n) and succ(n) ¨ Use finger table to determine the succ(k) of key
¨ FTp is the finger table of node p: ¨ To look up a key k, node p will then immediately
¨ Update the finger tables after inserting a new node
23
24
25
26
27
28
30
A general naming graph
31
¨ Leaf node: ¤ No outgoing edge ¤ Store information of its address ¨ Directory node: ¤ Outgoing edge ¤ Store a table with info (edge label, node identifier) ¨ Path name: N: <label1, label2, label3, label4,
¨ Absolute path name/Relative path name
32
¨ Consider a path name: N:<label1, label2, ..., labeln> ¨ Start at node N of the naming graph, where the name
¨ Continue at the identified node by looking up the name
¨ So on ... ¨ Relatively with the UNIX file system
33
file name #inode permbits, etc. data addr data data file inode
file name 1 #inode permbits, etc. data addr data data file 1 inode file name 2 #inode file 2 $ln source_file target_file
37
file name 1 #inode permbits, etc. addr file inode "/path/to/some/other/file " file path file name 2 #inode permbits, etc. data addr data data $ln –s source_file target_file
39
3/27/2010 Các hệ phân tán @ Hà Quốc Trung 2010
40
¨ Ánh xạ không gian tên vào một không gian tên
41
42
¨ Functions:
¤ Add names ¤ Remove names ¤ Look up names
¨ Naming service is implemented by name servers ¨ In large-scale distributed systems (many entities,
43
¨ Global layer
¤ root node + directory nodes logically close to the root
¤ Stability (rarely changed) ¤ represent organization, or group of organization
¨ Administrational layer
¤ represent groups of entities that belong to the same
¨ Managerial layer
¤ consist of nodes that may change regularly
44
45
46
¨ Depend on the distribution of a name space
¨ Each client has a name resolver ¨ 2 ways of implementation of name resolution:
¤ Iterative name resolution ¤ Recursive name resolution
47
48
49
50
[source: howstuffworks.com]