Skip to content

more flexible body handling#17

Draft
msutkowski wants to merge 1 commit into
v0idpwn:masterfrom
msutkowski:ms/encoding
Draft

more flexible body handling#17
msutkowski wants to merge 1 commit into
v0idpwn:masterfrom
msutkowski:ms/encoding

Conversation

@msutkowski

@msutkowski msutkowski commented Jan 21, 2024

Copy link
Copy Markdown
Contributor

@v0idpwn Just wanted to get this up for a discussion. We have changes very similar to this to support our desired usage on a fork, but I wanted to see how you would recommend we could support more serializer types before I go in a specific direction. As an example, we should able to handle json, avro, protobuf, etc, and we can't really do that while casting body as a string. And ideally we'd update docs to show "if you want human readable entries in the database, do X, if not, do nothing"

Any guidance on the preferred implementation would be 💯, thanks!

@v0idpwn

v0idpwn commented Jan 22, 2024

Copy link
Copy Markdown
Owner

Hi, thanks for the PR!

Are all of those those :brod.value()? If not, then I assume you're using a different adapter? Could you share a bit more about how these values look like?

@msutkowski

Copy link
Copy Markdown
Contributor Author

Hi, thanks for the PR!

Are all of those those :brod.value()? If not, then I assume you're using a different adapter? Could you share a bit more about how these values look like?

Yea, they'd just be passed straight through as iodata()

@v0idpwn

v0idpwn commented Jan 24, 2024

Copy link
Copy Markdown
Owner

Perhaps we can then be a bit more strict? I'm thinking of saving it in the database as binary after IO.iodata_to_binary/1. Should be cheaper than doing binary_to_term and back, and feels a bit better. Still, if you think we should support more data-types, I'd be open :)

@v0idpwn

v0idpwn commented Apr 17, 2024

Copy link
Copy Markdown
Owner

Ping @msutkowski :)

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

Successfully merging this pull request may close these issues.

2 participants