Building blocks of applications in SOFA 2
Every SOFA 2 application consists of components.Each component is a well defined isolated entity, which encapsulates some bussiness logic.
The basic building block is an interface, which defines a component communication endpoint. The SOFA 2 interfaces are defined using regular Java interfaces.
A component is then defined using a frame, which defines all the component’s provided and required interfaces (so called component type).
A component frame is then implemented by a component architecture (every architecture implements one frame). Architecture can be either primitive, where the implementation is a code in some programming language (Java in SOFA J case), or composite, where the implementation is a composition of subcomponents.The bindings among the sub-components of a component are part of the composite architecture definition and are represented at runtime by the software connectors. The application itself is considered to be a component, which has a (empty) frame and an (usualy composite) architecture.
Another part of the application definition is the assembly description, which defines which frame is implemented by which architecture (one frame can be implemented by multiple architectures), and the deployment plan, that defines which node (called deployment dock) should each component run on.
Every element, which contains a code (primitive architecture, interface definition) has a so-called code bundle (a JAR file), which encapsulates the associated code. User can also define his own code bundles and can declare dependencies of the individual elements (interfaces, frames, architectures) on various code bundles.
Each of these elements has a representation in SOFA 2 implementation and is defined using the SOFA 2 ADL (Architecture Definition Language, written in XML), which is then transformed into an EMF model instance.
SOFA 2 development cycle
The SOFA 2 development cycle is based on the classic Component-based Software Engineering (CBSE) approach.It can be divided into two separate processes: building systems from components and component development.The first one focuses on assembling composite components from existing components (the whole application is also a composite component), the second one focuses on the development of new components and adaptation of existing.
The whole development cycle consists of several phases and most of them are applicable to both previously mentioned processes.
The basic order of the development phases is as follows:
- component interface definition
- component frame definition
- component architecture definition
- assembly and deployment plan definition
- uploading of the definitions to the repository
- primitive component implementation
- compilation and uploading of the source code
- application deployment
- launching the application
SOFA 2 runtime environment
The SOFA 2 runtime is designed to run applications in distributed environment. This environment is divided into separated units called SOFAnodes. Each SOFAnode is autonomous and separated from other nodes. It contains all facilities, as well as data and other information essential for running applications.Each application runs in one SOFAnode. SOFAnode consists of several deploymentdocks, one deployment dock registry, one repository and one connector manager*.
Repository:All resources and code of applications in a SOFAnode are stored in the central repository which allows distribution of the required information across all parts of the SOFAnode easily. The repository stores all metadata, source code and other resources of all installed applications. The repository supports versioning of each element that is stored in it.
Deployment Dock:The deployment dock is responsible for running the actual component code and for providing basic runtime services. It is also responsible for instantiating and starting up the components. All required data for instantiation and connection of components are downloaded from repository during the start step. Each deployment dock has its name so that it can be easily accessed.
Deployment Dock Registry:Since a SOFAnode can consist of several deployment docks, there has to be a mechanism for accessing the other docks as these have to communicate with each other during the application startup. In SOFA 2, this problem is solved by introducing a centralized registry of all docks in a SOFAnode which is called deployment dock registry.
Connector Manager:A connector manager is responsible for interconnection of the connector endpoints called stubs. SOFA 2 connectors in general consist of two parts which form the endpoints of a communication channel. These endpoints have to be connected during the startup phase. Deployment docks use the connector manager to connect these endpoints.