@darius @akanter @paynejd @herbert24
I’d like your thoughts on this, I’d shared this on the google doc but never quite got feedback on it
Proposed Design Change
-
This document refers to a ‘dictionary’, the assumption being that sources and collections are abstracted into this single concept(a dictionary). The current approach we are taking to keep the source and collection in sync for custom concepts is whenever items are added to or updated in the source, we update the collection reference so that it points to the latest version. During the past few months this has been a major source of confusion for devs on the project and very bug prone.
-
I am proposing a small rethink of this process.
-
When a user creates a dictionary
Currently | Proposed |
---|---|
* We create a source(source) and collection(dictionary). The source holds custom concepts and the dictionary is kept up to date as described above | * We create a source(source) and two collections(collection and dictionary). One of the collection acts as the ‘dictionary’ and the other remains a collection, holding references to concepts and mappings from other sources e.g CIEL, that are not custom |
* Permissions for these are kept in sync as well(Updating dictionary visibility updates permissions on both the source and collection) | * The source and the collection are private. The permissions set by the user only apply to the dictionary |
* Creating a release creates a new version of the dictionary | * Creating a release deletes all references from the dictionary, then copies all references in the collection into the dictionary and all concepts and mappings from the source into the dictionary |
* Updating concepts and mappings requires an immediate update of the each updated item in the dictionary. | * Updating concept and mappings does not require immediate updates to the dictionary as this will be done at a single point when releasing a new dictionary version |
The goal of this is to
- make it conceptually clear to whoever is working with the application what happens when and makes it clear to the user where there concepts live
- Decouple sources and collections as the API does. This might be important going forward
- makes it considerably easier to work with the API as it works within its design.
None of this requires any significant changes to the API and for v.1.0.0, won’t change anything from the user’s perspective.