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

Set media types at the topic level #154

Open
christopherobin opened this issue Sep 7, 2017 · 3 comments
Open

Set media types at the topic level #154

christopherobin opened this issue Sep 7, 2017 · 3 comments

Comments

@christopherobin
Copy link
Contributor

This is something that has been discussed in the past internally, currently we store media types per value in the store themselves and this works fine for most cases.

But for some vaults this has been causing us some grief as how to store that metadata, the main source of issues right now being couchbase where we are using item flags to store the media type, but those item flags get reset when editing the value through the couchbase administration UI, breaking documents.

The best solution would be to move media type configuration to the topic declaration file since I cannot think of any sane reason to have different media types in the same topic.

Pros:

  • Reduced data size since we can drop type columns
  • More consistent data since every document goes through the same encoding/decoding pipeline
  • No more corrupted documents due to external tools interacting with it

Cons:

  • Cannot change media type on a topic later during development without a migration script
@stelcheck
Copy link
Member

@ronkorving does this make sense to you?

@stelcheck
Copy link
Member

Found a thread in the old private repository where @ronkorving was requesting just that, so I guess this would be desirable. @christopherobin feel free to make a PR for that.

@ronkorving
Copy link
Member

@stelcheck Indeed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants