Separate command and query responsibilities
- Langage dominant
- Scala
- Étoiles
- 33
- Forks
- 16
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
We can use CQRS to separate our data model into two query (read) and command (write) models. The command models will remain as they are (only referencing dependencies by name and version), while the read models will be fully formed with their dependencies embedded.
Implementing this requires an extra step at write-time, i.e. querying the database for all dependencies and translating the command model into the query model before persisting it.
Since our data model is essentially immutable, we gain nothing from treating it as relational at read-time (e.g., consistency for updates). This extra bit of write-time complexity will allow us to make full use of MongoDB's document storage at read-time.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
The issue names no files, tests, or entry points. Start by locating the current data model and MongoDB persistence path, then document how dependencies are represented and translated at write time; done would require an agreed command/read-model design and its implementation.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- mongodb, scala
- Domaine
- backend, databases
- Type d'issue
- Refactorisation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 20/100