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

services: provide base class for DB-only based entities #583

Open
slint opened this issue Jul 10, 2024 · 0 comments
Open

services: provide base class for DB-only based entities #583

slint opened this issue Jul 10, 2024 · 0 comments

Comments

@slint
Copy link
Member

slint commented Jul 10, 2024

  • We currently have a base RecordService class that assumes "Record-like" models backed by both the DB as a primary store for item read/write operations and OpenSearch indices for all list/search operations.
  • When creating new entities (i.e. the model + service + resource trifecta) that are only stored in the DB and are not backed by OpenSearch indices, we usually subclass from RecordService and override/adapt/remove configuration and functionality that assumes any OpenSearch indexing to get things working. This is necessary because the base class has a lot of convenient functionality for schema validation, results rendering, serialization, and overall ease of configuration.

We have the following use cases so far of services that are DB-only and had to do this:


The proposal is to "lift" some of the functionality overridden/reimplemented in the above use cases into invenio-records-resources, to avoid duplication and benefit across the board from common utilities and features. Some of this common functionality includes:

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

No branches or pull requests

1 participant