Skip to content

Commit fdf70bd

Browse files
author
Piotr Tanski
authored
[EGD-4134] New application manager proposal documentation. (#882)
1 parent a274541 commit fdf70bd

12 files changed

+144
-0
lines changed

changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
### Other
1515

16+
* `[appmgr]` Application manager documentation added.
17+
1618
## [0.43.1 2020-10-23]
1719

1820
### Added
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Application Manager
2+
3+
The Application Manager service is responsible for application lifecycle and switching between applications and views.
4+
This includes:
5+
- starting
6+
- closing
7+
- registering
8+
- switching applications and views
9+
- managing display access
10+
11+
## Initialisation
12+
13+
![](appmgr_init.png)
14+
15+
## Starting application
16+
17+
![](appmgr_start_app.png)
18+
19+
## Switching between applications
20+
21+
![](appmgr_switch_app.png)
22+
23+
## Switching to previous application
24+
25+
![](appmgr_switch_back.png)
26+
27+
## New Application Manager - Proposal
28+
29+
Main problems of current implementation:
30+
1. Application knows the name of another application it wants to switch to.
31+
2. Each application is responsible for implementing the logic of an action (e.g. sending an SMS) on its own. In that context, the Application Manager is responsible only for switching between apps.
32+
33+
The proposal of New Application Manager solves these problems.
34+
35+
![](appmgr_switch_sms_app_proposal.png)
36+
37+
Applications do not request for application switch explicitly. Instead, applications send action requests to the Application Manager.
38+
The action request may contain:
39+
- Type of action, e.g. `SendSMS`
40+
- Generic data storage
41+
42+
Depending on the action's type, the Application Manager decides which application should handle it, based on the application's manifest.
43+
Thanks to that, Application Manager decouples applications.
44+
45+
### Registering applications
46+
47+
Before start, each application will register its manifest to the Application Manager.
48+
The manifest will be stored in the Applications Registry.
49+
50+
The manifest may contain the following information:
51+
- Application name
52+
- Whether the application should run in background/foreground
53+
- Actions it is able to handle
54+
55+
Once the action is requested, the Application Manager retrieves action handlers from the Application Registry.
56+
57+
### Generic data
58+
59+
It should be possible to send any custom data along with the action request.
60+
This is the reason, why action request will implement storage for generic data.
61+
62+
The idea is to create a base for such generic data. It should be able to serialize and deserialize into/from a data storage, e.g. JSON, FlatBuffers, binary formats.
63+
64+
When sent, the data will be serialized into the data storage, and only that storage shall be sent along with the action request.
65+
66+
When received, the data will be re-created from the storage and used by a receiver object.
7.19 KB
Loading
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@startuml
2+
participant "Application Manager" as appmgr
3+
participant "Root Application" as root
4+
5+
appmgr -> appmgr: Start system services
6+
appmgr -> root: Start
7+
@enduml
9.52 KB
Loading
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@startuml
2+
participant "Application Manager" as appmgr
3+
participant "Application" as app
4+
5+
alt Application running in background
6+
appmgr -> app: Switch
7+
else
8+
appmgr -> app: Run
9+
app -> appmgr: Registers
10+
appmgr -> app: Switch
11+
end
12+
13+
@enduml
13.2 KB
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@startuml
2+
participant "Application 1" as app1
3+
participant "Application Manager" as appmgr
4+
participant "Application 2" as app2
5+
6+
app1 -> appmgr: SwitchApplication("Application 2")
7+
8+
alt Application 1 is closeable
9+
appmgr -> app1: Close
10+
else
11+
appmgr -> app1: Focus lost
12+
end
13+
14+
app1 -> appmgr: Confirm
15+
16+
appmgr -> app2: Start
17+
18+
@enduml
12.5 KB
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@startuml
2+
participant "Application" as app
3+
participant "Application Manager" as appmgr
4+
participant "Previous Application" as prev
5+
6+
app -> appmgr: SwitchBack
7+
8+
alt Application is closeable
9+
appmgr -> app: Close
10+
else
11+
appmgr -> app: Focus lost
12+
end
13+
14+
app -> appmgr: Confirm
15+
16+
appmgr -> prev: Start
17+
18+
@enduml

0 commit comments

Comments
 (0)