owlcs / owlapi

OWL API main repository
825 stars 314 forks source link

[question] what are possible use-cases of `ConcurrentOWLOntologyImpl` ? #1110

Closed sszuev closed 4 months ago

sszuev commented 1 year ago

Is it important for OWLAPI ? Which applications use this functionality?

see also https://github.com/owlcs/ont-api/issues/51

ignazio1977 commented 1 year ago

ConcurrentOWLOntologyImpl is used when an ontology is accessed by multiple threads, some of which might be making changes to the ontology. (If all threads only read form the ontology, then there's no need to use locks).

Not sure which apps are currently relying on it. There was one such app when the functionality was introduced.

sszuev commented 1 year ago

ConcurrentOWLOntologyImpl is used when an ontology is accessed by multiple threads, some of which might be making changes to the ontology. (If all threads only read form the ontology, then there's no need to use locks).

Not sure which apps are currently relying on it. There was one such app when the functionality was introduced.

Protege with awt\swing events in Event Dispatch Thread?

ignazio1977 commented 1 year ago

No it was an app being developed for an academic/commercial partnership. Details are a bit fuzzy as this was approximately 2010, we kept getting concurrent modification exceptions and hashmaps stuck because of add operations happening during get operations.

I think there was a second use case, where locking was required to allow imported ontologies to show as loaded while their imports closure was being loaded, but I can't recall enough details.

There's also the fact that many axiom indexes are lazily built and expensive, meaning that avoiding duplicate work is important, but I don't think the locks as implemented make a difference.