-
Notifications
You must be signed in to change notification settings - Fork 2
APAM machine
The goal of APAM is:
- to define, control and adapt the architecture of applications in the presence of dynamic services; and
- to define and enforce the protection, isolation and collaboration between concurrent, collaborating and/or competing applications.
The central notion of the APAM metamodel is the concept of component. Components can be of three types: specification, implementation and instance, which share most of their characteristics.
A specification is a first class object that defines a set of provided and required resources (in the Java sense). Complete compositions can be designed and developed only in terms of specifications.
An implementation is related by an implements relationship with one and only one specification. An implementation is an executable entity (in Java) that implements all the resources defined by its associated specification, and that requires at least the resources required by its associated specification. In practice, an implementation must define a class that implements (in the Java sense) the interfaces of its specification.
An instance is related by an instanceOf relationship with one and only one implementation. An instance is a run-time entity, represented in the run-time platform (OSGi) as a set of Java objects, one of which is an instance (in the Java sense) of its associated main class implementation. In the underlying service platform, an instance can be seen as a set of services, one for each of the associated specification ressources; in APAM it is an object.
A composite implementation, also called composite type, is a special case of implementation; as such it implements a specification. Contrary to an atomic implementation, a composite type does not define a main class, but a main implementation that implements the same specification. A composite type contains implementations and defines the rules governing their composition and visibility.
A composite instance, also called composite, is a special case of instance; indeed it is an instance of a composite type. A composite contains instances (atomic or composite), at least one instance of the main implementation of its composite type.
Components are related by a group-members relationship. A specification is a group whose members are implementations, and an implementation is a group whose members are instances. A group-members relationship establishes a de facto inheritance between the group and its members. More precisely, all the characteristics of a group (its properties, its provided and required resources) are automatically inherited by all its members, like in a class-instance relationship.
During execution, in APAM, a component has a single state: it is either existing (and therefore available and active), or non-existing.
At design and development time, a component description contains the (meta-)information needed for the compiler to produce the "right" executable component (bundle), and for the execution platform to enforce its "right" behavior.
The APAM machine represents the current state of the supported applications (called ASM for APAM State Model) as a model conforming to the APAM metamodel. The APAM machine provides an API for the navigation and management of the ASM, mechanisms for enforcing the declared component behavior of an application, and mechanisms for extending the core functionality through the addition of specialized managers.
In the ASM, the instances of the component concepts are represented as first class objects with a set of attributes (properties) and relationships. The APAM machine is causally connected to the underlying platforms, thus, actions performed on an APAM object are transformed into actions performed on the corresponding platform entities, and vice-versa.
The APAM machine automates the creation of "wires" between the components participating in an application. This automatic wire management (creation, destruction, substitution) is performed in a moving context in conformance with the application definition and requirements; leading to the automatic building of dynamic and adaptable architectures.