occiware / OCCI-Studio

OCCI Studio
Eclipse Public License 1.0
11 stars 2 forks source link

Mixin tags : How to manage them in meta model v2 ? #13

Closed cgourdin closed 6 years ago

cgourdin commented 7 years ago

Hello, Using MixinBase is not a good solution for this particular mixin (not an extension mixin but a configuration mixin), MixinBase objects are used mainly for implementation and display. Mixin tags has no implementation as they are created on demand by users. To avoid memory leaks (instanciation of MixinBases), find a simple way to manage mixin tags in studio core v2 (optimized way) and how to use them in MartServer application.

Thanks.

fzalila commented 7 years ago

During the improvements of the OCCIware metamodel v1, the former Entity.mixins reference is transformed into a derived relation that retrieves the mixins referenced by different parts (MixinBase) of an entity.
Therefore, this modification no longer allows referring a tag mixin directly from an entity. It should be done via instantiating a mixinBase and then assigning the tag mixin to this mixinBase. As you said, this solution may be costly on memory because it replaces a simple reference from a tag mixin to the entity by (1) creating an additional instance of mixinBase for an entity and (2) referring to the concerned tag mixin. For that, I propose to add a reference between Entity and Mixin, named [1..1] entity <----> [0..*] tags, in order to resolve this issue. @philippemerle, are you agree? best, Faiez

fzalila commented 6 years ago

Finally, after discussion, in order to create a mixin tag, you should at first create a mixinBase instance and then associate the mixin tag to your mixinBase instance.