Ds Ws 2014 Lecture4 - Naming - Truong
Ds Ws 2014 Lecture4 - Naming - Truong
Hong-Linh Truong
Distributed Systems Group,
Vienna University of Technology
[email protected]
dsg.tuwien.ac.at/staff/truong
DS WS 2014 1
What is this lecture about?
DS WS 2014 2
Learning Materials
Main reading:
Tanenbaum & Van Steen, Distributed Systems: Principles and
Paradigms, 2e, (c) 2007 Prentice-Hall
Chapter 5
George Coulouris, Jean Dollimore, Tim Kindberg, Gordon
Blair„Distributed Systems – Concepts and Design“, 5nd Edition
Chapters 10 & 13
DS WS 2014 3
Outline
DS WS 2014 4
BASIC CONCEPTS AND
DESIGN PRINCIPLES
DS WS 2014 5
Why naming systems are
important?
Q: Can you list some entities that are relevant to the
implementation of communication in distributed systems?
DS WS 2014 6
Why naming systems are complex?
DS WS 2014 7
Names, identifiers, and addresses
Name: set of bits/characters used to identify/refer to an
entity, a collective of entities, etc. in a context
Simply comparing two names, we might not be able to know if
they refer to the same entity
Identifier: a name that uniquely identifies an entity
the identifier is unique and refers to only one entity
Address: the name of an access point, the location of
an entity
Access Point
Address
binds
Resource accesses Process
refers to
Identifier
DS WS 2014 8
Naming design principles
DS WS 2014 9
Naming design principles
Name space
Contains all valid names recognized and managed
by a service
A valid name might not be bound to any entity
Alias: a name refers to another name
Naming domain
Name space with a single administrative authority which
manages names for the name space
Name resolution
A process to look up information/attributes from a
name
DS WS 2014 10
Naming design principles
P2P systems
independent nodes Identifier: m-bit key
Name resolution:
distributed hash tables
DS WS 2014 11
Naming design principles
Structures and characteristics of names are
based on different purposes
Data structure:
Can be simple, no structure at all, e.g., a set of bits:
$ uuid
bcff7102-3632-11e3-8d4a-0050b6590a3a
Can be complex
Include several data items to reflect different aspects on a
single entity
Names can include location information/reference or
not, e.g., GLN (Global Location Number) in logistics
Readability:
Human-readable or machine-processable formats
DS WS 2014 12
Naming design principles
Diverse name-to-address binding mechanisms
How a name is associated with an address or how
an identifier is associated with an entity
Names can be changed over the time and names are
valid in specific contexts
Dynamic or static binding?
Distributed or centralized management
Naming data is distributed over many places or not
Discovery/Resolution protocol
Names are managed by distributed services
Noone/single system can have a complete view of all
names
DS WS 2014 13
Examples of relationships among
different names/identifiers
URL
http://www.cdk5.net:8888/WebExamples/earth.html
http://www.cdk3.net:8888/WebExamples/earth.html
DNS lookup
Resource ID (IP number, port number, pathname)
Web server
Network address
2:60:8c:2:b0:5a file
2:60:8c:2:b0:5a
DS WS 2014 15
Flat naming
Unstructured/flat names: identifiers have no structured
description, e.g., just a set of bits
DS WS 2014 16
Broadcast based Name Resolution
Principles
Assume that we want find the access point of the
entity en
Broadcast the identifier of en, e.g., broadcast(ID(en))
Only en will return the access point, when the
broadcast message reaches nodes
Examples
ARP: from IP address to MAC address (the datalink
access point)
mail.infosys.tuwien.ac.at (128.131.172.240) at 00:19:b9:f2:07:55 [ether] on eth0
sw-ea-1.kom.tuwien.ac.at (128.131.172.1) at 00:08:e3:ff:fc:c8 [ether] on eth0
DS WS 2014 17
Dynamic systems
DS WS 2014 20
Example - Chord
Resolving at p
Keep m entries in a finger
table FT
2 2 , 1, … ,
DS WS 2014 21
STRUCTURED NAMING
DS WS 2014 22
Name spaces
Names are organized into a name space which can be
modeled as a graph:
Leaf node versus directory node
Each leaf node represents an entity; nodes are also entities
An absolute
path name
Directory table
(label,identifier)
An relative
path name
Hard links:
multiple absolute
paths names
referring to the
same node
Symbolic links:
leaf node storing
an absolute path
name
Source: Andrew S. Tanenbaum and Maarten van Steen, Distributed Systems – Principles and Paradigms, 2nd Edition, 2007, Prentice-Hall
DS WS 2014 25
Name resolution - Mounting
A directory node (mounting point) in a remote
server can be mounted into a local node (mount
point)
Source: Andrew S. Tanenbaum and Maarten van Steen, Distributed Systems – Principles and Paradigms, 2nd Edition, 2007, Prentice-Hall
DS WS 2014 26
Name space implementation
DS WS 2014 27
Example in Domain Name System
Source: Andrew S. Tanenbaum and Maarten van Steen, Distributed Systems – Principles and Paradigms, 2nd Edition, 2007, Prentice-Hall
DS WS 2014 28
Characteristics of distribution
layers
Source: Andrew S. Tanenbaum and Maarten van Steen, Distributed Systems – Principles and Paradigms, 2nd Edition, 2007, Prentice-Hall
DS WS 2014 29
Name Resolution
Iterative name resolution at Iterative name resolution at
resolver side Name
server side
Steps 1,2
Server 1 Name Step 1 Name
Resolver Server 1
Name Steps 3,4 Step 6
Resolver Name
Server 2 Steps 2,3 Steps 4,5
Step 1
Name Name
Resolver Step 6 Server 1
Recursive name
Step 2 Step 5 resolution
Name Step 3
Name
Server 2
Server 3
Step 4
DS WS 2014 30
Example -- Iterative name
resolution
Source: Andrew S. Tanenbaum and Maarten van Steen, Distributed Systems – Principles and Paradigms, 2nd Edition, 2007, Prentice-Hall
DS WS 2014 31
Example -- Recursive name
resolution
Source: Andrew S. Tanenbaum and Maarten van Steen, Distributed Systems – Principles and Paradigms, 2nd Edition, 2007, Prentice-Hall
Source: Andrew S. Tanenbaum and Maarten van Steen, Distributed Systems – Principles and Paradigms, 2nd Edition, 2007, Prentice-Hall
DS WS 2014 34
DNS Name Servers Example
Administered Zone
Administered Zone Name Server com at
Name Server
Administered Zone
Administered Zone Name Server ac
facebook tuwien
Administered Zone
Administered Administered Name Server
DS WS 2014 36
Examples
DS WS 2014 37
ATTRIBUTE-BASED NAMING
DS WS 2014 38
Attributes/Values
DS WS 2014 39
Attribute-based naming systems
DS WS 2014 40
LDAP data model
Object class: describe information about objects/entities
using tuple(attribute,value)
Hierarchical object class
Directory entry: object entry for a particular object, alias
entry for alternative naming and subentry for other
information
Directory Information Base (DIB): collection of all
directory entries
Each entry is identified by a distinguished name (DN)
Directory Information Tree (DIT): the tree structure for
entries in DIB
DS WS 2014 41
LDAP – Lightweight Directory
Access Protocol
http://tools.ietf.org/html/rfc4510
Example of attributes/values
Source: Andrew S. Tanenbaum and Maarten van Steen, Distributed Systems – Principles and Paradigms, 2nd Edition, 2007, Prentice-Hall
DS WS 2014 42
LDAP-- Interaction
Client-server protocol
Directory
Information
Base (DIB)
Directory Fragment
Information
Directory Information Tree for
Base (DIB)
DS WS 2014 43 the whole service
Fragment
Example with Apache DS/DS Studio
http://directory.apache.org/
Apache DS: a directory service supporting LDAP and others
Apache Directory Studio: tooling platform for LDAP
DS WS 2014 44
NAMING SERVICES IN THE
WEB
DS WS 2014 45
Web services – service identifier
DS WS 2014 46
Web services -- discovery
Web Web
Services Services
publishes storage
Web provides
Services
Web Services
Provider
Registry implementations
WSO2 Governance Registry -
http://wso2.com/products/governance-registry/
java UDDI (jUDDI) - http://juddi.apache.org/
DS WS 2014 47
OpenID – people identifier in the
Web
Several services offering individual identifiers
Your google ID, Your yahoo ID, etc.
But there will be no single provider for all people
We need mechanisms to accept identifiers from different
providers
OpenID standard enables identifiers for people that can
be accepted by several service provider
An OpenID identifier is described as a URL
E.g., https://me.yahoo.com/a/.....
DS WS 2014 49
OpenID interactions
DS WS 2014 50
A REAL-WORLD HOME WORK
DS WS 2014 51
Problems
A very big organization in EU has many services and its own
employees from different locations. It uses distributed LDAP
servers for managing names/identifiers of its employees and
services
The organization has a lot of external users from different
companies and freelancers (external partners)
Some companies are big with a lot of people working for the
organization in a short term, some have only a few people
The organization wants to support the collaboration among
members of different teams and a team consists of people from the
organization and external partners
The organization does not want to manage external people but
it trusts its external partners
DS WS 2014 52
Approach to solution
The organization asked us possible solutions for managing team
members by allowing them to access different services of the
organization
We suggested the organization to develop
Develop an OpenID service so that the organization is also an
OpenID provider, by using OpenID-to-LDAP software to
interface to internal LDAP servers
A naming service interfaces to external OpenID servers and the
organization’s OpenID service
Each team consists of a set of members, each member is
unified identified by an OpenID
Each team is associated with a set of services that it can use,
the service information is stored in LDAP server.
Homework: design your solution based on our suggestion so that
given a team you can find out member details and team services
DS WS 2014 53
Summary
Naming is a complex issue
Fundamental for other topics, e.g., communication
and access control in distributed systems
Data models/structures versus processes
Different models
Flat, structured and attributed-based naming
Different techniques to manage names
Centralized versus distributed
Different protocols for naming resolution
Dont forget to play with some simple examples
to understand existing concepts
DS WS 2014 54
Thanks for
your attention
Hong-Linh Truong
Distributed Systems Group
Vienna University of Technology
[email protected]
http://dsg.tuwien.ac.at/staff/truong
DS WS 2014 55