simphony / simphony-osp

A framework that aims to achieve interoperability between software such as simulation engines, databases and data repositories using a knowledge graph as the common language.
https://simphony.readthedocs.io
Other
16 stars 12 forks source link

Redefining containers #636

Closed yoavnash closed 2 years ago

yoavnash commented 3 years ago

The usefulness of the container concept in CUDS, as it's used today, is arguable. On the one hand, it allows packing CUDS objects together, which is useful, for example, to ship them over the network as one unit. On the other hand, it creates the overhead of marking (in compile time) the containment relation as an "active relationship" in every ontology that the user wishes to install. Moreover, such containers are not helpful for specifying access rights since such information inflates the size of each CUDS object.

A new redefinition of this concept could bring great value to OSP-core and its users:

In code, this could look like this:

from osp.core import Container
my_container = Container(name="myContainer") 
with my_container:
    c = ns.SomeClass() # c is added automatically to my_container 

In this way, containers are still useful as before for packing objects together in a recursive manner, but eliminate the need for defining active relationships, and allow to add additional information, for example, for access rights, with low overhead on the CUDS objects.

the containers themselves can be stored separately from the CUDS objects, for example, in an SQL database while CUDS objects are stored in a triple store, for the sake of modularity that separates such operational information from the actual data.

yoavnash commented 3 years ago

Notes:

yoavnash commented 3 years ago

A sustainable fix to #626

kysrpex commented 3 years ago

This is the progress in the design process so far (I would say almost ready for implementation if not ready): https://owncloud.fraunhofer.de/index.php/f/358369261.

yoavnash commented 2 years ago

This issue is being addressed separately as part of the discussions on the new cuds concept.