feat: Application module architecture and placeholder features #70

Merged
letian merged 11 commits from feat/applicationModule into master 2025-07-01 19:40:43 +00:00
Owner

With this architecture, we have an extensible application module for which we can easily define new features and add them to application scores.

All this is driven by the ApplicationInterpret, who understands features and make sure they are "installed".

The drawback of this design is that we now have three different places to launch scores within Harmony : Maestro, Topology and Interpret. This is an architectural smell and I am not sure how to deal with it at the moment.

However, all these places where execution is performed make sense semantically : an ApplicationInterpret must understand ApplicationFeatures and can very well be responsible of them. Same goes for a Topology which provides features itself by composition (ex. K8sAnywhereTopology implements TenantManager) so it is natural for this very imp
lementation to know how to install itself.

With this architecture, we have an extensible application module for which we can easily define new features and add them to application scores. All this is driven by the ApplicationInterpret, who understands features and make sure they are "installed". The drawback of this design is that we now have three different places to launch scores within Harmony : Maestro, Topology and Interpret. This is an architectural smell and I am not sure how to deal with it at the moment. However, all these places where execution is performed make sense semantically : an ApplicationInterpret must understand ApplicationFeatures and can very well be responsible of them. Same goes for a Topology which provides features itself by composition (ex. K8sAnywhereTopology implements TenantManager) so it is natural for this very imp lementation to know how to install itself.
johnride added 3 commits 2025-06-30 19:43:06 +00:00
feat: Application module architecture and placeholder features
Some checks failed
Run Check Script / check (pull_request) Failing after 44s
34abe3af24
With this architecture, we have an extensible application module for which we can easily define new features and add them to application scores.

All this is driven by the ApplicationInterpret, who understands features and make sure they are "installed".

The drawback of this design is that we now have three different places to launch scores within Harmony : Maestro, Topology and Interpret. This is an architectural smell and I am not sure how to deal with it at the moment.

However, all these places where execution is performed make sense semantically : an ApplicationInterpret must understand ApplicationFeatures and can very well be responsible of them. Same goes for a Topology which provides features itself by composition (ex. K8sAnywhereTopology implements TenantManager) so it is natural for this very implementation to know how to install itself.
letian reviewed 2025-07-01 14:12:33 +00:00
@ -0,0 +71,4 @@
pub trait ApplicationFeature<T: Topology>: std::fmt::Debug + Send + Sync {
async fn ensure_installed(&self, topology: &T) -> Result<(), String>;
async fn is_installed(&self) -> Result<bool, String>;
async fn uninstall(&self) -> Result<(), String>;
Owner

is_installed and uninstall seem unnecessary for now

`is_installed` and `uninstall` seem unnecessary for now
letian marked this conversation as resolved
letian reviewed 2025-07-01 14:12:47 +00:00
@ -0,0 +69,4 @@
/// ContinuousIntegration, ContinuousDelivery
#[async_trait]
pub trait ApplicationFeature<T: Topology>: std::fmt::Debug + Send + Sync {
async fn ensure_installed(&self, topology: &T) -> Result<(), String>;
Owner

naming could be revisited, but good enough for now

naming could be revisited, but good enough for now
letian marked this conversation as resolved
johnride added 1 commit 2025-07-01 14:20:10 +00:00
chore: Refactor application module after code review
Some checks failed
Run Check Script / check (pull_request) Failing after -39s
ae95c44867
letian added 1 commit 2025-07-01 15:34:48 +00:00
Adjust imports
Some checks failed
Run Check Script / check (pull_request) Failing after 34s
c02763a6fc
letian added 1 commit 2025-07-01 15:51:26 +00:00
format code
All checks were successful
Run Check Script / check (pull_request) Successful in -8s
2c90d50168
letian added 1 commit 2025-07-01 18:42:49 +00:00
remove unused go application score
All checks were successful
Run Check Script / check (pull_request) Successful in 1m56s
b621a92c82
letian added 1 commit 2025-07-01 19:11:15 +00:00
remove unused statements
All checks were successful
Run Check Script / check (pull_request) Successful in 1m53s
702827c753
letian added 1 commit 2025-07-01 19:14:06 +00:00
Merge branch 'master' into feat/applicationModule
All checks were successful
Run Check Script / check (pull_request) Successful in 1m50s
6684a35b33
letian added 1 commit 2025-07-01 19:18:27 +00:00
remove unused statements - again
Some checks failed
Run Check Script / check (pull_request) Failing after 44s
f512d8307a
letian added 1 commit 2025-07-01 19:21:39 +00:00
oops
All checks were successful
Run Check Script / check (pull_request) Successful in 1m47s
eb27a71264
letian merged commit 284cc6afd7 into master 2025-07-01 19:40:43 +00:00
letian deleted branch feat/applicationModule 2025-07-01 19:40:47 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: NationTech/harmony#70
No description provided.