10.07.2015 Views

Naming, Trading, Directory and Discovery Services (CDK – chap.9)

Naming, Trading, Directory and Discovery Services (CDK – chap.9)

Naming, Trading, Directory and Discovery Services (CDK – chap.9)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Naming</strong>, <strong>Trading</strong>, <strong>Directory</strong> <strong>and</strong><strong>Discovery</strong> <strong>Services</strong>(<strong>CDK</strong> – <strong>chap.9</strong>)“The name of a resource indicates what we seek, an address indicateswhere it is <strong>and</strong> a route tells us how to get there.” - J. F. Shock 1978• A name is a symbol (human readable string) identifying someresource or object. Highest level of identifier.• The purpose of names in computing systems is to giveindependence from implementation structures.• To be useful there will be some mechanism to map names intoaddresses. This mapping may change over time <strong>and</strong> the mappingcan be done at runtime.Key distributed systems issue is transparency. Users of a distributedsystem shouldn't need to know (ideally) anything about the underlyinginfrastructure.<strong>Naming</strong>:• Locating components by external names• Similar to telephone directory<strong>Trading</strong> & <strong>Directory</strong> services:• Locating components by service characteristics• Similar to yellow pages<strong>Discovery</strong> services:• Similar to <strong>Trading</strong>/<strong>Directory</strong> services• “Find” the desired serviceIan Johnson 55 Distributed Systems


Example Name & <strong>Directory</strong> <strong>Services</strong>• X.500 <strong>Directory</strong> Service• Internet Domain Name Service (DNS)• CORBA <strong>Naming</strong> Service• Sun NIS+• Java Registry• Novell <strong>Directory</strong> <strong>Services</strong> (NDS)Example <strong>Discovery</strong> Protocols• Multicast udp• UPNP SSDP• JiniName SpacesGlobal (Absolute)A single name space where there is a one to one mapping between names<strong>and</strong> entities so that one entity is known by one name to all other entities.A white page directory for the whole world . Simple but unmanageablefor large distributed systems as the name space becomes too large.Local (Relative)A particular name may identify different entities in a different context.Names could identify the same entity or different entities depending onthe context in which it is taken.Ian Johnson 56 Distributed Systems


<strong>Naming</strong> <strong>Services</strong>• Name AssignmentPerformed by the creators of the object where a name isbound to an object.• Name DistributionApportions the responsibility for managing parts of the namespace among naming authorities• Name ResolutionDenotes the process of determining the naming authoritiesfor an object given only its name. Once the authorities arediscovered operations can be invoked to read or updateinformation about the object such as the location.IssuesQualities of service!• Distribution of name spaces• Performance profile• Caching• Replication• Transaction properties of naming operations• <strong>Naming</strong> servers are distributed systemsIan Johnson 57 Distributed Systems


The DNS name spaceDivided into zones.Zones contain one (or more) domains.Name server(s) allocated to zones.Ian Johnson 58 Distributed Systems


DNS Name space partitioningDNS Name Space DistributionItemGlobalAdministrationalManagerialGeographical scale of networkWorldwideOrganizationDepartmentTotal number of nodesFewManyVast numbersResponsiveness to lookupsSecondsMillisecondsImmediateUpdate propagationLazyImmediateImmediateNumber of replicasManyNone or fewNoneIs client-side caching applied?YesYesSometimesIan Johnson 59 Distributed Systems


DNS Name Server OrganisationNote: Name server names are initalics, <strong>and</strong> the correspondingdomains are in parentheses.a.root-servers.net(root)Arrows denote name server entriesns1.nic.uk(uk)co.ukac.ukukpurdue.eduyahoo.comns0.ja.net(ac.uk)ns.purdue.edu(purdue.edu)* .purdue.eduic.ac.ukqmw.ac.ukdcs.qmw.ac.uk*.qmw.ac.uk*.dcs.qmw.ac.uk*.ic.ac.ukalpha.qmw.ac.uk(qmw.ac.uk)dns0.dcs.qmw.ac.uk(dcs.qmw.ac.uk)dns0-doc.ic.ac.uk(ic.ac.uk)Name Resolution21TCPServer2337UDPWeb browser or clientprogram ClienResolverTCP UDPZone DNSServerIIIan Johnson 60 Distributed Systems


Iterative Name LookupNS2Clien213NSName serversNS3A client iteratively contacts name servers NS1–NS3 in order to resolve anameIan Johnson 61 Distributed Systems


Recursive Name lookupclient14NS12NS23NS3client15NS124NS23NS3Nonrecursiveserver-eRecursivservercontrollecontrolledA name server NS1 communicates with other name servers on behalf of aclientDNS permits both forms <strong>and</strong> includes cacheingIan Johnson 62 Distributed Systems


Recursive Name ResolutionServer fornodeShouldresolveLooks upPasses tochildReceives<strong>and</strong> cachesReturns torequestercs#----#vu####ni######root########Comparison of Recursive & Iterative ResolutionIan Johnson 63 Distributed Systems


Types of DNS RecordsRecord type Meaning Main contentsA A computer address IP numberNAn authoritative name server Domain name for serverS CNAME The canonical name for an alias Domain name for aliasSO Marks the start of data for a zone Parameters governing the zoneA WKS A well-known service description List of service names <strong>and</strong> protocolsPTR Domain name pointer (reverse Domain namelookups)HINFO Host information Machine architecture <strong>and</strong> operatingsystemMX Mail exchange List of < preference, host > pairsTXT Text string Arbitrary textDNS APIThere exist a number of routines which will allow DNS searching <strong>and</strong>mapping of:• network names to network address numbersgethostname( ), gethostbyname( ), gethostbyaddress( )• protocol names to protocol numbersgetprotobyname( ), getprotobynumber( ),• service names to port numbersgetservbyname( ), getservbyport( ),Ian Johnson 64 Distributed Systems


Organisation of name services(assuming Sun Solaris)gethostbyname( )call on SunSolaris is able toleverage a wholenumber ofdirectory <strong>and</strong>name services ina seamlessmanner.NIShosts.bynamegethostbyname( ){ alsogetservbyname( )getprotobyname( )NSSWITCHhosts: files nisplus dnsNIS+hosts.org_dirFILES/etc/hostsNSCDhostsDNS“A”recordsNSCD = Name Server Caching Daemon – caches all below plus LDAPIan Johnson 65 Distributed Systems


Limitations of DNSDevised as the only Internet name serviceDoes not coexist (cf. NSswitch) with local name services such as– Suns Network Information services NIS+– Microsoft Active <strong>Directory</strong> <strong>Services</strong>–Stores pairs with name lookup rather thanattribute lookupStores limited naming data• computers• name servers• mail hostsHowever being upgraded for IPv6Ian Johnson 66 Distributed Systems


<strong>Directory</strong> <strong>Services</strong>Attribute lookup, much more useful both for local <strong>and</strong> Internet use.Most often object oriented based information systemsExamples:• X500• Microsoft Active <strong>Directory</strong> ServiceIan Johnson 67 Distributed Systems


Global <strong>Directory</strong> <strong>Services</strong>Large number of different network directories:-InternetDNS, SNMP MIBSGSM WirelessHLR, VLR, TMN MIBSHLR (Home Location Register) contains user information such asaccount information, account status, user preferences, features subscribedto by the user, user's current location, etc. The data stored in HLRs for thedifferent types of networks is similar but does differ in some details.VLR (Visitor Location Register) – when roamingTMN = Telecommunications Management NetworkNetwork Operating SystemsSun NIS++, Novel NDS, Microsoft ADSMotivation to create more “intelligent” global network by makingdirectory services more interoperable• IETF DEN <strong>Directory</strong> Enabled Networking (CISCO, MS)• LDAP a common directory access protocolIan Johnson 68 Distributed Systems


<strong>Naming</strong> & <strong>Directory</strong> <strong>Services</strong>SummaryConstructing a world-wide scaleable naming service using the ideaspresented has been possible e.g., DNS<strong>Directory</strong> services have enhanced basic naming servers by allowingobject location search on class <strong>and</strong> attributes. Very useful when you don’tremember the full name of what you seek.However <strong>Directory</strong> <strong>Services</strong> are generally platform dependent withdifferent object models <strong>and</strong> schemas so full universal search is not alwayspossibleLDAP (Lightweight <strong>Directory</strong> Access Protocol) has emerged as a way ofaccessing many types of directories using one protocol. Most directoriesare LDAP enabled.Mobile objects where name to address bindings change frequentlypresents a problem. Can lead to long chains of forward referencing indirectories <strong>and</strong> name servers.Ian Johnson 69 Distributed Systems


<strong>Trading</strong> & <strong>Discovery</strong>Locating objects in location transparent way<strong>Naming</strong> simple but may not be suitable when• clients do not know server• there are multiple servers to choose fromInappropriate if client wants to use a service of a certain quality but doesnot know /care who from• Video on dem<strong>and</strong>,• Electronic commerce.<strong>Trading</strong> supports locating servers based on service functionality <strong>and</strong>quality.<strong>Naming</strong> = White pages<strong>Trading</strong> = Yellow PagesTrader operates as broker between client <strong>and</strong> server.Enables client to change perspective from ´who?´ to ´what?´Ian Johnson 70 Distributed Systems


CharacteristicsCommon language between client <strong>and</strong> server:• Service types• Qualities of serviceServer registers service with trader.Server defines assured quality of service:• Static QoS definition• Dynamic QoS definition.Clients ask trader for• a service of a certain type• at a certain level of qualityTrader supports• service matching• service shoppingIan Johnson 71 Distributed Systems


Trader PoliciesDepending on constraint <strong>and</strong> available services, a large set of offermight be returned by a query.<strong>Trading</strong> policies are used to restrict the size of the matched offers• Specification of an upper limit• Restriction on service replacements• Restriction on modifiable properties (these might changebetween match making <strong>and</strong> service requests)Federated TradersScalability dem<strong>and</strong>s federation of tradersA trader participating in a federation• offers the services it knows about to other traders• forwards queries it cannot satisfy to other tradersProblems• Non-termination of import• Duplication of matched offersIan Johnson 72 Distributed Systems


Consider a Video on Dem<strong>and</strong>Service."I want to watch the matrix":Client :Trader MGM:VoDS Warner:VoDSexport()export()query()download()modify()Ian Johnson 73 Distributed Systems


Example CORBAApplicationObjectsVerticalCORBA FacilitiesHorizontalCORBA FacilitiesObject Request BrokerCORBA <strong>Services</strong>Trader ServiceWithin CORBA, a naming service is available as well as a trading serviceThe ORB mediates between clients & serversIan Johnson 74 Distributed Systems


Service <strong>Discovery</strong>Service discovery is an integral part of building ad hoc, self-configuringnetworks.Mobile computing requires a time-dependent resolution of many networkrelationships where name to address bindings change frequently. (Thewhole network can reconfigure - Spontaneous ad hoc network)<strong>Services</strong> may advertise their existence in a dynamic way.<strong>Discovery</strong> protocolsThese provide the mechanisms for dynamically discovering services in anetwork, providing the necessary information to:• Search <strong>and</strong> browse for services• Choose the right service• Use the serviceCurrent Examples:• Service Location Protocol (SLP)• Universal Plug <strong>and</strong> Play (UPnP) (more correctly SSDP)• Jini• Salutation• Secure Service <strong>Discovery</strong> Service (SSDS)• Bluetooth Service <strong>Discovery</strong> ProtocolIan Johnson 75 Distributed Systems


Broad Comparison:Service <strong>Discovery</strong> in JINIClient1. ‘finance’lookup service?PrintingserviceadminadminLookupservice4. Use printingserviceNetwork2. Here I am: .....Clientadmin, financeCorporateinfoservicePrintingservicefinance3. RequestprintingLookupserviceIan Johnson 76 Distributed Systems


¡¡¡¡¡¡¡¡¡¡Service <strong>Discovery</strong> with UPnPUPnP Protocol StackVendor-specific API aboveUPnP vendorUPnP ForumUPnP Device ArchitectureHTTPU/MUUDPUDPIPIPGENASSDPSOAPHTTPTCPVendor-specific OS belowHTTPGENAVendor-specific physical net1 <strong>Discovery</strong>Control pointfinds interestingdevice0 get address1 discover deviceAdvertise / findtyped devices(services)Guarantee ofminimalcapabilitiesSimpleDevicesAdvertise whenaddedRefreshadvertisements(cf. lease)Canceladvertisementswhen removedControl pointssearch as neededDevices respondControl pointsfilterIan Johnson 77 Distributed Systems


• <strong>Discovery</strong> is done primarily on the basis of the type of the device<strong>and</strong> service• Domain-specific device <strong>and</strong> service types are defined byUPnP Forum working committees.• Types guarantee a minimum set of capabilities. Vendors mayadd other capabilities to differentiate. Description(upcoming) indicates what actually got implemented.• <strong>Discovery</strong> also on the basis of unique ID. Allows apps to reconnectto specific devices.• <strong>Discovery</strong> uses very simple matching. Helps keep b<strong>and</strong>widthrequirements <strong>and</strong> device costs down. Control points must filterdiscovery.• Devices advertise <strong>and</strong> cancel advertisements to join <strong>and</strong> leave thenetwork. Because devices might leave the network w/o warning(e.g., user pulls power cord to plug in vacuum cleaner),advertisements expire on their own. This is like a lease where thedevice must renew the advertisement (lease) to keep it active.• Two-party discovery covers both types of nodes being added to thenetwork• Devices advertise when they are added to the network.• Control points search when they are added to the network.<strong>Discovery</strong> uses a multicast variant of HTTP (HTTPMU) for deviceadvertisements <strong>and</strong> control point searches. <strong>Discovery</strong> uses a unicastvariant of HTTP (HTTPU) for responses to searches.Ian Johnson 78 Distributed Systems


1 <strong>Discovery</strong>: SSDP SidebarWhat is SSDP?IETF Draft Simple Service <strong>Discovery</strong>ProtocolKey design principlesAdministratively-scoped multicastUnicast responsesUDPVery simple advertisementsVery simple searchDescription starts after getting an IP address <strong>and</strong> after discovering adevice.Descriptions are in two parts: one for the device, <strong>and</strong> one per nestedservice. The location of the device description is in the discoverymessages (LOCATION header). The location of the service description isin the device description.Descriptions explicitly declare capabilities whereas device <strong>and</strong> servicetype implicitly declare them.Simple protocol stack using only HTTP -> TCP -> IP.Description expressed in XMLIan Johnson 79 Distributed Systems


Revision:3 Key Topics• Security & Cryptography• <strong>Naming</strong>, <strong>Trading</strong> & <strong>Discovery</strong>• Time & Global state<strong>CDK</strong> Chapters• 1, 2, = intro• 4, 5, 17 = lab exercises• 7, 9, 10 = key chaptersAssumptions:• You've read <strong>CDK</strong>• Attended the lectures• You've done the lab exercises & assignments!• You won't need to write any codeIan Johnson 80 Distributed Systems

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!