You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _docs/generators/service-cutter.md
+31-22
Original file line number
Diff line number
Diff line change
@@ -12,48 +12,52 @@ For more information about Service Cutter we refer to its projects wiki and two
12
12
*[Service Cutter: A Systematic Approach to Service Decomposition (Paper)](https://link.springer.com/chapter/10.1007/978-3-319-44482-6_12)
13
13
*[Service Cutter: A Systematic Approach to Service Decomposition (HSR Bachelor Thesis)](https://eprints.hsr.ch/476/)
14
14
15
-
<divclass="alert alert-custom">
16
-
<strong>Note:</strong> The Service Cutter generators are not yet supported in our new Visual Studio Code extension. We continuously work on the extension and will support them soon! To use this generators you have to use the Eclipse plugin for now. You can find a feature support table for Eclipse and VS Code <ahref="/docs/ide/">here</a>.
17
-
</div>
18
-
19
15
## User Guide
20
16
The following sections describe how to use the Service Cutter generators and create the input files for Service Cutter.
21
17
22
18
### Generate Entity Relationship Model File
23
19
Service Cutter uses an [Entity-Relationship Model](https://github.com/ServiceCutter/ServiceCutter/wiki/ERM) Diagram (ERD) file that contains entities and nanoentities to describe the applications structure as its first and mandatory input.
24
20
25
-
We assume you have a CML file with your model in Eclipse (with our plugin installed). A right-click to the CML-file will guide you to a **Context Mapper** context menu. When selecting the action **Service Cutter: Generate Input File (JSON)**, you generate the Service Cutter ERD file in the required JSON format:
21
+
We assume you have a CML file with your model in your IDE with Context Mapper installed. In the context menu of the editor you find the action **Generate Service CutterInput (ERD as JSON)**. By running this command, you generate the Service Cutter ERD file in the required JSON format:
<strong>Note</strong> that the <strong>Context Mapper</strong> menu entry is also available within the context menu uf the CML editor
31
-
(right-click anywhere in the editor).
32
-
</div>
33
-
34
25
### Generate SCL File
35
26
The second input file for Service Cutter deals with additional *User representations*. Service Cutter takes them in JSON format, but there is some manual work required to create these file. Hence, we implemented another DSL which makes this step much easier. These files have the file extension `*.scl*` (for *Service Cutter Language*).
36
27
37
-
A SCL file can be generated out of a CML file. Again, a right-click to the CML-file will open the **Context Mapper** context menu. You can initialize your SCL file with the action **Service Cutter: Initialize User Representations File (Exemplary)**:
28
+
An SCL file can be generated out of a CML file. Again, a right-click in the CML editor will allow you to call the action **Generate Service CutterUser Representations (SCL)**:
**Note:** The generated SCL file is a template that intends to help you by setting the structure expected by Service Cutter. The following generated parts are only examples, and
42
-
will have to be adjusted:
32
+
The SCL grammar allows you to describe all [user representations supported by Service Cutter](https://github.com/ServiceCutter/ServiceCutter/wiki/User-Representations):
33
+
34
+
* Entity Relationship Model (ERM)
35
+
* Use Cases
36
+
* Shared Owner Groups
37
+
* Aggregates
38
+
* Entities
39
+
* Predefined Services
40
+
* Separated Security Zones
41
+
* Security Access Groups
42
+
* Compatibilities
43
+
44
+
Most of the user representations we derive from the CML model automatically. The ERM is derived from the Entities and their references in CML. The Use Cases and Shared Owner Groups can be modeled in CML as well (have a look at our [service decomposition tutorial](/docs/systematic-service-decomposition/)). We further derive the Aggregates and Entities for Service Cutter from the corresponding counterparts in CML. In addition, we derive Predefined Services from already existing Bounded Contexts of your CML model. The remaining user representations have to be described manually, in case they are relevant for your application.
45
+
46
+
However, the generated SCL file already contains most of the representations:
The following elements are actually derived from the CML model and do not have to be changed:
50
+
**Note:**The automatically derived user representations are overwritten if you call the generator again.
51
51
52
-
***[Aggregates](https://github.com/ServiceCutter/ServiceCutter/wiki/Aggregates)** (derived from your Aggregates in the CML file)
53
-
***[PredefinedService](https://github.com/ServiceCutter/ServiceCutter/wiki/Predefined-services)** (derived from your bounded contexts in the CML file)
52
+
#### Examplary SCL File
53
+
In case you want to add more user representations that are missing in the automatically generated ones, you can generate an exemplary SCL file that illustrates the syntax for all possible representations. Just call the **Generate Service Cutter User Representation Example File (SCL)** action to generate an example:
**Note:** This generated SCL file is only exemplary and intended to help you setting up the structure in the actual SCL file generated in the step above.
54
58
55
59
### Generate User Representations JSON File
56
-
Once you have prepared your SCL file, you can generate the corresponding JSON file with the action **Service Cutter: Generate User Representations File (JSON)** in the context menu:
60
+
Once you have prepared your SCL file, you can generate the corresponding JSON file with the action **Generate Service CutterUser Representation JSON File** in the context menu:
57
61
58
62
<ahref="/img/service-cutter-input-generation-3.png"></a>
59
63
@@ -67,3 +71,8 @@ Have fun with cutting your services :)
67
71
*Note:* Service Cutter has not been updated in a while, and only intended to demonstrate the possibilities of criteria-based graph clustering in the context of service decomposition (and establish a method and a first catalog of criteria). So do not expect mature, production-ready cuts to be suggested, but view them as a discussion and design workshop input. Further research is required to harden the approach; such research is ongoing (evidence: [40+ citations of the Service Cutter paper presented at ESOCC 2016](https://www.researchgate.net/publication/307873263_Service_Cutter_A_Systematic_Approach_to_Service_Decomposition)).
Note that you can also generate new service cuts in Context Mapper directly without using Service Cutter! We integrated the Service Cutter library into Context Mapper so that our users are able to generate new service decompositions out of CML models easily.
77
+
78
+
* Have a look at our [Systematic Service Decomposition with Context Mapper and Service Cutter](/docs/systematic-service-decomposition/) tutorial.
0 commit comments