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

How do we want to handle metadata going forward? #6

Open
twe4ked opened this issue Aug 5, 2020 · 1 comment
Open

How do we want to handle metadata going forward? #6

twe4ked opened this issue Aug 5, 2020 · 1 comment

Comments

@twe4ked
Copy link
Contributor

twe4ked commented Aug 5, 2020

We currently have the following types of metadata:

Metadata
  user_id: UUID
  account_id: UUID
  correlation_id: UUID
  causation_id: UUID
  migrated: bool
  metadata_type: "attributed"

UnattributedMetadata | SystemMetadata
  account_id: UUID
  correlation_id: UUID
  causation_id: UUID
  migrated: bool
  metadata_type: "unattributed" | "system"

I see two categories of fields here, some domain specific ones (user_id, account_id, migrated) and event sourcing ones (correlation_id, causation_id). There is also a type field that we use to choose the right metadata class when we load it.

The domain specific fields don't belong in the event framework, so we need some way to configure what class(es) that can be used by the framework.

We also need to think of a way to serialize/deserialize the different types of metadata.

I think I would also like to move correlation_id and causation_id to the Event class and probably store them directly on the events table. That way we would have a clearer separation between the domain/app specific metadata and the more general fields that we may want to set/read from the framework.

@twe4ked
Copy link
Contributor Author

twe4ked commented Aug 27, 2020

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy