hitontology / gui

Erneuerung der Benutzungsoberflächen von HITO
https://hitontology.github.io/gui/
MIT License
0 stars 0 forks source link

Race condition when switching between paths too fast #34

Closed Yagnap closed 6 months ago

Yagnap commented 6 months ago

Steps to reproduce (example)

  1. Select ApplicationSystemTypeClassified as source
  2. Select EnterpriseFunctionClassified as target
  3. In the popup, select the first option
  4. Then select the new target ApplicationSystemTypeCatalogue

Expected Behaviour

The results for ApplicationSystemTypeClassified -> ApplicationSystemTypeCatalogue are shown, since this is the currently shown path.

Current Behaviour

First, nothing is shown while both SPARQL queries are waiting for the answer of the server. Then, the answer for ApplicationSystemTypeClassified -> ApplicationSystemTypeCatalogue is shown (probably because the SPARQL query is much shorter). This is the expected behaviour.

After a short time, the results for ApplicationSystemTypeClassified -> EnterpriseFunctionClassified are shown, since the longer and more complex SPARQL query needed more time to be completed and is now shown, disregarding the new path.

Possible solutions

  1. Abort the first SPARQL query/ignore the result if it does not match the currently selected path -> probably the most expected option, I would suggest this one as the final solution
  2. Let both SPARQL queries run and when results are in, select the path matching the result -> this could confuse users, I don't think this is a good idea
  3. Make selecting different nodes impossible -> would make the application feel unresponsive, but better alternative than (2) if (1) turns out to be not implementable easily