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

Extension of the import mechanism by external service model locations #32

Open
josor001 opened this issue Feb 12, 2021 · 2 comments
Open
Assignees
Labels
enhancement New feature or request service viewpoint

Comments

@josor001
Copy link
Collaborator

To provide a better modeling experience when addressing an environment with multiple teams each responsible for at least a microservice (and, hence, a service model), it would be awesome to be able to import external models in a service model and resolve those later on.
so in addition to the normal service imports like:
import microservices from "example.services" as example

During a quick discussion, we came up with something like this for the extended mechanism:
import microservices from "https://www.yolorui.com/yolo" to "example.services" as example

I will try to build something ;)

@josor001 josor001 self-assigned this Feb 12, 2021
@josor001 josor001 added enhancement New feature or request service viewpoint labels Feb 12, 2021
@josor001
Copy link
Collaborator Author

In the branch external imports I pushed a prototypical implementation based on the OpenAPI branch.

After the latest discussion in the lemma development meeting (23 April 2021) we came up with the idea to further extend the external import mechanism adding an explicit type description and support it not only for microservices but all other model kinds, such as:
import technology from "https://www.yolorui.com/yolo" to "example.services" as example with type "LEMMA"

Such types could be GitLab, AVRO, normal LEMMA among others. Using this type desc the external import mechanism should traverse some kind of decision tree and deal with the external import according to the type, e.g., for a LEMMA type it is feasible to simply download the file. For Avro or OpenAPI files it is necessary to first use the appropriate model transformations and extractors.

Regarding the general download mechanism we thought about making it async and do the download in the background during modeling time (ofc including safe guards for example regarding the file size).

Most important, we talked about changing management of the external source files. Imagine Team A depends on the data model of Team B. Now Team B changes the data model. What happens with the external import of the data model in Team A's model? We should deal with this through a timestamp and/or comparing the hash of both files. In case an altered file is detected at the external location, some kind of dialog should pop up for the consuming team which points out ways to deal with it (ie compare both files against each other, simply overwrite it, create automatically an issue for the owning team to keep it stable etc.).

I will first deal with refactoring and maturing the OpenAPI transformation. Afterwards I will deal with this improved external import mechanism :)! Would be awesome for team collaboration to be able to use imports in this new way.

@frademacher
Copy link
Collaborator

With the OpenAPI support advancing towards its integration into LEMMA's main branch (#55 (comment)), are there any updates in the "external import" facility?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request service viewpoint
Projects
None yet
Development

No branches or pull requests

2 participants