Skip to content
Merged
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,32 @@
@startuml
title Alive Monitoring

autonumber "<b>[000]"

participant "Launch Manager" as LM
participant "Application" as App

activate LM

LM --> LM: parse configuration
LM --> App: fork
activate App

App -> LM: Register for alive notifications (callback)
LM --> App: Return value

note over LM, App: Cyclicly report health state
loop health_status == ok
App --> LM : report_healt_status()
end

note over LM, App: Trigger Error Reaction
alt health_status != ok
LM --> App: initiate Error Reaction
end

App -> LM: Return value
deactivate App

deactivate LM
@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@startuml
title Component Architecture Diagram

package "<<executable>> Launch Manager" {
[Launch Manager] as LM
interface AliveMonitoring

LM --|> AliveMonitoring : offers
}

package "<<executable>> Monitored Application (MA)" {
[Application logic] as MA
[Health Monitor (HM)] as HM

interface HealthMonitorAPI

HM --|> HealthMonitorAPI : implements
HM --> AliveMonitoring : connects to
MA --> HealthMonitorAPI : uses
}


@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@startuml
autonumber "<b>[000]"

participant "Launch Manager" as LM


box "Monitored Application"
participant "Application Logic" as App
participant "HealthMonitor" as HM
end box

LM -> LM: Parse monitoring rules\nof the monitored app
LM -> LM: Start startup grace period timer

LM -> App : Start component

activate App
App -> HM: Register health monitoring\n(Alive/Deadline/Logical)
activate HM
HM -> HM: sleep until the next wakeup time
App -> HM: Checkpoint
HM -> HM: Wakeup and check if the\ncheckpoints have been called
HM -> LM: Alive notification

hnote across: Use Case: Missed checkpoint

App --x HM: Missed Checkpoint
HM -> HM: Wakeup and check if the\ncheckpoints have been called

HM -> LM: Supervision failure notification

HM -X LM: Stop triggering alive
LM -> LM: Error reaction\n(notify State manager)

hnote across: Use Case: Direct error report by the Application

App -> HM: Report error
HM -> LM: Supervision failure notification

HM -X LM: Stop triggering alive
LM -> LM: Error reaction\n(notify State manager)

hnote across: Use Case: Crashed Application

App -> App: application error, crash
destroy App
destroy HM

LM -> LM: Wakeup and check if the\ncheckpoints have been called
LM -> LM: No alive notification seen
LM -> LM: Error reaction\n(notify State manager)


@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
@startuml

class LaunchManager
{

}

class LaunchConfiguration
{

}

LaunchManager "1" -- "1" LaunchConfiguration


class ConfigFile
{

}

LaunchConfiguration "1" -- "1..*" ConfigFile



class ComponentConfig {

}

ConfigFile "1" -- "1..*" ComponentConfig

class AliveMonitoring {
+ alive notification interval
+ Startup grace period
+ failure tolerance limit
}


class RecoveryAction {
+ recovery action type (eg. restart, stop, ignore, DSS)
+ retry count (how many times to try)
+ wait time (before the component can be started again)
}


class Dependency {
+ depency type
}

class ProcessConfig {
+ UID
+ GID
+ supplementary groups
+ runmask
+ priority
+ ability
+ security
+ cwd
+ environmental variables
+ command
+ arguments
+ stdin
+ stdout
+ stderr
+ aslr
+ rlimits
+ time between sigterm and sigkill
}

ComponentConfig "1" -- "1" Dependency
ComponentConfig "1" -- "1" ProcessConfig
ComponentConfig "1" -- "1" AliveMonitoring
ComponentConfig "1" -- "1" RecoveryAction

Dependency "1" --> "0..*" ComponentConfig: (reference to another component)

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@startuml
title Control Interface - Activate Run Target

autonumber "<b>[00]"

participant "Tester" as Tester
participant "State Manager" as SM
participant "Launch Manager" as LM
participant "OS (kernel)" as kernel
participant "DemoApp1" as DemoApp1
participant "DemoApp2" as DemoApp2
participant "NetworkApp" as NetworkApp

note over SM, LM: Current Run Target: "BasicApps" (DemoApp1 running)
note over SM, LM: Requested Run Target: "DemoGroup" (DemoApp1, DemoApp2)

Tester -> SM: Activate Run Target "DemoGroup"
SM -> SM: evaluate request
SM -> LM: activate_run_target("DemoGroup")
activate LM

LM -> LM: analyze current state
note right of LM: Current: BasicApps (DemoApp1)\nTarget: DemoGroup (DemoApp1, DemoApp2)\nAction: Start DemoApp2, keep DemoApp1

LM -> LM: validate run target "DemoGroup"
LM -> LM: check dependencies for DemoGroup
LM -> LM: determine transition plan

alt DemoApp2 needs to be started
LM -> kernel: spawn DemoApp2
kernel -> DemoApp2: spawn
activate DemoApp2
kernel --> LM: result of spawning DemoApp2

LM -> LM: wait for DemoApp2 ready condition
DemoApp2 -> DemoApp2: initialize and register device /dev/Demo2
DemoApp2 -> LM: signal ready state via Lifecycle API
kernel --> LM: event /dev/Demo2 registered
end

LM -> LM: verify all components in "DemoGroup" are running
LM -> LM: update current run target state to "DemoGroup"
LM --> SM: run target "DemoGroup" activated successfully

note over SM, LM: New Run Target: "DemoGroup" (DemoApp1, DemoApp2 running)

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@startuml
title Control Interface - Activate Run Target (Legacy)

autonumber "<b>[00]"

participant "Tester" as Tester
participant "State Manager" as SM
participant "Launch Manager" as LM
participant "OS (kernel)" as kernel
participant "DemoApp1" as DemoApp1
participant "DemoApp2" as DemoApp2

note over SM, LM: Activating Run Target "DemoTarget"

Tester -> SM: Activate Run Target "DemoTarget"
SM -> SM: evaluate request
SM -> LM: activate_run_target("DemoTarget")
activate LM

LM -> LM: validate run target exists
LM -> LM: analyze current vs target state
LM -> LM: determine components to start

LM -> kernel: spawn DemoApp1
kernel -> DemoApp1: spawn
activate DemoApp1
kernel --> LM: result of spawning DemoApp1

LM -> kernel: spawn DemoApp2
kernel -> DemoApp2: spawn
activate DemoApp2
kernel --> LM: result of spawning DemoApp2

LM -> LM: wait for run target ready conditions
DemoApp2 -> DemoApp2: register device /dev/Demo2
DemoApp2 -> LM: signal ready via Lifecycle API
kernel --> LM: event /dev/Demo2 registered

LM -> LM: verify run target "DemoTarget" fully active
LM --> SM: run target "DemoTarget" activated

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@startuml
title Control Interface Static Architecture

package "Launch Manager" {
[Launch Manager (LM)] as LM
interface ControlInterface

LM -- ControlInterface : implements
}

package "State Manager" {
[State Manager] as SM
}

SM -up-> ControlInterface : uses

note right of [ControlInterface] : Start/Stop/Restart components\nQuery status\n...

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@startuml
title Control Interface - Stop components

autonumber "<b>[00]"


participant "Tester" as Tester
participant "State Manager" as SM
participant "Launch Manager" as LM
participant "OS (kernel)" as kernel
participant "DemoApp1" as DemoApp1
participant "DemoApp2" as DemoApp2



Tester -> SM: Stop Group (eg. UDS)
SM -> SM: evaluate request
SM -> LM: Stop group DemoApps
activate LM
LM -> DemoApp1: SIGTERM
activate DemoApp1
LM -> DemoApp2: SIGTERM
activate DemoApp2

DemoApp1 -> DemoApp1: do shutdown actions
DemoApp2 -> DemoApp2: do shutdown actions

destroy DemoApp1

LM -> LM: check if the apps terminated within\nthe termination timeout?
LM -> DemoApp2: SIGKILL
destroy DemoApp2


LM --> SM: DemoApps terminated

@enduml
Loading