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

Support deserialization of CUDS even when ontologies are not installed #751

Open
yoavnash opened this issue Feb 2, 2022 · 7 comments
Open

Comments

@yoavnash
Copy link
Member

yoavnash commented Feb 2, 2022

** Edited **
A serialized CUDS object may be transferred across to network to a user that may not have the required ontologies installed on their local OSP-core. Therefore, an attempt to deserialize the received data will fail.

Ways to mitigate:

@yoavnash
Copy link
Member Author

yoavnash commented Feb 2, 2022

@csadorf

@csadorf
Copy link

csadorf commented Feb 3, 2022

@yoavnash I think the actual issue that @CasperWA brought up, is that it is not possible to deserialize a CUDS container object in case that the ontologies cannot be downloaded at all, e.g., because the server is offline or there is no internet connection.

@CasperWA
Copy link

CasperWA commented Feb 3, 2022

Indeed. In case one does not have the ontology/-ies locally and they are not available online (due to incorrect IRIs or servers being offline or other) then there is no way to serialize the JSON content to Python objects - I believe? It's essentially what you're writing in the OP as well - just with the addition of a complete halt in the serialization process if the information is not available anywhere.

At such a point, the only solution left is to manipulate the JSON object directly, which is far from ideal and defeats the purpose of this package (in my opinion).

@kysrpex
Copy link
Contributor

kysrpex commented Feb 3, 2022

I think "automatic fetching of ontologies from IRI upon CUDS deserialization" is the wrong approach. Why would one bother downloading the resource from the internet, when the sender has the ontology installed? It makes more sense to send the resource (the ontology) over the network if the receiver does not have it. This is actually issue #438 in my opinion.

@CasperWA
Copy link

CasperWA commented Feb 3, 2022

@kysrpex this is true. The issue here is also that deserialization is not at all possible if there is no ontology access whatsoever.

@yoavnash yoavnash changed the title Support automatic fetching of ontologies from IRI upon CUDS deserialization Support deserialization of CUDS even when ontologies are not installed Feb 3, 2022
@yoavnash
Copy link
Member Author

yoavnash commented Feb 3, 2022

I updated the title and description. I hope it now better describes the main point that was raised. Thanks for the feedback.

@yoavnash
Copy link
Member Author

yoavnash commented Feb 3, 2022

I think "automatic fetching of ontologies from IRI upon CUDS deserialization" is the wrong approach. Why would one bother downloading the resource from the internet, when the sender has the ontology installed? It makes more sense to send the resource (the ontology) over the network if the receiver does not have it. This is actually issue #438 in my opinion.

Note that CUDS are not necessarily sent via the transport layer. Instead, they could be deserialized using the utility function and sent via other means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants