Skip to content
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

GPII-1230: MM Taking running applications into account and other improvements #507

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from 96 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ed2ec4b
Merge branch 'master' of https://github.com/GPII/universal into GPII-442
Jan 26, 2017
899d5ba
GPII-442: Using dynamic device reporter in most tests
Mar 1, 2017
9df7931
GPII-442: Using dynamic device reporter in most tests
Mar 1, 2017
edeb9ac
GPII-442: Fixed failing Journal integration tests
Mar 1, 2017
60b7c21
GPII-442: Merged with Joseph's latest changes
Mar 1, 2017
957d488
GPII-442: Removed REST related processReporter functionality
Mar 2, 2017
a5a5909
GPII-442: Improvements to linux gsettings launch handler
Mar 7, 2017
ac4f90e
GPII-1230: Working with already running solutions plus other minor im…
Mar 8, 2017
30e77a1
GPII-1230: Fixed most of the windows acceptance tests
Mar 9, 2017
a645511
GPII-1230: Committing to do Acceptance tests in linux
Mar 10, 2017
6b74c91
GPII-1230: Linted, fixed minor issues
Mar 14, 2017
3beba55
GPII-1230: Fixed unit tests for launch handler
Mar 14, 2017
f39112b
GPII-1230: Fixed up tests and linting... still needs more work
Mar 20, 2017
b9af1c8
GPII-1230: Added and fixed a bunch of LFM unit tests
Mar 29, 2017
17992ae
GPII-1230: Added integration tests for closing conflicting solutions
Apr 6, 2017
625a684
GPII-1230: Added integration tests for closing conflicting solutions
Apr 6, 2017
659bfbf
Merge branch 'GPII-1230' of github.com:kaspermarkus/universal into GP…
Apr 18, 2017
c4ecb80
GPII-2106: Added reference to JIRA for which a test case showed fix
Apr 19, 2017
eb2a8c3
GPII-1230: Linted and cleaned code a bit
Apr 19, 2017
1afe724
GPII-1230: Fixed failing web-based test
Apr 19, 2017
6db70de
GPII-1230: Fixed failing web based test
Apr 19, 2017
1720750
Merge branch 'GPII-1230' of github.com:kaspermarkus/universal into GP…
Apr 19, 2017
fed0fe0
GPII-1230: Removed outdated multiSH stuff
Apr 19, 2017
a7db3b2
GPII-1230: Updated to latest master
Apr 25, 2017
c856292
GPII-1230: updated with latest changes from master
Jul 20, 2017
712a434
GPII-442: updating with latest changes from joseph
Jul 27, 2017
c87f07e
GPII-1230: Updated with latest master
Jul 27, 2017
fb025af
GPII-1230: Updated with latest changes from Joseph
Jul 27, 2017
4dabf33
Merge branch 'GPII-442' into GPII-1230
Aug 15, 2017
8b5e17c
GPII-1230: Updated with latest changes from joseph/master
Aug 15, 2017
d1e9945
GPII-1230: Merged with latest master
Aug 31, 2017
a3d6cc9
GPII-1230: Added latest changes from master
Aug 31, 2017
4b85dc4
GPII-1230: Factored out the selection of restore actions
Sep 4, 2017
c1481d9
GPII-1230: Merged with latest changes from master
Sep 4, 2017
19f7889
GPII-1230: Addressed most of Antranigs comments
Sep 6, 2017
c497abc
GPII-1230: Merged with latest master
Sep 6, 2017
44e13f8
GPII-1230: Dispose options from matchmaker are now only accept and re…
Sep 14, 2017
30dd8c3
GPII-1230: Updated with master and fixed merge conflict
Sep 14, 2017
2425cf2
GPII-1230: Updated with latest version of master
kaspermarkus Nov 8, 2017
55ee04f
GPII-1230: Updated with latest master
kaspermarkus Nov 15, 2017
da34eaa
GPII-1230: Merged with latest master
kaspermarkus Nov 30, 2017
cd4bb3e
GPII-1230: Resolved conflicts with master
kaspermarkus Dec 5, 2017
a1febde
GPII-1230: Merged with latest master
kaspermarkus Dec 13, 2017
2a4bbd6
GPII-1230:
kaspermarkus Dec 19, 2017
1b5616c
GPII-1230: Updated windows tests to work with latest changes in regis…
kaspermarkus Dec 20, 2017
c2e06fc
GPII-1230: Fixed remaining instances of queryProcess without .exe
kaspermarkus Dec 20, 2017
d0b205e
updated with latest changes from master
kaspermarkus Feb 7, 2018
a389459
GPII-1230: Halfway through renaming from settingsHandlers to handlers
kaspermarkus Feb 7, 2018
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
7 changes: 5 additions & 2 deletions documentation/CanopyMatchMaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ To ensure that several conflicting solutions (e.g. two screenreaders) are not la

The apptology is described in more details here: [Apptology.md](Apptology.md).

## Dispositions
As described below, the matchmaker will assign a disposition to each solution based on priority and canopy matching. There are three dispositions available: "accept", "reject" and "deactivate". "accept" means that the solution will be accepted (and started, if relevant for that solution). "reject" means we do not do anything to the solution. "deactivate" means that we ensure that the solution is not running (i.e. running stop if required). The latter case is relevant for solutions that are conflicting with other solutions that the user might need.

## Disposing from prioriy:
Explicit priorities are declared in the NP sets metadata section and will always be a floating point value of 1024 or more. Implicit priorities are deduced from application specific settings. When a user has application specific settings for a solution a priority of 512 is set for that solution.

Goes through all solutions from high priority to low. If a solution already has a disposition, it is ignored. Else it will be selected (accepted). Any solution with the same type, but a lower priority (or no priority) will be rejected. If there are two or more solutions of the same priority _and_ the same type (even partly), these will be considered a "tie". All lower-priority solutions of this type will still be rejected. The tied solutions will have their current disposition and priority removed and left to be disposed by some other disposal algorithm.

## Disposing from Canopy
The Canopy matching strategy is used for deciding how to dispose solutions in case no priorities are available or there is a priority-tie between two applications of the same type.
The Canopy matching strategy is used for deciding how to dispose solutions in case no priorities are available or there is a priority-tie between two applications of the same type.

* The canopy approach is based on a vectorial "fitness measure" of a solution plus a lexicographical ordering
* It is similar to the strategy used in resolving CSS rules.
Expand All @@ -45,7 +48,7 @@ The Canopy matching strategy is used for deciding how to dispose solutions in ca
* Compute capabilities of solution
* Compute vector of prefix depths for each leaf el path from NP set
* Sort vector in descending order of fitness ("fitness vector")
* Rank solutions by fitness using lexicographic ordering
* Rank solutions by fitness using lexicographic ordering

*The canopy matching*
* Compute fitness vectors for each solution and sort in rank order
Expand Down
2 changes: 1 addition & 1 deletion documentation/MatchMakerFramework.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ The input for these POST requests will be in the following format. Note that it

### Return payload

The return payload from at call to `/match` should be in the following format:
The return payload from at call to `/match` should be in the following format. The "active" key expresses whether the application should be set to running. A `true` value means that it should be running, `undefined` means we leave it in its current run state and `false` mean we should actively ensure that it is not running.

```
{
Expand Down
8 changes: 4 additions & 4 deletions documentation/SolutionsRegistryFormat.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Each entry in the solution registry should have a unique ID (`Solution.id` in th
"start": [ .. ],
"stop": [ .. ],
"isInstalled": [ .. ],

// Not yet supported. Post-Cloud4All features.
"install": [ ... ],
"uninstall": [ ... ],
Expand Down Expand Up @@ -116,7 +116,7 @@ These four lifecycle blocks have different meanings to the system but has the sa
* `start`: Launch/start the solution
* `stop`: Stop/kill the solution

Each of these lifecycle blocks allow the same content - which is an array with entries that are either references to settingsHandlers blocks or customized lifecycle blocks. To reference a settingsHandler block, the keywork `settings.<blockname>` is used, where `<blockname>` should be replaced with the name of a settingsHandler block. In the case of `configure` and `start`, a consequence of referencing a settingsHandler is that the settings given in the settingsHandler and users preferences set will be applied to that solution (and their original values will be saved to the system - if user just logged in). In the case of `restore` and `stop`, the settings that has previously been written using the settingshandler(s) in question will be restored. Alternative to referencings setting and restoring settings, arbitrary lifecycle actions are allowed - the syntax for this is an object that contains at least a `type` key for the function to call. None of these blocks are mandatory.
Each of these lifecycle blocks allow the same content - which is an array with entries that are either references to settingsHandlers blocks or customized lifecycle blocks. To reference a settingsHandler block, the keywork `settings.<blockname>` is used, where `<blockname>` should be replaced with the name of a settingsHandler block. In the case of `configure` and `start`, a consequence of referencing a settingsHandler is that the settings given in the settingsHandler and users preferences set will be applied to that solution (and their original values will be saved to the system - if user just logged in). In the case of `restore` and `stop`, the settings that has previously been written using the settingshandler(s) in question will be restored. Alternative to referencings setting and restoring settings, arbitrary lifecycle actions are allowed - the syntax for this is an object that contains at least a `type` key for the function to call. None of these blocks are mandatory.

**Example blocks**:
```
Expand Down Expand Up @@ -144,7 +144,7 @@ Each of these lifecycle blocks allow the same content - which is an array with e

The `update` block works very similarly to the configure, restore, start and stop blocks. It describes what should happen when the configuration needs to be updated (e.g. due to context changes, PCP adjustments, etc).

The format of the `update` block allows for the same entries as the configure, restore, start and stop blocks - that is: arbitrary lifecycle action blocks and `settings.<blockname>`. Unlike for the other lifecycle blocks, the `update` block furthermore allows references to the `start`, `stop` and `configure` blocks. This is one by putting a string with the name of that block. When the system encounters one of these references, the entries of that block will be run.
The format of the `update` block allows for the same entries as the configure, restore, start and stop blocks - that is: arbitrary lifecycle action blocks and `settings.<blockname>`. Unlike for the other lifecycle blocks, the `update` block furthermore allows references to the `start`, `stop` and `configure` blocks. This is done by putting a string with the name of that block. When the system encounters one of these references, the entries of that block will be run.

**Example block**:
```
Expand Down Expand Up @@ -204,7 +204,7 @@ This is run before configuration to ensure that the application is actually read

**Example Entry**:
```
"isConfigurable": [{
"isConfigurable": [{
"type": "gpii.reporter.fileExists",
"path": "${{environment}.XDG_DATA_HOME}/orca/user-settings.conf""
}]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 63 additions & 1 deletion gpii/node_modules/canopyMatchMaker/test/CanopyMatchMakerTests.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions gpii/node_modules/contextManager/src/ContextManager.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading