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

RFC: Record Controller #23

Closed
lnielsen opened this issue Apr 1, 2020 · 0 comments
Closed

RFC: Record Controller #23

lnielsen opened this issue Apr 1, 2020 · 0 comments
Labels
Framework Invenio Framework Proposal: Accepted Accepted proposal for new RFC

Comments

@lnielsen
Copy link
Member

lnielsen commented Apr 1, 2020

Co-writing on Codimd

The goal of this RFC is to clearly separate the data flow for Invenio into several layers: a data access layer, a business logic layer and view layer.

The data flow in Invenio has been shown to suffer from several issues that overall causes confusion as well as possibly produce hard-to-main code due to lack of very clear separation of responsibilities. Examples of issues with the data flow:

  • Serializers can fetch records from both the database and Elasticsearch but these representations are not identical causing serializers to having to first transform them to a standard format.
  • Marshmallow schemas in loaders have dependencies on the Flask request context making them impossible to use outside of a request.
  • The $schema attribute has not clear place to be injected - sometimes it is added to the marshmallow loader other times not.
  • Indexing receivers receive all signals instead of only for records they actually can handle.
  • Indexing is based on the $schema attribute, but sometimes this needs further customization.
  • Deposit needs to preserve some fields in the JSON that should not be overwritten by the user.
  • A record class can be used in several modules (example Invenio-Records-REST and Invenio-GitHub), but does not provide proper business-level validation, just structural validation via the JSONSchema.
  • The $schema attribute is supposed to be used for versioning, but it hides the feature.
@lnielsen lnielsen added the Framework Invenio Framework label Apr 1, 2020
@lnielsen lnielsen added this to Todo in Architects via automation Apr 1, 2020
@lnielsen lnielsen moved this from Todo to In progress in Architects Apr 1, 2020
@lnielsen lnielsen added the Proposal: Accepted Accepted proposal for new RFC label Apr 2, 2020
@fenekku fenekku added this to To do in InvenioRDM April Board via automation Apr 27, 2020
@fenekku fenekku moved this from To do to In progress in InvenioRDM April Board Apr 27, 2020
@lnielsen lnielsen moved this from In progress to Done in Architects Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Invenio Framework Proposal: Accepted Accepted proposal for new RFC
Projects
Architects
  
Done
InvenioRDM April Board
  
In progress
Development

No branches or pull requests

1 participant