210 likes | 305 Views
Processes II. CSE5306 Lecture Quiz 6 due at 5 PM Saturday, 6 September 2014. Networked User (Client) Interfaces. There are 2 modes of client-server interaction: Fat-client PDA synchronizes schedule with cloud—an app-specific protocol handles the call (e.g., X Window system).
E N D
Processes II CSE5306 Lecture Quiz 6 due at 5 PM Saturday, 6 September 2014
Networked User (Client) Interfaces • There are 2 modes of client-server interaction: • Fat-client PDA synchronizes schedule with cloud—an app-specific protocol handles the call (e.g., X Window system). • Thin-client terminal uses server’s apps and storage—app-independent protocol handles call.
The X Window System • X Window System controls bit-mapped terminal’s monitor, keyboard and mouse. • X kernel (server) contains terminal-specific device drivers, accessible to the (possibly remote) client apps via the Xlib interface and its X protocol. • The window manager defines the display’s look and feel, but any number of client apps can concurrently communicate with all devices.
Thin-Client Network Computing • A series of commands must be sent to X kernel to set up the display, and then bit-mapped images must be sent a pixel at a time. These could slow down cell phone images in a WAN. • NX re-engineered the X protocol: • It compresses the recurring fixed parts of messages. • On both ends of a link, it caches prior display configurations, which can be looked up and possibly edited with minimal new data. • In case of a cache miss, a whole new configuration can be sent in compressed form. • Overall bandwidth is 1000x compressed to only 9600bps. • THINC translates high-level display commands into pixels.
Compound Documents • A compound document is a diverse collection of text, images, spreadsheets, which are seamlessly integrated at the user-interface level. • To drag and drop a file into the trash, the trash app must accept the file’s contents and identifiers from the file manager app. • To rotate and insert an image into a text file, a graphics app must tell the word-wrapping word processor the image’s new dimensions and position. • The compound document user interface hides the fact that different apps are working on different parts of the document.
Client-Side Software for Distribution Transparency • Automatic teller machines, cash registers, barcode readers, TV set-top boxes have user interfaces, plus considerable software for local processing and communications with replicated (access transparent) remote servers. • Various servers pretend to be the same by generating a client stub, which describes the client interface that all replicates have in common. • Bindings to a mobile client can be passed by name from one server to another transparently, without divulging the client’s actual position. • A client can request web pages from many replicated servers and quickly gather them up for its app. • Client middleware can mask failures by transparently connecting to another server, when the first’s quality-of-service becomes unacceptable. • Transaction monitors can significantly reduce an ATM’s workload.
R U O K ? 1. What are examples of the most commonly used client-server interaction modes? • A fat-client PDA synchronizes its schedule with its work group’s cloud. (An app-specific protocol handles the call; e.g., X Window system.) • A thin-client terminal uses the server’s apps and storage. (An app-independent protocol handles call.) • Both of the above. • None of the above.
R U O K ? 2. Which of the following accurately characterize the X window system? • The X Window System controls a bit-mapped terminal’s monitor, keyboard and mouse. • The X kernel (server) contains terminal-specific device drivers, accessible to the (possibly remote) client apps via the Xlib interface and its X protocol. • The window manager defines the display’s look and feel. • Any number of client apps can concurrently communicate with all devices. • All of the above.
R U O K ? 3. How did NX improve the X protocol’s performance? • It compressed the recurring fixed parts of messages. • On both ends of a link, it cached prior display configurations, which could be looked up and possibly edited with minimal new data. • In case of cache misses, a whole new configuration could be sent in compressed form. • Overall bandwidth was compressed 1000x to only 9600bps. • All of the above.
R U O K ? 4. Which of the following accurately describe compound documents? • A diverse collection of text, images, spreadsheets, which are seamlessly integrated at the user-interface level. • To drag and drop a file into the trash, the trash app must accept the file’s contents and identifiers from the file manager app. • To rotate and insert an image into a text file, a graphics app must tell the word-wrapping word processor the image’s new dimensions and position. • The compound document user interface hides the fact that different apps are working on different parts of the document. • All of the above.
R U O K ? 5. Which of the following should the process designer consider to ensure distribution transparency in client-side software? • In addition to their obvious user interfaces, automatic teller machines, cash registers, barcode readers, TV set-top boxes need considerable software for local processing and communications with replicated (access transparent) remote servers. Transaction monitors can significantly reduce an ATM’s workload. • Various servers can pretend to be the same by generating a client stub, which describes the client interface that all replicates have in common. Thus, a client can request web pages from many replicated servers and quickly gather them up for its app. • Client middleware can mask failures by transparently connecting to another server, when the first’s quality-of-service becomes unacceptable. And bindings to a mobile client can be passed by name from one server to another transparently, without divulging the client’s actual position. • All of the above. • None of the above.
General Server Design Issues • Server • A process serving one client group. • Await request; ensure request is served; repeat. • Iterative s. handles request itself. • Concurrent s. passes every request to another s. • End point (port) • Name services identify machines hosting servers. • TCP port 21 for Internet FTP requests • TCP port 80 for worldwide web HTTP servers. • A well-known port’s daemon may redirect clients.
General Server Design Issues (continued) • Superserver • Forks process to serve request, and then exit. • UNIX’ inetd daemon listens to Internet ports. • Interrupting server • Stop downloading wrong (long) file. • Exiting client app looks like client crashed! • Send out-of-band data on higher priority port. • TCP passes urgent through requesting port.
General Server Design Issues (continued) • Stateless server • Keeps no record of client’s states. • Notifies no one when it updates its files. • For example, web servers. • All client requests are logged for replication info. • Soft state server keeps state for limited time. • Stateful server • Keeps (client, file) table of file owners, updates. • Must recover its entire before-crash state. • Session state guides local server’s dialog with 3rd tier. • Cookie sent to browser can accompany next request.
General Organization of Server Clusters • Many LAN-joined machines hosting servers. • 2nd-tier app processing requires high-end CPUs. • Enterprise data processing requires big storage. • 3rd-tier file and database servers require caches. • Only 2 tiers stream media well. • To balance workloads, migrate popular app code. • 1st tier contains transport-layer switch • One TCP connection accepts request. • Transport-layer switch does TCP (connection) handoff to a server. • Content-aware request distribution levels loads and boosts performance. • Server pretends to have switch’s IP address, so as to satisfy TCP.
Distributed Servers • Domain Name Service (DNS)—offers several access point addresses, in case one fails. • Distributed server– dynamically changing machines with changing access points, which appear to be one powerful machine. • Mobility support for IP v.6 (MIPv6) • Mobile node’s access point is a stable home address (HoA). • While away, it has an in-care-of address (CoA). • Home agent (router) forwards all traffic from HoA to CoA. • Distributed server home agent accepts CoAs from all available servers. • Directs client traffic there, while pretending remote server is here. • Route optimization • Home agent and access point could become bottlenecks. • Forwarding CoA to client can form (HoA, Coa) pair for direct calls to CoA if HoA fails.
R U O K ? 6. What general questions should be considered with regard to server design? • Are all of its processes serving just one homogeneous client group? • Should it simply await a request, ensure that each request is served and repeat, all day long? • Is it an iterative server that handles every request itself? • Is it a concurrent server that passes every request to another server. • All of the above.
R U O K ? 7. What are some common ways of interrupting server, when we discover that it is downloading the wrong (very lengthy) file? • The client app simply exits, so that it appears to have crashed. • Send out-of-band data (i.e., your terminate message) on higher priority port. • Pass your urgent message through TCP’s requesting port. • All of the above. • None of the above.
R U O K ? 8. Which of the following accurately describe a stateless server? • Keeps client’s state for limited time. • Keeps a (client, file) table of file owners and updates. • Must recover its entire before-crash state. • Keeps no record of client’s states and notifies no one when it updates its files. • Sends cookies to browsers that accompany clients’ future requests.
R U O K ? 9. Which of the following accurately characterize server clusters? • 1st-tier app processing requires high-end CPUs. • 2nd-tier contains transport-layer switch. • Many LAN-joined machines hosting servers. • All of the above. • None of the above.
R U O K ? 10. What general questions should be considered with regard to distributed server design? • Domain Name Service (DNS) can offer several access point addresses, just in case one fails. • MIPv6 offers mobility support by routing messages from a mobile node’s stable home address (HoA) to an an in-care-of address (CoA). • Forwarding the CoA to clients can form (HoA, Coa) pair to enable direct calls to CoA, if the HoAfails. • All of the above. • None of the above.