---
-title: Application Startup
+title: Application Launcher
---
# Introduction
In order to provide a language-independent interface for applications and
service to use, AGL includes `applaunchd`, a system service.
-# Application launcher service
+# Application Launcher Service
The purpose of `applaunchd` is to enumerate applications available on the
system and provide a way for other applications to query this list and start
-those on demand. It is also able to notify clients of the startup and
+those on demand. It is also able to notify clients of the start-up and
termination of applications it manages.
To that effect, `applaunchd` provides a gRPC interface which other applications
it isn't aware of applications started by other means (`systemd`, direct
executable call...), and therefore can't send notifications for those.*
-## Application discovery
+## Application Discovery
Applications are enumerated from systemd's list of available units based on the
pattern `agl-app*@*.service`, and are started and controled using their systemd
unit. Please note `applaunchd` allows only one instance of a given
application.
-## Application identifiers
+## Application Identifiers
Each application is identified by a unique Application ID. Although this ID can
be any valid string, it is highly recommended to use the "reverse DNS"
convention in order to avoid potential name collisions.
-## gRPC interface
+## gRPC Interface
The interface provides methods for the following actions:
It is a good standard practice to follow up with these recommendation when
developing a new protobuf specification.
-### Applications list
+### Application Enumeration
The `ListApplications` method allows clients to retrieve the list of available
applications.
}
```
-### Application startup request
+### Application Start-up
Applications can be started by using the `StartApplication` method, passing the
`StartRequest` message, defined as:
instance, but instead reply with a `AppStatus` message setting the `status`
string to "started".
-### Status notifications
+### Status Notifications
The gRPC interface provides clients with a subscription model to receive
status events. Client should subscribe to `GetStatusEvents` method to receive
set to "terminated" to denote that the application has been terminated,
forcibly or not
-## A deeper look at start-up, activation and application switching
+## Start-up, Activation, and Application Switching
Application start-up, activation and application switching are sometimes
conflated into a single operation but underneath some of these are distinct
as this synchronization part between `applaunchd` has not been implemented. The
plan is to migrate all of remaining run-times to using this approach.*
-### Start-up & activation
+### Start-up and Activation
This means that we require some sort of interaction between `StartApplication`
method and the events sent by the AGL compositor in order to correctly handle
![Application_start](images/start_and_activation.png)
-### Application switching
+### Application Switching
With the compositor providing application status events, it might seem that the
`applaunchd`'s, `GetStatusEvents` might be redundant, but in fact it is being