hitsave-io / xyz

Monorepo for HitSave
1 stars 0 forks source link

api: how should the args dictionary be stored on server? #43

Closed EdAyers closed 1 year ago

EdAyers commented 1 year ago

Answer: store it as a string-keyed dictionary, each item of the dictionary is a content hash.

interface Eval  {
  ...rest
  args : {
    "foo" : contenthash
    "bar": contenthash
  }
}

I think in the future it might be useful to replace contenthash with a type something like

type Content =
  | { kind : "inline", value: bytes }
  | { kind : "blob", digest: str } 

And this is done in messagepack or our own encoding.

EdAyers commented 1 year ago

Starting with #78 , there is lots of extra info that we would like to store with the args:

EdAyers commented 1 year ago

This is completed, follow up changes are in #79