Name and Identity Resolution
202402271208
Status: #idea
Tags: DC
Name and Identity Resolution
- Names - Entities in a distributed system
- To operate an entity, there should be an access point
- Access point has an address
Naming types
- Flat naming
- Simple broadcasting (ARP)
- Name carries no information about how to locate the access point of the entity
- Structured naming
- Names that humans can understand (a path)
- Eg. DNS, Network file server
- Attribute naming
- Name that can be searched easily
- Eg. LDAP, Active Directory
Chord-based Distributed Hash Table
- Each node is assigned a unique random
-bit identifier (128-160 bit) - Entity with key
falls under jurisdiction of node with smaller - Called its successor
- Called its successor
Chord Finger Table (FT)
- Each node
maintains FT (array) where -
] stores the successor of node at certain distance. The links are at exponential distances is the immediate successor of always
-
- To lookup a key
, node forwards the request to node such that: - TODO SLIDE 6
- Example: Chord with
- TODO image from slide
-> Choose a random node, in this case node
- Node
searches its FT, since , forward the request to node - In node
, . Send it to node - In node
, . Send it to node - In node
, , hence, it has to be in node - In node
, search stops and value attached to key is sent to node
- Order of search space is
Dealing with Failures
- Node joining and leaving at random
- Joining
- Node
wants to join. It requests a lookup for
- Node
- To ensure
of every node is not wrong, periodically recompute (TODO)
forever {
node q requests r = succ(q + 1) to return p = pred(r).
if (q != p) then q < p <= succ(q+1), hence FT_q[1] = p
else break
}
- To update finger table, update sucessor of each entry in FT
- Each
pings to check if it is alive. If not, mark - When
requests , to reutrn and recieves , then notify to set
- When
Implementing Chord ( -bit)
TODO slide 9
# len(node_set) =
def succ(key):
if key < node_set[0]:
return node_set[0]
elif key > node_set[len(node_set) - 1]:
return node_set[m - 1]
for node in node_set:
if key < node:
return node
def finger(i):
return succ((ID + 2 ** (i - 1)) % MAXPROC)
def recomputeFingerTable():
FT[0] = node_set[(ID - 1) % len(node_set)]
FT[1:] = [finger() for i in range(1, m + 1)]
FT.append(ID)
def localSuccNode(key):
if FT[0] < key <= ID: # self has the key
return ID
elif ID < key <= FT[1]:
pass
else:
pass
Exploiting Network Proximity
- Topology-awaare node assigment
- When assigning an ID to a node, make sure that nodes close in the ID space are also close in the network
- Very difficult in practice
- Prooximity routing
- Maintain more than one possible successor, and forward to the closest
- Store pointers to other nodes in
points to the first node in this list
- Proximity neighbour selection
- Whee there is a choice of selecting who your neighbour is, pick the clostest one
- Pastry system (internet-based DHT) to ensure fault tolerance - Not strictly Chord
Structured Naming
- Naming graph (DAG)
- A leaf node -> A named entity
- A director node refers to other nodes
- Typically has a single root node