CHAPTER 5: NAMING DR. TRN HI ANH Outline 2 Names. Identifiers - - PowerPoint PPT Presentation

chapter 5 naming
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

CHAPTER 5: NAMING

  • DR. TRẦN HẢI ANH
slide-2
SLIDE 2

Outline

2

1.

  • Names. Identifiers and Address

2.

Flat Naming

3.

Structured Naming

slide-3
SLIDE 3
  • 1. Names. Identifiers and Address

3/27/2010

3

Các hệ phân tán @ Trần Hải Anh 2014

slide-4
SLIDE 4

Entity & Name

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

slide-5
SLIDE 5

Entity, A.P

5

Entity Access Point Access Point Name Address Address

slide-6
SLIDE 6

Location independent

6

Access Point Access Point Access Point Entity Entity Address Address Address

slide-7
SLIDE 7

Identifier

7

¨ An identifier refers to at most one entity. ¨ Each entity is referred to by at most one

identifier.

¨ An identifier always refers to the same entity (it

is never reused)

slide-8
SLIDE 8

Resolving names and identifiers to addresses

¨ Name-to-address binding ¨ Problem: not appropriate to large network ¨ Naming systems ¨

8

slide-9
SLIDE 9

URI, URL và URN

¨ 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

slide-10
SLIDE 10
  • 2. Flat naming

10

slide-11
SLIDE 11

2.1. Definition

11

¤ Identifiers are simply random bit strings (unstructured) ¤ It does not contain any information of location ¤ Goal: how flat names can be resolved

1.

Simple solutions

2.

Home-based Approaches

3.

Distributed Hash Tables

4.

Hierachical Approaches

slide-12
SLIDE 12

2.2. Simple Solutions

¨ 2.2.1. Broadcasting and Multicasting ¨ 2.2.2. Forwarding pointers

12

slide-13
SLIDE 13

2.2.1. Broadcasting and Multicasting

13

¨ Condition: System supports broadcasting

facilities:

¤ A message containing the identifier of the entity is

broadcast to each machine.

¤ Each machine is requested to check whether it has that

entity.

¤ Only the machines that can offer an access point for

the entity send a reply message containing the address

  • f that access point.
slide-14
SLIDE 14

2.2.1. Broadcasting and Multicasting

14

¨ Inefficient when the network grows

¤ Wast network bandwidth by request messages ¤ Too many hosts may be interrupted by requests they

cannot answer.

¨ à multicasting

slide-15
SLIDE 15

Example: ARP

15

slide-16
SLIDE 16

ARP-Spoofing

16

slide-17
SLIDE 17

2.2.2. Forwarding Pointer

17

¨ When an entity moves from A to B, it leaves behind

in A a reference to its new location at B.

¨ Advantage:

¤ Simplicity: By using a traditional naming service, a client

can look up the current address by following the chain of forwarding pointers.

¨ Drawbacks

¤ A chain of FP can become so long à locating that entity is

expensive.

¤ All intermediate nodes have to maintain their part of the

chain.

¤ Broken links à cannot reach the entity

slide-18
SLIDE 18

Forwarding Pointer mechanism

18

slide-19
SLIDE 19

Redirecting a FP

19

slide-20
SLIDE 20

2.3. Home-based Approaches

20

slide-21
SLIDE 21

Solution for stable home problem

21

¨ Server root quá tải ¨ Vấn đề đường đi

slide-22
SLIDE 22

2.4. Distributed Hash Tables

22

¨ Chord system ¨ Create the ring with prev(n) and succ(n) ¨ Use finger table to determine the succ(k) of key

k

¨ FTp is the finger table of node p: ¨ To look up a key k, node p will then immediately

forward the request to node q:

¨ Update the finger tables after inserting a new node

slide-23
SLIDE 23

Chord system with finger tables

23

slide-24
SLIDE 24

2.5. Hierarchical Approaches

24

slide-25
SLIDE 25

An entity having two addresses in different leaf domains

25

slide-26
SLIDE 26

Looking-up

26

slide-27
SLIDE 27

Caching

27

slide-28
SLIDE 28

Updating

28

slide-29
SLIDE 29
  • 3. Structured Naming

29

slide-30
SLIDE 30

Structured Name Spaces

30

A general naming graph

slide-31
SLIDE 31

Name Spaces

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

slide-32
SLIDE 32

Name resolution

32

¨ Consider a path name: N:<label1, label2, ..., labeln> ¨ Start at node N of the naming graph, where the name

label1 is looked up in the directory table, and which returns the identifier of the node to which label1 refers.

¨ Continue at the identified node by looking up the name

label2

¨ So on ... ¨ Relatively with the UNIX file system

slide-33
SLIDE 33

General organization of the UNIX file system

33

slide-34
SLIDE 34

File system in UNIX

file name #inode permbits, etc. data addr data data file inode

slide-35
SLIDE 35

Directory node (folder)

slide-36
SLIDE 36

Hard link

file name 1 #inode permbits, etc. data addr data data file 1 inode file name 2 #inode file 2 $ln source_file target_file

slide-37
SLIDE 37

Hard link (cont.)

37

slide-38
SLIDE 38

Soft link

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

slide-39
SLIDE 39

Soft link

39

slide-40
SLIDE 40

Mounting

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

khác

slide-41
SLIDE 41

Merging

41

slide-42
SLIDE 42

Naming service

42

¨ Functions:

¤ Add names ¤ Remove names ¤ Look up names

¨ Naming service is implemented by name servers ¨ In large-scale distributed systems (many entities,

large geographical area) à distribute the implementation of a name space over multiple name servers

slide-43
SLIDE 43

Hierarchical organization

43

¨ Global layer

¤ root node + directory nodes logically close to the root

(children)

¤ Stability (rarely changed) ¤ represent organization, or group of organization

¨ Administrational layer

¤ represent groups of entities that belong to the same

  • rganization

¨ Managerial layer

¤ consist of nodes that may change regularly

slide-44
SLIDE 44

DNS name space

44

slide-45
SLIDE 45

Comparison of three layers

45

slide-46
SLIDE 46

Implementation of Name Resolution

46

¨ Depend on the distribution of a name space

across multiple name servers

¨ Each client has a name resolver ¨ 2 ways of implementation of name resolution:

¤ Iterative name resolution ¤ Recursive name resolution

slide-47
SLIDE 47

Iterative name resolution

47

slide-48
SLIDE 48

Recursive name resolution

48

slide-49
SLIDE 49

Recursive vs. iterative name resolution

49

slide-50
SLIDE 50

Example: DNS

50

[source: howstuffworks.com]

slide-51
SLIDE 51

DNS Terminology, Components, and Concepts

Top-Level Domain Hosts SubDomain Fully Qualified Domain Name (FQDN) Name Server Zone File Records

slide-52
SLIDE 52

Record types

Start of Authority (SOA)

A and AAAA Records CNAME records

slide-53
SLIDE 53

Record types

MX records NS records