Java Reference
In-Depth Information
Idiom
Message-based communication
Context
Asynchronous communication between components,
applications, systems.
Problem
Two or more functional units need to communicate
regardless of their underlying technology. Different units
might be implemented in different programming
languages, on different platforms, according to different
execution models, etc.
Forces or tradeoffs
Communicating complex data structure requires
serialization. Communication among functional units
occurs not only at a syntactical level (where they com-
monly agree on a set of data structure definitions and on
the meaning of the operations on those structures), but
also at a semantic level: functional units communicate
in terms of knowledge transfer instead of data transfer.
Solution
Functional units have a message-based interface, which is
defined in terms of the set of messages that the unit can
interpret. Messages are structured according to a
declarative communication language made up of (1) a
communication primitive, called performative, that
corresponds to a specific linguistic action (e.g. query,
answer, assert, define), and (2) the content. The content
of a message is a sequence of declarative statements; it is
an expression built using a knowledge representation
language and formed from words defined in a shared
ontology. Each functional unit implements a parser that
interprets incoming messages.
Examples
The robot and the remote controller communicate by
exchanging textual messages over a serial cable.
Force resolution
Functional units adopt a standard message-based interface
that abstracts from their specific implementations.
Design rationale
The main design objective behind this architecture is to
achieve a plug-and-play mechanism for reusable
components that can be automatically plugged into a host
system.
Search WWH ::




Custom Search