Message passing

From Wikipedia, the free encyclopedia

Jump to: navigation, search

Message passing in computer science, is a form of communication used in parallel computing, object-oriented programming, and interprocess communication.


[edit] Overview

Communication is made by the sending of messages to recipients. Forms of messages include function invocation, signals, and data packets. Prominent models of computation based on message passing include the Actor model and the process calculi.

Microkernel operating systems pass messages between one kernel and one or more server blocks.

Distributed object and remote method invocation systems like ONC RPC, Corba, Java RMI, DCOM, SOAP, .NET Remoting, QNX Neutrino RTOS, OpenBinder, D-Bus and similar are message passing systems. The term is also used in High Performance Computing using Message Passing Interface.

The concept of message passing is also used in Bayesian inference over Graphical models.

[edit] Message passing systems and models

Message passing systems have been called "shared nothing" systems because the message passing abstraction hides underlying state changes that may be used in the implementation of sending messages.

Message passing model based programming languages typically define messaging as the (usually asynchronous) sending (usually by copy) of a data item to a communication endpoint (Actor, process, thread, socket, etc.). Such messaging is used in Web Services by SOAP. This concept is the higher-level version of a datagram except that messages can be larger than a packet and can optionally be made reliable, durable, secure, and/or transacted.

Messages are also commonly used in the same sense as a means of interprocess communication; the other common technique being streams or pipes, in which data are sent as a sequence of elementary data items instead (the higher-level version of a virtual circuit).

[edit] Examples of message passing style

[edit] Influences on other programming models

In the terminology of some object-oriented programming languages, a message is the single means to pass control to an object. If the object 'responds' to the message, it has a method for that message.

In pure object-oriented programming, message passing is performed exclusively through a dynamic dispatch strategy.

Sending the same message to an object twice will usually result in the object applying the method twice. Two messages are considered to be the same message type, if the name and the arguments of the message are identical.

Objects can send messages to other objects from within their method bodies.

Message passing enables extreme late binding in systems.

Alan Kay has argued that message passing is a concept more important than objects in his view of object-oriented programming, however people often miss the point and place too much emphasis on objects themselves and not enough on the messages being sent between them.

Some languages support the forwarding or delegation of method invocations from one object to another if the former has no method to handle the message, but 'knows' another object that may have one.

[edit] See also

[edit] References

[edit] Further reading

Personal tools