• No results found

Naming vs. Locating Entities

N/A
N/A
Protected

Academic year: 2021

Share "Naming vs. Locating Entities"

Copied!
21
0
0

Loading.... (view fulltext now)

Full text

(1)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

45

Chapter 3: Naming

Naming vs. Locating Entities

a) Direct, single level mapping between names and addresses

b) Two-level mapping using identifiers. Needs a location service to resolve identifiers

Till now: resources with fixed locations (hierarchical, caching, ...)

Problem: some entity may change its location frequently

Simple solution: record aliases for the new address or the new name

But: efficiency, re-use of old names, ...

New approaches are necessary, e.g. identifiers for an resource

(2)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

46

Chapter 3: Naming

Simple Solution for a Location Service

Using Broadcast or Multicast

Broadcast is typically offered in LANs

Simple locating process: broadcast identifier and wait on a reply (principle used in ARP)

But: inefficient in large systems

More efficient: using multicast for location

(3)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

47

Chapter 3: Naming

Forwarding Pointers (1)

More popular approach for location:

Forwarding Pointers

Principle:

• A moving entity leaves behind a reference to the new location

• Client follows the chain of forwarding pointers

But...

Long chains make the location process very expensive

Intermediate nodes have to store all pointers as long as needed

Broken links prohibit location

Short chains and robust pointers are needed

old location

(4)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

48

Chapter 3: Naming

Forwarding Pointers (2)

When an object moves it leaves behind a proxy having the new location reference

Location is transparent for the client, request is forwarded along the chain

Object sends back its new location to the caller, the forwarding pointer is redirected

(5)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

49

Chapter 3: Naming

Home-Based Approaches

• Popular approach for large-scale networks: home location

• Similar principle as used in Mobile IP

(6)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

50

Chapter 3: Naming

Hierarchical Approaches

Extending the home-based approach to several layers

Network is divided into domains, sub-domains, ... (similar to DNS)

Leaf domains: local area network, cell in a mobile telephone network, ...

An entity located in domain D is represented by a location record in directory node dir(D)

(7)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

51

Chapter 3: Naming

Information Stored in Nodes

• Entities may have multiple addresses (e.g. replication) • Higher-level node stores pointers to each location

(8)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

52

Chapter 3: Naming

Location Lookup

• Looking up a location in a hierarchically organized location service • Client contacts directory node in its own domain

(9)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

53

Chapter 3: Naming

Location Update

a) An insert request is forwarded to the first node that knows about entity E. b) A chain of forwarding pointers to the leaf node is created.

Install a replicate in a new domain: new pointers have to be set

(10)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

54

Chapter 3: Naming

Pointer Caches

• Caching can be used to store locations of 'stable' nodes

• Location caching: inefficient lookup with each location change

• Pointer caching: Caching a reference to a directory node (dir(D)) of the lowest-level domain in which an entity (E) will reside most of the time.

(11)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

55

Chapter 3: Naming

Invalidation of Pointer Caches

• A cache entry that needs to be invalidated because it returns a non-local address, while such an address is available.

(12)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

56

Chapter 3: Naming

Scalability Issues

• Root directory node becomes bottleneck

• Solution: placing sub-nodes of a partitioned root across the network

• Spread sub-nodes uniformly; but… new scalability problems: which node to give responsibility???

(13)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

57

Chapter 3: Naming

The Problem of Unreferenced Objects

• Problem with forwarding pointers: unreferenced object

• Garbage collection for remote objects: hidden from clients and objects itself • How many proxies point to another one?

(14)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

58

Chapter 3: Naming

Solution: Reference Counting

• Simply count the references pointing to you • Problem: unreliable communication

Process P expects to get an acknowledgement when it increases the skeletons counter

Acknowledgement can get lost

P sends the increase message again • Necessary to detect duplicates

(15)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

59

Chapter 3: Naming

Reference Counting

a) Copying a reference to another process and incrementing the counter too late b) Solution by using acknowledgements

Another problem: copying a remote reference to another process

One more problem: performance problems in large-scale systems by communication

(16)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

60

Chapter 3: Naming

Advanced Referencing Counting

a) The initial assignment of weights in weighted reference counting b) Weight assignment when creating a new reference.

Weighted reference counting: each object has • A fixed total weight

• A partial weight, initialised with the total weight

Creating a remote reference causes transmitting half the partial weight to the referencer

(17)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

61

Chapter 3: Naming

Weighted Referencing Counting

• Copying a reference to P2 causes P1 in transmitting half the weight

• Deleting a reference causes the remote object to subtract the weight of the referencer from its total weight

(18)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

62

Chapter 3: Naming

Weighted Referencing Counting

• Problem: the partial weight of the remote object can become zero. What is with former objects which want to make a reference?

• Make use of indirections when partial weight reaches one

• When copying the reference to P2, P1 creates a local skeleton with some total weight and the same partial weight

(19)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

63

Chapter 3: Naming

Generation Referencing Counting

• Alternative to the use of indirections: generation reference counting

• Associate a generation and a copy counter with each referencing process • Both counters are initialised with zero

• When copying a reference, the copy counter is increased; the new referencer becomes the next generation compared to the old one

• Skeleton maintains the numbers of outstanding copies for each generation; in case of a decrement request, the counter for the referencer's generation is decreased. The copies of the referencer is added to the next generation. If all generation entries are zero, there are no more references

(20)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

64

Chapter 3: Naming

And much simpler...

Reference listing

• Skeleton keeps track of the proxies having a reference to it, i.e. it has a list of all these proxies (reference list) instead of a counter

No problems with duplicated increments

Easy to keep the list consistent in case of process failures

Problem: copying a reference and deleting it too early (as in reference counting)

Main drawback: bad scalability in case of many references • Used in Java RMI

(21)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

65

Chapter 3: Naming

Conclusion

Different concepts:

• Naming Services for mapping of logical names to addresses

• Directory Services for searching addresses by describing the needed object • Discovery Services as a name database in “dynamic” networks

• Location Services for supporting moving objects

• Some close relations to file systems and reference counting What is the best concept?

References

Related documents

If the alien sees other aliens nearby it will attack the player, but if it is alone, it will flee.. The behind this kind of behavior is to make the aliens attack in pairs

Potential Acute Health Effects: Hazardous in case of skin contact (irritant), of eye contact (irritant), of ingestion, of inhalation.. Potential Chronic

Moghaddam, Narges Shayesteh; Saedi, Soheil; Amerinatanzi, Amirhesam; Saghaian, Ehsan; Jahadakbar, Ahmadreza; Karaca, Haluk E.; and Elahinia, Mohammad, "Selective Laser Melting

The expansion of aquaculture and the recent development of more intensive land-based marine farms require commercially-valuable halophytic plants for the treatment

A novel monitoring mechanism is proposed to evaluate the fault tolerant capability of an NoC by: (1) using a compact monitor probe to detect the events of each NoC node; (2) re-

Informative genes are selected for classifying the four gene expression datasets of prostate cancer, lung cancer, leukemia and non-small cell lung cancer (NSCLC) and the rationality

To the fullest extent permitted by law, the CONTRACTOR shall indemnify and hold harmless the County of Lucas, its officers, officials and employees (hereinafter “County”), or any

Currently, the temperature sensors, which are used in multiple critical locations on most mold cavities, have proven effective in producing a superior and much more consistent