Information Technology Reference
In-Depth Information
many, many-to-many, and many-to-one communication. One-to-many communication en-
ables one server to quickly send information to a large set of machines. Many-to-many
communication resembles a chat room application, where many people all hear what is be-
ingsaid.Many-to-onecommunicationenablesafunnel-likeconfigurationwheremanyma-
chines can produce information and one machine takes it in. A central authority, or master,
manages which servers are connected to which channels.
The messages being sent may contain any kind of data. They may be real-time updates
such as chat room messages, database updates, or notifications that update a user's display
to indicate there are messages waiting in the inbox. They may be low-priority or batch up-
dates communicating status changes, service requests, or logging information.
Messagebustechnologygoesbymanynames,includingmessagequeue,queueservice,
orpubsubservice.Forexample,AmazonprovidestheSimpleQueueService(SQS),MCol-
lective is described as publish subscribe middleware, and RabbitMQ calls itself a message
broker.
A message bus system is efficient in that clients receive a message only if they are sub-
scribed.Theremaybehundredsorthousandsofmachinesinvolved,butdifferentsubsetsof
machines will typically be subscribed to different channels. Messages are transmitted only
to the subscribed machines. Thus network bandwidth and processing are conserved. This
approach is more efficient than a broadcast system that sends all messages to all machines
and lets the receiving machines filter out the messages they aren't interested in.
Message bus systems are operations-friendly. It's trivial to connect a command-line cli-
ent to listen to messages and see what is being emitted. This capability is very handy when
debugging requires peering into information flows.
4.6.1 Message Bus Designs
The message bus master learns the underlying physical network topology and for each
channel determines the shortest path a message needs to follow. IP multicast is often used
tosendamessagetomanymachinesonthesamesubnetatthesametime.IPunicastisused
to transmit a message between subnets or when IP multicast isn't available. Determining
and optimizing the unique topology of each channel separately requires a lot of calcula-
tions, especially when there are thousands of channels.
Somemessagebussystemsrequireallmessagestofirstgotothemasterfordistribution.
Consequently, the master may become a bottleneck. Other systems are more sophisticated
and either have multiple masters, one master per channel, or have a master that controls
topology but does not require all messages to go through it.
Channels may be open to anyone, or they may be tightly controlled with ACLs determ-
ining who can publish and who can subscribe. On some systems the listeners can send a
Search WWH ::




Custom Search