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

How to handle multi user for the same installation? (Simultaneous query) #22

Closed
4 tasks done
pedrobcst opened this issue Apr 6, 2022 · 1 comment · Fixed by #26
Closed
4 tasks done

How to handle multi user for the same installation? (Simultaneous query) #22

pedrobcst opened this issue Apr 6, 2022 · 1 comment · Fixed by #26
Assignees

Comments

@pedrobcst
Copy link
Owner

pedrobcst commented Apr 6, 2022

Currently, as designed, Xerus can only handle one user for one installation when querying for missing CIFs for a given chemical space.
With the development of the Streamlit beta interface, the possibility of one installation being used by many users will be possible.
In this scenario, Xerus cannot handle concurrent query for different chemical spaces, as it always save and tests the cifs using fixed names.
Change this to support multiquery use by multiple users simultaneously.

Ideas:

  • Instead of using a 'predefined' name for each provider as (mp_dump, cod_dump, aflow_dump, etc), we could use instead directly the chemical space name + provider as (Ho-B_mp_dump) etc and the same for queried_cifs folder.
  • If above, we have also to change the 'test_cif' to accept the final folder as final destination for final testing.

TODO:

  • Change query static folder names ('xx_dump') to a name based on dataset name + chemical space + provider, ie from 'mp_dump' to 'DataSetName_ChemSpace_mp_dump' (or something smaller)
  • Change testing cif to accept the final 'dump folder' also from static (queried_cifs) to the same as above
  • For the case of multiple user querying overlap space, before adding the CIFs, we should do a check to see if that structure already exist in the database OR we should 'clean up' the database of duplicates after querying (whatever is better, maybe the first option is best)
  • Write few tests (not to be used in CI, just to check the if everything works well), emulating multi user usage from with overlapping chemical spaces, identical chemical spaces and non overlappaing chemical spaces
@pedrobcst pedrobcst self-assigned this Apr 11, 2022
@pedrobcst
Copy link
Owner Author

Instead of checking the ID on insertion, I have changed to ensure that "id" (which is related to provider ID, not Mongo unique "_id"), to be unique.
Now, if the collection does not exist, it will be automatically created with the ID ("id") set to unique.
For already existing collections, mgiht have to do this manually.

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

Successfully merging a pull request may close this issue.

1 participant