Skip to content

Towards round trip data flow analyis using the web editor #175

@sebinside

Description

@sebinside

Demonstration will be easier than ever with the semantic preserving conversion of DFD to PCM of #170. However, @Nicolas-Boltz and I came up with an even better version that uses our current analysis and display capabilities more efficiently.

1. Display analysis results in web editor

In the first step, we should use the node annotations of the web editor (see DataFlowAnalysis/WebEditor#42) in the converter from DFD to Web JSON. This does not only include the violations but also the propagated labels (which is, in a way, the requirement that Nicolas had in the last meeting, but this time without any hacks). I attached a simple JSON file. The (made up) violation is shown in red, hovering over the user node also shows the propagated labels.

The good thing is, that these annotations are really simple, e.g., in the attached example:

"annotation": {
                    "message": "Propagated labels: data.personal",
                    "icon": "tag"
                }

and

"annotation": {
                    "message": "Violation: Constraint 42 has been violated.",
                    "icon": "bolt",
                    "color": "#ff0000"
                }

We could even argue that this should be the default behavior of the converter (which might be possible to disable via a flag) because this is the most user friendly way how to display analysis results.

analysis-result.json

2. Round trip between editor and analysis

There is another nice feature in the current version of the web editor (which is also documented here; really, really good work @hlxid!):

"editorMode": "annotated"

This feature makes the web editor read-only and the user has to click a button that enables changing the diagram again but removes all annotations. This made @Nicolas-Boltz and myself thinking and we came up with an idea which would give us the most brilliant demonstration capabilities ever (without jokes, for real, this was like a big vision two years ago, and now it becomes reachable).

Executed locally, we (probably) could force the web editor to write to and load from a file (or get the json of the model from any other source like a locally hosted service). By having an eclipse instance (headless, or a test case) that watches this file for changes (or provides the endpoint for the json data), we could run the analysis if the diagram is changed, display the changes a few seconds after this, allow the editor to make changes, and start over again. This way, we don't have to update the core analysis, but users will only see the web editor front end. And drumroll because of #170, this would even work with PCM models after conversion. Throw this into a docker container, and you have reached demonstrator end game. In the future, we could then even enable writing DSL constraints web based (but that's really future work).

TL;DR

With the upcoming 3.0.0 version of the data flow analysis, we already provide a comprehensive, well-published analysis framework. However, changes in the proposed direction would not only simplify demonstrations (by a lot) but also reach the vision of light-weight and future-proof architectural analysis. We are close!

Metadata

Metadata

Labels

converterRelated to the DFD/PCM/MS converterenhancementNew feature or requestsupportRelated to supporting projects which are neither core analysis or meta model bundels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions