1 / 39

Communication II

Communication II. CSE 5306 Lecture Quiz due 18 June 2014 at 5 PM. R U O K ?. 1. Which of the following accurately describe the general organization of a message queuing system? Every machine (or its RPC-accessible LAN server) has a sender’s source queue and receiver’s destination queue.

gwidon
Download Presentation

Communication II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Communication II CSE 5306 Lecture Quiz due 18 June 2014 at 5 PM

  2. R U O K ? 1. Which of the following accurately describe the general organization of a message queuing system? • Every machine (or its RPC-accessible LAN server) has a sender’s source queue and receiver’s destination queue. • Every queued message contains its ultimate destination address. • Queue managers (i.e., routers) use overlay network databases of all interconnected queues to collectively relay messages among their queues. • Each router knows all of the queues in its region, but other routers only know each region’s nearest router. • All of the above.

  3. R U O K ? 2. Which of the following accurately describes a message broker? • That integral part of a queuing system that translates a received message of type T1 to type T2, which its user can understand. • A publish/subscribe application that delivers only messages of interest to subscribing receivers. • It translates Chinese emails into Greek for Athenian users. • All of the above. • None of the above.

  4. A Note on Message-Queuing Systems • The Internet’s SMTP serves end users with email delivery, groupware and social media. • General message-queuing systems serve persistently communicating distributed system processes with guaranteed message delivery, message prioritizing, logging, efficient multicasting, load balancing and fault tolerance. • The latter can break up a database query into fragments that several high performance database servers answer in parallel. And it can send emails.

  5. IBM’s WebSphere Message-Queuing System • A LAN’s queue manager includes a server stub, a routing table, a four message channel agents (MCA) and their paired send and receive queues. • The server stub accepts a 4MB message from an application’s client stub elsewhere on the LAN, and places it in one of the send queues. • One of the queue’s sending MCAs looks up the message’s destination in the routing table, wraps the message in a transport-level packet and drops it on the enterprise network. • Any number of other routers relay it to the proper receiving queue manager. • One of that manager’s receiving MCAs unwraps the packet and puts the message in its receive queue. • The server stub de-queues message and sends it to the destination app’s client stub via RPC. • A queue managers may be simply linked into an app’s process through an MQ interface, if desired.

  6. Channels • Send MCA’s fall asleep after several seconds of queue inactivity. • An app can start up an MCA, but that would ruin its access transparency. • We prefer to configure the send queue with a “notify” callback function that awakens the MCA when a message is queued. • Alternatives include contacting a deamon that watches a well known address on the MCA’s machine, or asking another local MCA to awaken it. • Sending and receiving MCAs must agree on a common transport protocol and message order, but they may negotiate the other message channel attributes above.

  7. R U O K ? 3. Contrast present-day email service with message-queuing systems. • The Internet’s SMTP serves end users. • SMTP uses the established TCP/IP network to send emails, but not very efficiently. • General message-queuing systems serve persistently communicating distributed system processes. • A message-queuing system could break up a database query into message fragments that several high performance database servers answer in parallel. • All of the above.

  8. R U O K ? Properly order the following steps in WebSphere’s sending a message. 4. One of the queue’s sending MCAs looks up the message’s destination in the routing table, wraps the message in a trans-port-level packet and drops it on the enterprise network. __ 5. The server stub accepts a 4MB message from an application’s client stub elsewhere on the LAN, and places it in one of the send queues. __ 6. Any number of other routers relay the message to the proper receiving queue manager. __ 7. The server stub de-queues message and sends it to the destination app’s client stub via RPC. __ 8. One of that manager’s receiving MCAs unwraps the packet and puts the message in its receive queue. __

  9. R U O K ? 9. Which of the following is a bad way to wake up a send MCAthat has fallen asleep after several seconds of queue inactivity? • Let the application that has a message to send awaken it. • Configure the send queue with a “notify” callback function that awakens the MCA when a message is queued. • Contact a daemon that watches a well known address on the MCA’s machine. • Ask another MCA on the same machine to awaken it. • None of the above—they are all good ways.

  10. Message Transfer • Each of a queue manager’s (QM’s) two send queues is connected to one other QM via its dedicated enterprise system message channel. • To every message, the QM appends the destination QM’s name and the next QM’s send queue name, (destQM, sendQ), in the general direction of that destination. (And the next QM changes sendQ to the next, etc.) • The example above shows QMA’s message destined for QMC is placed in queue SQ1 for delivery to QMB. Upon arrival at QMB, it is placed in QMB’s queue SQ1 for delivery to its destination, QMC. • Applications refer to their local QM by an alias, which does not change when the enterprise changes that QM’s system name. • Apps use MQopen and MQclose to open and close local queues, and MQput and MQget to add and remove queued messages.

  11. Managing Overlay Networks • Building WebSphere’s enterprise overlay network (i.e., routing tables) can be a big job, and the network logically should be edited during message traffic “rush hours.” • IBM provides a “channel control function” component that apprises the operator of traffic on both ends of a QM’s two message channels. • But IBM provides no automated aids for editing WebSphere’s enterprise overlay networks.

  12. Stream-Oriented Communication • Continuous (representation) media must communicate at the live rate; e.g., 44.1kHz CD, 25-33 full-motion video frames/sec. • Synchronous transmission mode requires a guaranteed minimum data rate; e.g., sensor data sampled at 60Hz. • Discrete (representation) media is an asynchronous series of bytes; e.g.,UNIX pipes, TCP/IP connection. • isochronous transmission mode requires jitter between consecutive units is guaranteed to be between minimum and maximum bounds; e.g., earphone audio. • A simple stream is one data channel; e.g., monaural audio, NTSC composite video. • Complex streams are made up of many simple substreams; e.g., stereo sound, RGB video.

  13. R U O K ? 10. What would the (destQM, sendQ) pair be for the example message shown in Fig.4-24, as it travels to its ultimate destination? • (QMC, SQ1). • (QMD, SQ2). • (QMC, SQ1), (QMC, SQ2). • (QMD, SQ1). • None of the above.

  14. R U O K ? 11. What problem(s) exist in IBM’s WebSphere message queuing system? • Applications’ manipulation of message queues violates distributed systems’ access transparency principle. • Searching the routing tables of a multinational mega-enterprise could take a long time. • WebSphereprovides no automated tools for editing enterprise overlay networks during message traffic “rush hours.” • All of the above. • None of the above—WebSphere is “practically perfect in every way” (Mary Poppins).

  15. R U O K ? Match the following streaming data terms with their definitions below. 12. Continuous (representation) media __ 13. Discrete (representation) media __ 14. Synchronous transmission mode __ 15. Isochronous transmission mode __ 16. Complex stream __ • Any series of bytes delivered at a possibly variable rate. • Jitter between consecutive units guaranteed to be between minimum and maximum bounds. • Made up of two or more simple synchronized substreams i.e., single data channels. • Guaranteed minimum data rate. • Must communicate at the live performance rate.

  16. 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.

  17. 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.)

  18. 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).

  19. 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.

  20. R U O K ? 17. 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.

  21. R U O K ? 18. 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.

  22. R U O K ? 19. 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.

  23. R U O K ? 20. How does MPEG-2 handle substream synchronization? • 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.

  24. 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.

  25. 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

  26. 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

  27. 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.

  28. R U O K ? 21. 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.

  29. R U O K ? Rearrange the application-level multicasting steps below in their proper order. 22. Never having heard of myid before, Q nonetheless agrees to become P’s parent-forwarder by passing the message along to R. __ 23. I generate a big random number, myid, and give myid’ssuccessor node owner, succ(myid), my multicast. __ 24. 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.__ 25. After receiving my multicast, P (like R) can share it with anyone who may request it. __ 26. 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. __

  30. R U O K ? Match the following terms with their definitions below. 27. Link stress __ 28. Switch-tree __ 29. Overlay network __ 30. Stretch __ 31. 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.

  31. R U O K ? 32. Why are Trojan horses and update epidemics so effective? • Envy. • Love. • Friendship. • All of the above. • None of the above.

  32. 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).

  33. 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).

  34. 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.

  35. 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.

  36. R U O K ? 33. 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.

  37. R U O K ? 34. 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.

  38. R U O K ? 35. 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.

  39. R U O K ? 36. 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.

More Related