-
Notifications
You must be signed in to change notification settings - Fork 60
Adding FEO component architecture #1203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
docs/features/frameworks/feo/modules/feo/feo/docs/architecture/_assets/act_chain.puml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/' | ||
# ******************************************************************************* | ||
# 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 | ||
# ******************************************************************************* | ||
'/ | ||
|
||
hide empty description | ||
|
||
state "UserActivity 1" as a1 | ||
state "UserActivity 2" as a2 | ||
state "UserActivity 3" as a3 | ||
state "UserActivity 4" as a4 | ||
|
||
a1: Primary Process | ||
a2: Secondary Process 1 | ||
a3: Secondary Process 1 | ||
a4: Secondary Process 2 | ||
|
||
a3 --> a1 | ||
a3 --> a4 | ||
a1 --> a2 | ||
a4 --> a2 |
155 changes: 155 additions & 0 deletions
155
docs/features/frameworks/feo/modules/feo/feo/docs/architecture/_assets/dyn_arch.puml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
/' | ||
# ******************************************************************************* | ||
# 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 | ||
# ******************************************************************************* | ||
'/ | ||
|
||
box "Primary Process" #E0E0E0 | ||
participant "Primary Agent" as prim | ||
participant "Scheduler" as scheduler | ||
participant "UserActivity 1" as activity_1 | ||
end box | ||
|
||
box "Secondary Process 1" #F0F0F0 | ||
participant "Secondary Agent 1" as sec_1 | ||
participant "UserActivity 2" as activity_2 | ||
participant "UserActivity 3" as activity_3 | ||
end box | ||
|
||
box "Secondary Process 2" #F0F0F0 | ||
participant "Secondary Agent 2" as sec_2 | ||
participant "UserActivity 4" as activity_4 | ||
end box | ||
|
||
== Process Startup == | ||
|
||
prim -> prim: create \nworker threads | ||
sec_1 -> sec_1: create \nworker threads | ||
sec_2 -> sec_2: create \nworker threads | ||
|
||
sec_1 -> prim: connect | ||
sec_2 -> prim: connect | ||
|
||
|
||
prim -> scheduler: sync_remotes() | ||
activate scheduler | ||
|
||
scheduler -> sec_1: sync | ||
scheduler -> sec_2: sync | ||
sec_1 -> sec_1: sync | ||
sec_2 -> sec_2: sync | ||
sec_1 --> scheduler: ready | ||
sec_2 --> scheduler: ready | ||
|
||
scheduler --> prim: ok | ||
deactivate scheduler | ||
|
||
|
||
== Activity Init == | ||
|
||
note over scheduler, activity_4 | ||
Call each activity's init() method exactly once in an arbitrary order. | ||
end note | ||
|
||
prim -> scheduler: run() | ||
activate scheduler | ||
|
||
scheduler -> activity_1: init() | ||
activity_1 -> activity_1: init | ||
activity_1 --> scheduler: ready | ||
|
||
scheduler -> sec_1: init(a2) | ||
sec_1 -> activity_2: init() | ||
activity_2 -> activity_2: init | ||
activity_2 --> sec_1: ready | ||
sec_1 --> scheduler: ready(a2) | ||
|
||
scheduler -> sec_1: init(a3) | ||
sec_1 -> activity_3: init() | ||
activity_3 -> activity_3: init | ||
activity_3 --> sec_1: ready | ||
sec_1 --> scheduler: ready(a3) | ||
|
||
scheduler -> sec_2: init(a4) | ||
sec_2 -> activity_4: init() | ||
activity_4 -> activity_4: init | ||
activity_4 --> sec_2: ready | ||
sec_2 --> scheduler: ready(a4) | ||
|
||
== Main Loop == | ||
|
||
loop break on termination signal to Primary Process | ||
|
||
note over scheduler, activity_4 | ||
Call each activity's step() method in the order defined by the activity graph. | ||
end note | ||
|
||
scheduler -> sec_1: step(a3) | ||
note left: Step a3 first | ||
sec_1 -> activity_3: step() | ||
activity_3 --> sec_1: ready | ||
sec_1 --> scheduler: ready(a3) | ||
|
||
scheduler -> sec_2: step(a4) | ||
note left: Step a1 and a4\nin parallel, but\nafter end of a3 | ||
sec_2 -> activity_4: step() | ||
scheduler -> activity_1: step() | ||
activity_1 --> scheduler: ready | ||
activity_4 --> sec_2: ready | ||
sec_2 --> scheduler: ready(a4) | ||
|
||
scheduler -> sec_1: step(a2) | ||
note left: Step a2 after\nend of a1 and a4 | ||
sec_1 -> activity_2: step() | ||
activity_2 --> sec_1: ready | ||
sec_1 --> scheduler: ready(a2) | ||
|
||
|
||
hnote over scheduler | ||
sleep until end | ||
of cycle time | ||
end note | ||
|
||
end loop | ||
|
||
== Activity Shutdown == | ||
|
||
note over scheduler, activity_4 | ||
Call each activity's shutdown() method exactly once in an arbitrary order. | ||
end note | ||
|
||
scheduler -> activity_1: shutdown() | ||
activity_1 -> activity_1: shutdown | ||
activity_1 --> scheduler: ready | ||
|
||
scheduler -> sec_1: shutdown(a2) | ||
sec_1 -> activity_2: shutdown() | ||
activity_2 -> activity_2: shutdown | ||
activity_2 --> sec_1: ready | ||
sec_1 --> scheduler: ready(a2) | ||
|
||
scheduler -> sec_1: shutdown(a3) | ||
sec_1 -> activity_3: shutdown() | ||
activity_3 -> activity_3: shutdown | ||
activity_3 --> sec_1: ready | ||
sec_1 --> scheduler: ready(a3) | ||
|
||
scheduler -> sec_2: shutdown(a4) | ||
sec_2 -> activity_4: shutdown() | ||
activity_4 -> activity_4: shutdown | ||
activity_4 --> sec_2: ready | ||
sec_2 --> scheduler: ready(a4) | ||
|
||
scheduler --> prim: ok | ||
|
||
deactivate scheduler | ||
|
83 changes: 83 additions & 0 deletions
83
docs/features/frameworks/feo/modules/feo/feo/docs/architecture/_assets/stat_arch.puml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/' | ||
# ******************************************************************************* | ||
# 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 | ||
# ******************************************************************************* | ||
'/ | ||
allowmixing | ||
|
||
package FEO <<feature>> as feat_feo { | ||
|
||
struct "feo::agent::Primary" as feo_primary { | ||
+ new(config: PrimaryConfig) -> Self | ||
+ run(&mut self) -> Result | ||
} | ||
|
||
struct "feo::agent::Secondary" as feo_secondary { | ||
+ new(config: SecondaryConfig) -> Self | ||
+ fn run(self) | ||
} | ||
|
||
struct "feo::agent::PrimaryConfig" as feo_primary_config { | ||
+ cycle_time : Duration | ||
+ activity_dependencies : HashMap<ActivityId, Vec<ActivityId>> | ||
+ recorder_ids : Vec<AgentId> | ||
{field} + worker_assignments : Vec<(WorkerId, Vec<ActivityIdAndBuilder>)> | ||
+ timeout : Duration | ||
+ endpoint : NodeAddress, | ||
} | ||
|
||
struct "feo::agent::SecondaryConfig" as feo_secondary_config { | ||
+ id: AgentId | ||
{field} + worker_assignments: Vec<(WorkerId, Vec<ActivityIdAndBuilder>)> | ||
+ timeout: Duration, | ||
+ endpoint: NodeAddress, | ||
} | ||
|
||
struct "feo::scheduler::Scheduler" as feo_scheduler { | ||
+ new(...) -> Self | ||
+ run() | ||
+ sync_remotes() -> Result | ||
} | ||
|
||
interface "feo::activity::Activity" as activity { | ||
+ init() | ||
+ step() | ||
+ shutdown() | ||
} | ||
|
||
feo_primary --> activity: use | ||
feo_primary --> feo_scheduler: use | ||
|
||
feo_secondary --> activity: use | ||
|
||
} | ||
|
||
package "User Application" <<application>> as user_application { | ||
|
||
component "Primary Process" as PP | ||
component "Secondary Process" as SP | ||
|
||
struct "UserActivity_1" as user_activity_1 | ||
struct "UserActivity_2" as user_activity_2 | ||
|
||
PP --> user_activity_1 : use | ||
SP --> user_activity_2 : use | ||
|
||
user_activity_1 ..|> activity : impl | ||
user_activity_2 ..|> activity : impl | ||
} | ||
|
||
PP --> feo_primary : use | ||
PP --> feo_primary_config : use | ||
SP --> feo_secondary : use | ||
SP --> feo_secondary_config : use | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.