Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

#51: Implement PropertiesStorage for storing user-defined metadata #79

Merged
merged 5 commits into from
Sep 3, 2023

Conversation

kirillt
Copy link
Member

@kirillt kirillt commented Jul 21, 2023

See #51 for the context.

Limitations:

  • PropertiesStorage is tailored for the Properties structure, which currently includes two fields: title and description. This is primarily beneficial for ARK Shelf at the moment. While the Properties class can be expanded by app developers, they would need to create their own version of PropertiesStorage to handle the custom structure. We aim to enhance PropertiesStorage in the future to manage third-party extensions without needing to duplicate the entire code within the app (see Enabling app developers to extend the Properties class #78).

  • Fields of the Properties structure are typed as Set<T> due to potential conflicts from other devices, similar to other user data storages like TagStorage or ScoreStorage. We employ the simplest possible conflict resolution, known as Monoid, by consolidating all versions into a set. It's important to note, we do not guarantee the possibility of removing values from storages if the user has the app open on other devices (as the removed values will simply reappear). To eliminate redundant values and retain only the canonical value for a resource R, the user needs to close all app instances except one and input the canonical value on it. This compromise seems fair as we prioritize data safety. See Tracked storage and CRDT #58 for the future work.

@kirillt kirillt requested a review from mdrlzy July 21, 2023 11:34
Copy link
Member

@mdrlzy mdrlzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

domain should be renamed to data

@kirillt kirillt force-pushed the 51-user-properties branch 4 times, most recently from ddcd384 to a517b1c Compare July 28, 2023 15:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants