Distributed paradigms
Distributed paradigms

This free course is available to start right now. Review the full course description and key learning outcomes and create an account and enrol if you want a free statement of participation.

Free course

Distributed paradigms

4 Event-based bus architectures

4.1 Introduction

Many of you will already be familiar with event processing if you have developed visual interfaces with the later versions of Java. Developing such an interface consists of a number of steps:

  • A visual object such as a button is placed in a container such as an applet or a object.

  • An object such as a container implements a listener interface.

  • Methods in the interface which the container implements will react to events such as a button being clicked or a pull-down menu being activated and an item selected. The code for these methods is provided within the container class.

  • Finally, code is placed either in the constructor for the container or in the method for an applet, which registers the container as a listener to certain events such as a button being clicked.

This model of processing is based on code being written which responds to events such as a button being clicked, a window being closed and text being deleted from a text box.

The same model of processing is used in bus architectures. An example of such an architecture is shown in Figure 3. Here a bus connects a number of listener objects to a transmitter object which sends data along the bus. When data appears on the bus each listener object is executed to read and process the data.

In order to listen to data which is being transferred across a bus the listener objects have to be registered with the bus in the same way that event handlers need to be registered when developing visual interfaces.

An object bus is very much like a radio transmitter in that listeners to a radio station tune into a channel and receive data (sound) transmitted by the radio transmitter. In the bus architecture listener objects tune into a channel (subscribe) and receive objects which are dispatched along the bus.

Figure 3
Figure 3 The object bus architecture. In this figure only one channel is shown, there may be many more.

The model here is somewhat different to that of the distributed object model. In that model, objects communicate with other objects via method calls; invariably the client initiates the processing with the server being a passive entity until it receives some request for a service. This is an example of pull technology where clients pull data from servers. The object bus model is an example of push technology where the server is pushing data out to the clients which, when they receive it, carry out some processing action.

The object bus architecture is particularly well suited to applications where realtime events are being generated and have to be processed by a dynamically changing collection of listener objects. Typical applications include:

  • The delivery of stock market data to financial subscribers on a real-time basis.

  • Teleconferencing applications where messages from conference participants have to be broadcast in real-time to other participants.

  • Distributed multimedia applications such as video on demand where large chunks of data have to be delivered to subscribers on a real-time basis.

  • Conversational applications such as chat rooms where a number of participants communicate with each other in real-time.

M879_1

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to university level study, find out more about the types of qualifications we offer, including our entry level Access courses and Certificates.

Not ready for University study then browse over 900 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus