Download presentation
Presentation is loading. Please wait.
1
1 Lecture 8: Naming l Challenge: how do we efficiently locate wide area resources? n Naming: name -> IP address n Routing: IP address -> packet delivery l More generic challenge: how do we build wide area services? n Cache and replica coherence n Computation in the network
2
2 Domain Name System (DNS) l Design Assumptions n Names have global scope -- they mean the same thing everywhere n Names are organized hierarchically –ex: cnn.com, june.cs.washington.edu –each subtree can be assigned to different org n Caching and replication for performance, availability n Weak consistency to simplify implementation
3
3 Hierarchical Name Space l Ex: june.cs.washington.edu, june.com n OK to reuse names in different parts of tree root edu mil org uk com ca gwu wustl washington wsu mit june ward beaver
4
4 Name Space Delegation l Each organization controls its own name space (“zone” = subtree of global tree) n each org has its own name servers –replicated for availability n name servers translate only org names –client lookup proceeds step-by-step
5
5 DNS Lookup Example client local DNS proxy Root&edu DNS server washington DNS server cs DNS server cs.washington.edu washington=IPaddr cs.washington.edu cs=IPaddr’ june=IPaddr’’
6
6 Performance and Availability l DNS servers are replicated n name service available if >= one replica is up n queries load balanced between replicas l DNS queries are cached at local proxy n quick response for repeated translations n partial name caching (edu, washington.edu, cs.washington.edu, june.cs.washington.edu)
7
7 DNS Cache Effectiveness
8
8 Replica/Cache Coherence l How do we keep replicas/cached copies up to date? l DNS solution: eventual consistency n periodic downloads from master to replicas n cached data periodically times out –proxy must re-query server n ok if old data is provided temporarily?
9
9 Eventual Consistency Example Server replicas clients t+k:x’ x’ t+1:x ok t+1:reget x t:x’ t+q:x’ t+q:reget x
10
10 Coherence Models l Sequential consistency n all operations appear as if to a single, shared memory l Causal consistency n concurrent ops can occur in any order l Processor consistency n all ops by same host performed in order l Eventual consistency
11
11 Implementing Cache Coherence l User managed cache n ex: hit reload to get up-to-date version l Timeouts (NFS, WWW, DNS) n client periodically polls server for newest version l Callbacks (AFS, SMPs, transactions) n server notifies client whenever data changes n invalidation or update
12
12 Sequential Consistency Example Server replicas clients t+1:x’ x’ t+2:x’ t:x’ t+2:ack t+1:x’ t+3:ack t+5:ack t+4:ack Write doesn’t complete until all copies invalidated or updated
13
13 DNS Experience? l Single instance of globally distributed database in widespread use l Caching/replication crucial for performance l Simple consistency model n easy to implement, crucial for heterogeneity l System is difficult to evolve l Surprises: n negative caching,...
14
14 Active Networks l Motivation n Flexibility: can take decades to deploy new protocols n Performance: need to put functionality at most effective point in network l Approaches: n active packets -- programs in IP packets n active routers -- programmable routers n active services -- put servers in network
15
15 Active Names Motivation l Services have become complex, distributed programs l Clients have become heterogeneous l Implies need for: n Flexibility –client/service should be able to use any protocol n Performance –client/service should be able to move functionality into network
16
DNS Server URL Host Binding IP Address Image (1024X768) Proxy Server Static name -> IP address binding Naming and transport separate Names have global scope DNS Naming Reconsidered Not flexible or extensible
17
17 Adding Flexibility to Naming l Replica management n HTTP redirect –front end replies with server name –client reissues request to server n DNS round robin –rotate order of replicas provided to query n Cisco Local Director/Distributed Director –transparent redirection in routers n load balancing vs. distance, failover?
18
18 More Naming Flexibility l Customization n server customizes content to specific client –mycnn.com, advertisement rotation n client customizes content –format to display l Deployment of new IP features n mobility, larger address space
19
19 More Naming Flexibility l Location independent objects n Universal resource names (URNs) –URLs that can change servers –proposal: sed scripts to mangle names n Global object systems (e.g., Globe, Legion) –how do you scalably locate mobile objects?
20
Context-sensitive naming –User types cnn.com. –If client is behind a modem, it gets back a b/w image. –If client is a palm pilot, it gets a distilled image. –If the client is in Europe, it goes to the European replica. Combine naming and transport in one framework. Provide flexibility and extensibility in the way wide area resources are accessed. Active Names Scenario
21
Active Names: Basic Idea Data Name Programs Names resolved to mobile, secure programs Flexibility Active Names organized into hierarchical namespaces. A program is associated with each namespace. Namespace programs can be changed Extensibility. Active Names are connection oriented: better end-to-end semantics and performance.
22
Programming Model l Location independent programs » Programs may run on any AN node l Stream data model » Each program operates on a data stream which is the result of the previous program l Continuation passing style » Control does not have to return to the caller Request Program1 Program2 Client ProxyServer
23
23 Performance Gains Client Proxy Server Client Proxy Application customized transport protocols. Programs are location independent. Location can be chosen to optimally utilize resources (e.g., distillation). Customization can be performed close to client instead of at the server (e.g., to cache dynamic content). 3 way RPC
24
l Delegation n Active names organized in a hierarchy of namespaces n Namespace programs can delegate to subordinate namespaces Composing Services Root-HTTP cnn yahoo...
25
25 Composing Services l After methods n Continuation passing style programming n Namespace programs bundle remaining work into “after methods” before passing control –[Customizer|http|reply] -->[prefetch|http|distill|reply]
26
26 Security Protection between active name programs provided by Java’s type safety mechanism. Caller passes a certificate to the callee granting it a subset of its rights (e.g., to translate name). Transitive closure of the certificates determines the rights of a principal (e.g., to provide service). For instance, each caller might grant its callee the right to respond to the client.
27
Microkernel Architecture Virtual Machine Resolver NWNW $ Local Resources Namespaces Http DNS Distiller Hit Count... Utilities
28
28 Application 1: Replica Selection l DNS Round-Robin »Randomly choose replica »Avoid hot-spots l Distributed Director »Route to nearest replica »Geographic locality l Active Naming »Previous performance, distance »Adaptive l DNS Round-Robin »Randomly choose replica »Avoid hot-spots l Distributed Director »Route to nearest replica »Geographic locality l Active Naming »Previous performance, distance »Adaptive Berkeley Replica Seattle Replica Berkeley Clients
29
29 Replica Selection
30
30 Application 2: Mobile Distillation l Clients name a single object l Return object based on client network connection, screen l Current approach [Fox97] Proxy maintains client profile Requests object, distills l Active naming Transmit name + applet Flexible distillation point Tradeoff computation/bw Support mobile clients Client-Specific Naming Variables: Network Screen
31
31 Application 2: Mobile Distillation Distillation at Server: Saves bandwidth Proxy: Saves server CPU cycles Active: Cost estimate of both approaches
32
32 Application 3: Customization Client customization: distilling the image Server customization: ad rotation, server-side includes. Composing these customizations using Active Names leads to 2-fold improvement in performance: -Server customization can take place at proxy. -Distillation further improves performance.
33
33 Application 4: Active Caches How to improve on 50% cache hit rates?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.