Open yoavnash opened 2 years ago
@csadorf
@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.
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).
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.
@kysrpex this is true. The issue here is also that deserialization is not at all possible if there is no ontology access whatsoever.
I updated the title and description. I hope it now better describes the main point that was raised. Thanks for the feedback.
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.
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: