Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml
title Launch Manager - Run Components in Parallel

autonumber "<b>[00]"

participant "Launch Manager" as LM
participant "OS (kernel)" as kernel
participant "Reporting App 1" as app1
participant "Reporting App 2" as app2
activate LM

LM -> LM: analyze current state
LM -> LM: determine transition plan

LM -> kernel: Start Reporting App 1
LM -> kernel: Start Reporting App 2
kernel -> app1 **: Start
kernel -> app2 **: Start

activate app1
activate app2

app1 -> app1: Internal User app initialization
app1 -> LM: signal ready state via Lifecycle API
app2 -> app2: Internal User app initialization
app2 -> LM: signal ready state via Lifecycle API
...
@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml
title Launch Manager - Termination Request

autonumber "<b>[00]"

participant "Launch Manager" as LM
participant "OS (kernel)" as kernel
participant "Crashing Process" as app1


activate LM
activate app1

...


app1 -> app1: Random crash
app1 -> kernel: terminate
destroy app1
kernel -> LM: process terminated

LM -> LM: analyze current state
LM -> LM: determine transition plan.\nA recovery action has to be ran,\nthe recovery action is to switch to a different Run Target.
LM -> LM: Switch Run Target.

...

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml
title Launch Manager - Components Depends on Each Other

autonumber "<b>[00]"

participant "Launch Manager" as LM
participant "OS (kernel)" as kernel
participant "Reporting App 1" as app1
participant "Reporting App 2" as app2
activate LM

LM -> LM: analyze current state
LM -> LM: determine transition plan

LM -> kernel: Start Reporting App 1
kernel -> app1 **: Start
activate app1
LM -> LM: wait for Reporting App 1 ready condition
app1 -> app1: Internal User app initialization
app1 -> LM: signal ready state via Lifecycle API

LM -> LM: analyze current state
LM -> LM: determine transition plan

LM -> kernel: Start Reporting App 2
kernel -> app2 **: Start
activate app2
LM -> LM: wait for Reporting App 2 ready condition
app2 -> app2: Internal User app initialization
app2 -> LM: signal ready state via Lifecycle API

LM -> LM: analyze current state
LM -> LM: update current run target state to active

...
@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml
title Launch Manager - Components Depends on Termination

autonumber "<b>[00]"

participant "Launch Manager" as LM
participant "OS (kernel)" as kernel
participant "Reporting App 1" as app1
participant "Reporting App 2" as app2
activate LM

LM -> LM: analyze current state
LM -> LM: determine transition plan

LM -> kernel: Start Reporting App 1
kernel -> app1 **: Start
activate app1
LM -> LM: wait for Reporting App 1 ready condition
app1 -> app1: Internal User app initialization
app1 -> LM: signal ready state via Lifecycle API

...

app1 -> kernel: Termination
destroy app1
kernel -> LM: Reporting App 1 Terminated
deactivate app1

LM -> LM: analyze current state
LM -> LM: determine transition plan

LM -> kernel: Start Reporting App 2
kernel -> app2 **: Start
activate app2
LM -> LM: wait for Reporting App 2 ready condition
app2 -> app2: Internal User app initialization
app2 -> LM: signal ready state via Lifecycle API
...
@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml
title Launch Manager - Termination Request

autonumber "<b>[00]"

participant "Launch Manager" as LM
participant "OS (kernel)" as kernel
participant "Non self-terminating (well behaving)" as app1
participant "Non self-terminating (badly behaving)" as app2

activate LM
activate app1
activate app2

== Switch Run Target ==

LM -> LM: analyze current state
LM -> LM: determine transition plan


LM -> app1: SIGTERM
app1 -> kernel: terminate
destroy app1

LM -> app2: SIGTERM
app2 -> app2: Ignore
LM -> app2: SIGKILL
app2 -> kernel: terminate
destroy app2

@enduml
59 changes: 59 additions & 0 deletions docs/features/lifecycle/architecture/alive.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
..
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

Alive
#####

The Alive Interface provides a basic watchdog functionality interface that
delivers essential monitoring capabilities for system health and responsiveness
tracking.
It implements core watchdog operations including heartbeat signals to ensure
reliable operation and automatic recovery from unresponsive states.

**SCORE Application Liveliness Reporting**

SCORE applications can periodically signal their liveliness to the
:term:`Launch Manager` through the Alive Interface.
This mechanism allows the :term:`Launch Manager` to:

- Detect application failures or hangs
- Trigger recovery actions when liveliness is lost
- Maintain accurate process health status

The liveliness mechanism includes:

- Configurable heartbeat intervals per application
- Timeout detection and failure handling

The alive interface is defined here: :need:`logic_arc_int__lifecycle__alive_if`


Dynamic architecture
====================

.. feat_arc_dyn:: Alive Monitoring
:id: feat_arc_dyn__lifecycle__alive_monitor
:security: YES
:status: valid
:version: 1
:safety: ASIL_B
:fulfils: feat_req__lifecycle__liveliness_detection[version==1]
:includes:
:belongs_to: feat__lifecycle[version==1]

.. uml:: _assets/alive_monitoring_dynamic.puml
:scale: 50
:align: center


82 changes: 82 additions & 0 deletions docs/features/lifecycle/architecture/control_client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
..
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

Control Client
##############

This interface provides control functionality for activating and managing run
targets.
It allows users to trigger execution of configured :term:`Run targets <Run
target>` through a standardized activation mechanism.

The following use cases are supported by the `ControlInterface` provided by the
:term:`Launch Manager`.

**Activating a Run Target**

When a request to activate a run target is received via the `ControlInterface`,
the :term:`Launch Manager` shall perform the following operations:

1. **Validation**: Evaluate if the conditions are correct for activating the requested run target:
- The run target exists in the configuration
- All dependencies for the run target are resolvable
- Required resources are available

2. **Transition Logic**: Determine the transition from the current state to the target state:
- If a different run target is active, perform a switch operation (stop current, start requested)
- If the same run target is already active, verify its state and potentially restart failed components

3. **Execution**: Execute the transition in the correct dependency order:
- Stop components that are not part of the new run target
- Start components that are required for the new run target
- Respect dependency relationships during both stop and start operations

4. **Response**: Return status to the caller:
- Success if all components transitioned correctly
- Failure with detailed error information if any component failed to transition

This unified approach allows external state managers to request any run target
activation without needing to know the current system state, as the
:term:`Launch Manager` handles the transition logic internally.

Interface
=========

The control interface is defined here:
:need:`logic_arc_int__lifecycle__controlif` The :term:`Launch Manager` provides
an interface, which allows an external State Manager application to request the
:term:`Launch Manager` to start, stop or restart applications or groups of
applications, which allows the implementation of a state management
applications to support dynamic state control.

Dynamic architecture
====================

.. feat_arc_dyn:: Control interface dynamic architecture activate run target
:id: feat_arc_dyn__lifecycle__control_activate
:status: valid
:version: 1
:safety: ASIL_B
:security: YES
:fulfils: feat_req__lifecycle__control_commands[version==1],
feat_req__lifecycle__request_run_target_start[version==1],
feat_req__lifecycle__switch_run_targets[version==1],
:belongs_to: feat__lifecycle[version==1]

.. uml:: _assets/control_interface_start_sequence.puml
:scale: 50
:align: center



Loading