|
|
# Introduction
|
|
|
The first goal of Cameo is to provide services for starting, stopping, synchronizing remote applications. The control of the lifecycle of the applications is made either by the console i.e. *cmo* either programmatically using the API. Here are the controls:
|
|
|
* **Start**: Starts a remote application that will run on the contacted Cameo server. The application must be registered.
|
|
|
* **Stop**: Stops a running remote application. The application is notified and can properly stop.
|
|
|
* **Kill**: Kills a running remote application. The application is immediately terminated.
|
|
|
* **Connect**: Connects a running application.
|
|
|
The combination of these controls gives lots of flexibility e.g. applications can be started in cascade.
|
|
|
|
|
|
# State diagram of an app
|
|
|
|
|
|
Every control is made by contacting the Cameo server which is responsible to control the applications. Every Cameo application has a sequence of states. The following diagram shows the complete possibilities:
|
|
|
|
|
|
![Application States](images/Application-states.png)
|
|
|
|
|
|
The arrows show which transitions are possible.
|
|
|
|
|
|
The different states are described:
|
|
|
* **Starting**: Once the Cameo server received a *start* request for a valid application.
|
|
|
* **Running**: The application becomes *Running* after a defined amount of time or the application defined itself as running.
|
|
|
* **Success**: The application successfully terminated without any *stop* or *kill* request.
|
|
|
* **Stopping**: Once the Cameo server received a *stop* request for a running application.
|
|
|
* **Stopped**: The application successfully terminated after a *stop* request.
|
|
|
* **Killing**: Once the Cameo server received a *kill* request for a running application.
|
|
|
* **Killed**: The application successfully terminated after a *kill* request.
|
|
|
* **Processing Error**: Once the application encountered an internal error and terminated. An error process specific to the application is called.
|
|
|
* **Error**: The error process has terminated. |