spinframework / spinframework/spin

Key-value data type helpers

Open
#1,399 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement sdk
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.