Coordination styles

Coordination styles in Indus refer to ways in which client and server Indus programs can interact by exchanging messages and produce results through collaborative execution.

Agents in Indus can coordinate with other Agents and Components, Components can not coordinate as they represent passive and pluggable objects.

We are used to the most common form of coordination in existing Object oriented programming languages which is that of a caller object calling a callee object which processes logic and returns back the results to the caller. We can refer this to as the 'call and return' form of coordination. Another feature we have got used to is the synchronous nature of the 'call and return' style of coordination in object oriented languages.

In contrast, Indus provides additional syntax and semantics to express other forms of coordination between objects. Indus coordination styles also feature asynchronous forms of communication between object that may also sometimes be distributed across the network. Invocations of all methods declared in an Agent or Component definition are asynchronous by default. Other methods, such as calls to Java library APIs, which are not declared are invoked synchronously.

The fundamental abstraction for asynchronous communication in Indus is a channel that is a container specific communication gateway. For invocations on remote agents and components, channels also discover remote services and exchange messages by multi-hopping Indus containers across the route to the destination where the remote service is located. An asychronous call using a channel in Indus is effected by use of the dot ('.') operator. The same operator is also used for synchronous method invocations and the Indus compiler makes the decision on whether to effect an asychronous or synchronous method invocation based on the nature of the method and the object on which it is defined.

In addition to the synchronous 'call and return' style, there are an additional seven styles of coordination in Indus that make use of asynchronous communication. These are
 * Master Worker
 * Broadcast
 * Voter Coordinator
 * Blackboard
 * Callback
 * Parallel Pipe
 * Poll

Next : Master Worker