Pro Active - Active Objects

Active Objects

Active objects are the basic units of activity and distribution used for building concurrent applications using ProActive. An active object runs with its own thread. This thread only executes the methods invoked on this active object by other active objects, and those of the passive objects of the subsystem that belongs to this active object. With ProActive, the programmer does not have to explicitly manipulate Thread objects, unlike in standard Java.

Active objects can be created on any of the hosts involved in the computation. Once an active object is created, its activity (the fact that it runs with its own thread) and its location (local or remote) are perfectly transparent. Any active object can be manipulated as if it were a passive instance of the same class.

An active object is composed of two objects: a body, and a standard Java object. The body is not visible from the outside of the active object.

The body is responsible for receiving calls (or requests) on the active object and storing them in a queue of pending calls. It executes these calls in an order specified by a synchronization policy. If a synchronization policy is not specified, calls are managed in a "First in, first out" (FIFO) manner.

The thread of an active object then chooses a method in the queue of pending requests and executes it. No parallelism is provided inside an active object; this is an important decision in ProActive's design, enabling the use of "pre-post" conditions and class invariants.

On the side of the subsystem that sends a call to an active object, the active object is represented by a proxy. The proxy generates future objects for representing future values, transforms calls into Request objects (in terms of metaobject, this is a reification) and performs deep copies of passive objects passed as parameters.

Read more about this topic:  Pro Active

Famous quotes containing the words active and/or objects:

    So hills and valleys into singing break;
    And though poor stones have neither speech nor tongue,
    While active winds and streams both run and speak,
    Yet stones are deep in admiration.
    Thus praise and prayer here beneath the Sun
    Make lesser mornings when the great are done.
    Henry Vaughan (1622–1695)

    It is a misfortune that necessity has induced men to accord greater license to this formidable engine, in order to obtain liberty, than can be borne with less important objects in view; for the press, like fire, is an excellent servant, but a terrible master.
    James Fenimore Cooper (1789–1851)