2.4 The message passing idea
Figure 1 shows the central idea behind the message passing paradigm. It involves an architecture in which clients and servers communicate using communication lines. In this model, in contrast with the others that are to be presented in this course, the underlying structure of the network is visible via the communication media used to connect servers and clients and devices such as sockets, ports and server sockets which are involved in the transfer of a message from one computer to another.
In general message passing is used in applications which satisfy one or more of a number of criteria:
Communication needs are very simple.
High performance is required; message passing is a much more efficient mechanism than those technologies detailed later in this course. However, you pay for this in terms of programming complexity.
Rapid implementation is required, for example an e-commerce application may be required quickly in order to react to a competitor's new website; if there is no time to carry out sophisticated design and you are prepared to countenance the inevitable errors that this brings, then a message passing solution might be chosen.
The system uses a technology that no existing protocols will communicate with.
It is worth saying at this point that the message passing architecture detailed here is an abstraction of what really happens, with many communication lines and hardware carrying the messages. Ports, sockets and server sockets are abstractions of some rather nasty low-level entities.
This, then, is an introduction to message passing. An example of this type of development style in action is seen in how to program web servers using HTTP, a protocol which is firmly based on message passing.