-
Notifications
You must be signed in to change notification settings - Fork 0
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
Mongo DB Storage #89
Mongo DB Storage #89
Conversation
…lets-friggin-mongooo # Conflicts: # src/main/java/eu/dissco/core/handlemanager/domain/fdo/FdoType.java # src/main/java/eu/dissco/core/handlemanager/domain/validation/JsonSchemaValidator.java # src/main/java/eu/dissco/core/handlemanager/service/DoiService.java # src/main/java/eu/dissco/core/handlemanager/service/FdoRecordService.java # src/main/java/eu/dissco/core/handlemanager/service/HandleService.java # src/main/java/eu/dissco/core/handlemanager/service/PidService.java # src/test/java/eu/dissco/core/handlemanager/controller/PidControllerTest.java # src/test/java/eu/dissco/core/handlemanager/domain/JsonSchemaValidatorTest.java # src/test/java/eu/dissco/core/handlemanager/service/DoiServiceTest.java # src/test/java/eu/dissco/core/handlemanager/service/FdoRecordServiceTest.java # src/test/java/eu/dissco/core/handlemanager/service/HandleServiceTest.java # src/test/java/eu/dissco/core/handlemanager/testUtils/TestUtils.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the performance, do you feel it is equal to the db?
Really like how easy the mongodb repo looks
src/main/java/eu/dissco/core/handlemanager/configuration/FdoAttributeDeserializer.java
Outdated
Show resolved
Hide resolved
src/main/java/eu/dissco/core/handlemanager/domain/repsitoryobjects/HandleData.java
Show resolved
Hide resolved
src/main/java/eu/dissco/core/handlemanager/domain/requests/PostRequestData.java
Outdated
Show resolved
Hide resolved
src/main/java/eu/dissco/core/handlemanager/repository/MongoRepository.java
Outdated
Show resolved
Hide resolved
src/main/java/eu/dissco/core/handlemanager/service/FdoRecordService.java
Show resolved
Hide resolved
src/main/java/eu/dissco/core/handlemanager/service/PidNameGeneratorService.java
Show resolved
Hide resolved
src/main/java/eu/dissco/core/handlemanager/service/PidService.java
Outdated
Show resolved
Hide resolved
src/test/java/eu/dissco/core/handlemanager/repository/MongoRepositoryIT.java
Outdated
Show resolved
Hide resolved
Haven't tested large scale, but small tests are performing well. While we can't use the psql batch insert function anymore, i don't think handle creation will be a bottleneck. We now only insert one document instead of up to 30 rows per specimen. Updates are a lot better too, since we had something like |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect
Data Storage
We've changed from a postgres rdb to a mongo doc store! 🎉
Each pid record is a single document, identified by its handle. Each field in the pid record needs some metadata, which is now represented in a json:
An example document is found below:
Indexing Local Identifiers
3 kinds of objects have local identifiers we can use to check if a handle has already been created for that kind of objects:
When we create a specimen, we first search on normalisedSpecimenId to see if a handle has already been created for that object. By putting normalisedSpecimenId on the top-level of the mongo document, we can index the field and quickly find if the handle exists.
We don't do this for annotations or media, but I've included the functionality, if we want to make the check.
Changes to Updates
We no longer support partial updates. Now, the request must contain all fields required to build a new
Changes to Tombstone
Tombstoned records are not truncated anymore. Now, they have all the fields they had before they were tombstoned, but with additional tombstone metadata.
JsonSchemaValidator
Other