spinframework / spinframework/spin
Key-value data type helpers
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
When working with the key-value store, values are surfaced as blobs (e.g. Rust Vec<u8>, Go []byte). This provides full flexibility for applications to store any kind of data they want. But it also means that applications wanting to store and retrieve numeric or string data, which is likely to be a common case, must manage conversions themselves.
It would be nice to provide conversion helpers in the SDKs or in modules layered on top of the SDKs, though this would require conventions on storage formats such as "strings are stored as UTF-8, integers are stored as { base-10 strings | network endian | binary coded decimal with EBCDIC encoding | ... }, floats are stored as..." etc.
(A refinement could be to also provide "defaulting" helpers, which would handle the NoSuchKey error case and convert it to None/nil or a user-specified default value.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the SDK key-value APIs and how values are currently exposed as blobs. Before implementation, establish storage conventions for strings, integers, and floats, then define which conversion and optional defaulting helpers are in scope; done means the conventions and helper behavior are documented and consistently supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100