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

Feature: Allow deletions on aggregate states #455

Open
amalcaraz opened this issue Jul 12, 2023 · 0 comments
Open

Feature: Allow deletions on aggregate states #455

amalcaraz opened this issue Jul 12, 2023 · 0 comments

Comments

@amalcaraz
Copy link
Contributor

Problem:

Using aggregates fits perfectly for having unique key/value sets of entities. We can create and update them, but without supporting deletions the only option that a user has is to set values to null or some arbitrary value that identifies this "deleted" status.

Doing this logical deletion brings to problems:

  • The user need to parse the aggregation and filter this values on client side each time the it is fetched from the API
  • The orphans keys consume unnecessary resources on the CCN

Opinion:

Would be nice to have a way to delete this keys instead marking them as null. But legacy behavior is to keep all keys even if the value is null, and in some cases a use could want to have a null value associated to a key without loosing that key

Proposal:

Either:

  • Implement an improvement on aggregate logic to define an arbitrary value FORGET for example, to delete keys by merging a new message:
{ foo: 1, bar: 2 } + { foo: 'FORGET' } = { bar: 2}
  • Create an additional endpoint for squashing null values on demand from an aggregation without interfering on the current behavior
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