Message passing

From Wikipedia, the free encyclopedia

In computer science, message passing is a form of communication used in parallel computing, object-oriented programming, and interprocess communication. 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.

Contents

[edit] Overview

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

[edit] Examples of Message passing style

[edit] Influences on other programming models

[edit] OOP

In the terminology of some object-oriented 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.

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.

Alan Kay has suggested that he placed too much emphasis on objects themselves and not enough on the messages being sent between them. Message passing enables extreme late binding in systems.

[edit] Other

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