250 likes | 387 Views
Communication IV. CSE 5306 Lecture Quiz 11 due at 5 PM on Thursday, 18 September 2014. Streams and Quality of Service. A stream’s quality of service requirements amount to: R equired minimum bit rate for data delivery. Maximum session set up delay before application starts sending.
E N D
Communication IV CSE 5306 Lecture Quiz 11 due at 5 PM on Thursday, 18 September 2014
Streams and Quality of Service • A stream’s quality of service requirements amount to: • Required minimum bit rate for data delivery. • Maximum session set up delay before application starts sending. • Maximum end-to-end delay between data sent and received. • Maximum sample to sample delay variance; i.e., jitter. • Maximum round-trip delay; i.e., handshake interval. • But the Internet’s IP protocol only guarantees a “best-effort” datagram service; i.e., dropping packets whenever it sees fit. (Replacing dropped frames isn’t practical.) • And many distributed systems stream-oriented communications are built upon Internet protocols.
R U O K ? • Which of the following quality of service requirements pertain to streams? __ • Required minimum bit rate for data delivery. • Maximum end-to-end delay between data sent and received. • Maximum sample to sample delay variance; i.e., jitter. • All of the above. • None of the above.
Enforcing QoS • The Internet does offer “differentiated services” for streaming data: • “Expedited forwarding” tells routers to give packet absolute priority. • Assured forwarding defines four more priority classes to distinguish streams from time-insensitive data. • The distributed system can help enforce QoS: • Prefilling buffer trades more setup delay for less jitter. • Forward error correction of interleaved data replaces dropped frames. (CDs and DVDs tolerate 9mm hole.)
R U O K ? 2. Which of the following can improve streams’ Internet QoS? __ • IP’s “expedited forwarding.” • IP’s “assured forwarding.” • Prefilling a receiver’s streaming buffer. • Forward error correction of interleaved data. • All of the above.
Stream Synchronization • Three levels of stream synchronization: • Discrete and continuous data stream; e.g., • Web presentation slides + • Blocks of narration audio = • 1 or 2sec precision. • Two modest continuous data streams; e.g., • 30fps movie + • Lip-synced 1470-sample blocks of audio = • 40 to 80msec precision. • Two exacting continuous data streams; e.g., • Concert-quality 44.1kHz stereo sound • Two high-fidelity channels of audio samples = • 23usec precision (i.e., 1/44.1 sample interval).
R U O K ? 3. How precisely should two data streams be synchronized? __ • 1 to 2sec for slide show narration. • 40 to 80msec for a movie sound track. • 23usec for concert-quality stereo sound. • All of the above. • None of the above.
Synchronization Mechanisms • Mechanisms for synchronizing two streams: • Given streams of 30Hz video frames and concurrent 30Hz blocks of audio samples. • Use timestamps to compensate for the streams’ different network delays. • Or merge concurrent streams at the source. • Distributing synchronization in network environment: • Application can read concurrent video and audio blocks alternately and synchronize them, with its limited resources (above left). • Or middleware accepts app’s display rate synchronization specification, and call back app when new images and audio blocks are available (above right). • The Motion Picture Experts Group (MPEG-2) multiplexes compressed video and audio streams (with a 90kHz timestamp on each variable length packet) into one complex (program) stream at the source. Middleware matches up timestamps, as it demultiplexes the received streams.
R U O K ? 4. How does MPEG-2 handle sub-stream synchroni-zation? __ • Application reads concurrent MPEG-compressed video and audio blocks alternately and synchronizes them. • Middleware uses its richer resources to synchronize the variously network-delayed video and audio blocks. • Video and audio streams are time-stamped, multiplexed and compressed at the source, and middleware synchronizes the demultiplexed streams at the destination by matching up their timestamps. • All of the above. • None of the above.
Multicast Communication • Traditionally the Internet’s transport and network levels have handled media broadcasts to multiple receivers, but every proposal for setting up the Internet’s network- and transport-level communication paths involved a huge management effort. • As peer-to-peer networking and structured overlay management have matured, the Internet’s application layer has taken over multicasting. • Distributed processing provides many high performance multicasting options.
R U O K ? 5. Why have distributed processor applications taken over multicasting from the Internet? __ • The Internet is too slow. • The Internet’s send and receive primitives are not transparent. • Setting up the Internet’s network- and transport-level communication paths was a huge management effort. • All of the above. • None of the above.
Application-Level Multicasting • Application-level multicasting organizes nodes into a tree- or mesh-shaped overlay network that disseminates information to its members. • Meshes are more robust, because they tolerate the loss of a node. • As a tree node with a multicast white-paper to share, I do the following: • I generate a big random number, myid. • I look up myid’s successor node owner, succ(myid). • I crown her “Root” of my multicast tree by giving her my multicast. • My buddy node P calls LOOKUP(myid) to simultaneously: a) discover my muticast’s owner and 2) to send a message requesting it. • On its way to the root, P’s message goes to Q. • Never having heard of myid before, Q nonetheless agrees to become P’s parent-forwarder by passing the message along to R. • Already a parent-forwarder of other myid requesters, R adds Q to her list of children. • But instead of forwarding P’s request, R sends my multicast to Q, who passes it on to P. • After receiving my multicast, P (like R) can share it with anyone who may request it. See “Chord,” pp.44,45
R U O K ? Rearrange the application-level multicasting steps below in their proper order. 6. Never having heard of myid before, Q nonetheless agrees to become P’s parent-forwarder by passing the message along to R. __ 7. I generate a big random number, myid, and give myid’ssuccessor node owner, succ(myid), my multicast. __ 8. My buddy node P calls LOOKUP(myid) to simultaneously: a) discover my muticast’s owner and 2) to send a message to Q requesting it.__ 9. After receiving my multicast, P (like R) can share it with anyone who may request it. __ 10. Having served as other’s parent-forwarder, R already has my multicast, so (instead of forwarding this request) R sends my multicast to Q, who passes it on to P.__
Overlay Construction C Root A 50 Cost • How to build an efficient overlay network tree…? • For example, replacing the link B-D (above left) with A-C (above right) would lower the overall cost from 135 to 65. • Figures of merit • Link stress: number of times a packet crosses link. • Tree cost: the minimal spanning tree always offers lowest cost. • Stretch: ratio of overlay network’s and router path’s tree costs; e.g., 2 above. • Optimizing an existing tree • Rendezvous node tells all nodes upon newcomer’s request. • Switch-trees offer a starving child node a parent closer to the source. • Starving child sends adoption request to new parent, who ignores him till pending switch requests settle. • When a node is orphaned, the root fosters it, until the optimizer adopts it out. Rc Ra Overlay Network 7 Router Path 5 Rb Rd D B
R U O K ? Match the following terms with their definitions below. 11. Link stress __ 12. Switch-tree __ 13. Overlay network __ 14. Stretch __ 15. Tree cost __ • Offers a starving child node a parent closer to the source. • The sum of all message delays in an overlay network. • The number of times a packet crosses one overlay network link. • The ratio of an overlay network’s and the router path’s tree costs. • An organization of nodes that enables multicasts among them.
Gossip-Based Data Dissemination • Trojan horse computer viruses are effective, because uninfected users desire whatever the viruses pretend to be. • When a WAN-connected node gets a pretty new software update, the update spreads across the node’s LAN quickly, because all of its obsolete peers want it. • This is an example of an epidemic protocol.
R U O K ? 16. Why are Trojan horses and update epidemics so effective? __ • Envy. • Love. • Friendship. • All of the above. • None of the above.
Information Dissemination Models • The epidemic protocol for infecting a network with time-stamped updates works better if susceptible nodes pull (as addicts increase, dealers are easier to find) than if infected nodes push (good gossip dies, when almost everyone has heard it). • A round of pull update exchanges takes O(log(N)) time; i.e., updates spread faster in larger systems, so pull is scalable. • Push infections always leave a residue of uninfected nodes. But those can be infected by a mutual push-pull exchange of updates (anti-entropy).
R U O K ? 17. Why does the epidemic’s “pull” protocol work better than “push” for disseminating updates in peer-to-peer networks? __ • Susceptible nodes find it increasingly easy to find an infected peer as the infection spreads. • After searching unsuccessfully for rare susceptible nodes to infect, infected nodes eventually stop trying. • Actually they are about the same. • Both a and b above. • None of the above.
Removing Data • The epidemic protocol for deleting an obsolete data item must also retain a timestamped “death certificate” record of the data item. • If not, the item could get restored by a dormant update. • Like smallpox, after we are sure the infectious data item has been eradicated worldwide, its death certificate can be deleted. • But just in case that data item ever comes back, a few nodes should retain that death certificate forever (like smallpox vaccine).
R U O K ? 18. Why is it so difficult for an epidemic protocol to delete obsolete data? __ • Leaving no trace of immunity behind, the deleted data gets replaced when a dormant update of that data flares up a new epidemic. • Actually it isn’t difficult—death certificates solve the reinfection problem. • And timestamping the death certificates enables their deletion after all epidemics have been stamped out. • All of the above. • Both b and c above.
Another Epidemic Application • Effective topology self-management of unstructured peer-to-peer architectures’ overlay networks requires estimates of how many peers a node has. • The node can pass his peers a 1, which they average with their zeros. Then they pass their averages on to their peers with the same request. • When the diminished average finally returns to the starting node, its reciprocal is an estimate of the number of peers in the starting node’s partial view.
R U O K ? 19. I pass a ‘1’ to my 2 peers, and its average with all of their zeros returns as 1/4th. How big is my partial view? __ • 4 peers. • 3 peers. • Probably somewhere between 3 and 5 peers. • There is no way of telling. • None of the above.
Summary • Remote procedure calls are easier (i.e., transparent) for applications, and they perform better than traditional send and receive Internet protocols. • When it cannot be assumed that the receiver is operating, message-oriented middleware (MOM) can replace RPC in persistent or transient and synchronous or asynchronous communications. • MPEG elegantly solved apps’ streaming synchronization problem by multiplexing many timestamped media into single program stream at the source. • Data can be disseminated from one sender to many peers by multicasting or by an epidemic.
R U O K ? 20. What is the best way to tell your peer about your fancy new Windows 8 upgrade? __ • If she is available, do an RPC. • If she is out, ask your MOM to send a message. • If she has always wanted a Windows 8 upgrade, why not just chill out with an MPEG movie while waiting for her to ask…? • All of the above. • None of the above.