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

Multiple database acting as source of entities #7

Closed
sygout opened this issue Apr 1, 2023 · 4 comments · Fixed by #101
Closed

Multiple database acting as source of entities #7

sygout opened this issue Apr 1, 2023 · 4 comments · Fixed by #101
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@sygout
Copy link

sygout commented Apr 1, 2023

Define the modifications of the service to handle multiple databases where entities are stored.

The assumption is that different communities might use different databases to store their entities.

Onto-ns service could then explore and recover these entities and check if the uri exist in one or more of the database, if not return an error, if multiple but exactly equivalent return the entity (but inform the database managers about duplication) and if multiple different return error and inform databases managers.

@CasperWA CasperWA added enhancement New feature or request question Further information is requested labels Jan 31, 2024
@CasperWA
Copy link
Collaborator

CasperWA commented Feb 13, 2024

After discussing this shortly with @francescalb an idea came up to introduce a "personal" or "project-specific" part of the namespace.

The main issue here is mapping the URI/URL to different backends/databases/entity storages.
We can only communicate differences through the core URL, i.e., we cannot include query parameters or other special parts of the URL to distinguish backends as the entities' uri would have to match accordingly.

So if the difference is introduced in this "core" part of the URL between the current namespace and the version, then that would effectively "fix" this issue, allowing for us to have multiple backends mapping to specific URI/URLs as well as still do all of this through the same service running at http://onto-ns.com/meta.

My suggestion is to define the URIs as follows:

<general namespace>/<specific namespace>/<entity version>/<entity name>.

General namespace: Must be the root URL of the entities service - in the case of onto-ns it is: http://onto-ns.com/meta.
Specific namespace: Any name, could in theory even be a sub-divided namespace like MyProject/TestEntities? The name would then map 1:1 with a backend entity storage in order to not have clashes with how to resolve same-named entities coming from multiple backend sources.
Entity version: The entity version, e.g., 1.2.
Entity name: The entity name, e.g., TEMImage.

@jesper-friis
Copy link
Contributor

<general namespace>/<specific namespace>/<entity version>/<entity name>

is a good naming scheme for new entities. But I don't think we want to change the names of the build-in or existing entities.

@jesper-friis
Copy link
Contributor

For requirements on how the URIs should be written, see SINTEF/dlite#788.

@CasperWA
Copy link
Collaborator

For requirements on how the URIs should be written, see SINTEF/dlite#788.

Note, this is true only for the DLite-flavoring.

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

Successfully merging a pull request may close this issue.

3 participants