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

Variable type annotation and SDK-level automatic serialization/deserialization #4

Open
camelop opened this issue May 12, 2022 · 0 comments
Labels
cl-design New design, research ideas, thoughts, or paper plans. cl-usability User interface, storage and task visualizations, protocol marketplace, server telemetry. enhancement New feature or request

Comments

@camelop
Copy link

camelop commented May 12, 2022

Migrated from: https://github.com/camelop/dds-dev/issues/15

Idea

For key-value pairs in the storage engine, allow optional type annotation so that SDK can learn the type of the variables to make smart serialization/deserialization decisions.

Potential implementation

For each key xxx::yyy:zz, add xxx:yyy:zz:__annotation which contains metadata about the original key.

For example, if 0xAA:some_computation:iamafloat64 is a float64 value, SDK can read 0xAA:some_computation:iamaflot64:__annotation which returns float64, then it can automatically and dynamically do deserialization when loading the value. This might be helpful for some languages.

Discussion

As a strengthened version, one can also augment this mechanism to implement schema checking for strict data format.

@camelop camelop added enhancement New feature or request cl-design New design, research ideas, thoughts, or paper plans. cl-usability User interface, storage and task visualizations, protocol marketplace, server telemetry. labels May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cl-design New design, research ideas, thoughts, or paper plans. cl-usability User interface, storage and task visualizations, protocol marketplace, server telemetry. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant