polydawn / repeatr

Repeatr: Reproducible, hermetic Computation. Provision containers from Content-Addressable snapshots; run using familiar containers (e.g. runc); store outputs in Content-Addressable form too! JSON API; connect your own pipelines! (Or, use github.com/polydawn/stellar for pipelines!)
https://repeatr.io
Apache License 2.0
68 stars 5 forks source link

Formula hash func #89

Closed warpfork closed 7 years ago

warpfork commented 7 years ago

(Finally!...) Add a Hash() function to def.Formula.

As the docs on the function describe: this function will return a string that may be expected to converge for formulae which describe identical setups. Some elements of the structure that are not relevant to correctly reproducing the contained task (namely, data storage urls) are explicitly not included under the hash.

This has been a long time in coming: enabling this hash, and its semantics, have been a guiding factor in every part of Repeatr's design. This hash [] is effectively a content-addressable description of a computation to be performed, complete with environment. This can be a primary key in a globally distributable database of things that can be computed*; a single string usable as an index over arbitrary transformations of any data into any other data. (Woo.)

[*] or similarly behaving, if slightly different one, after some additional iterations of code

tazjin commented 7 years ago

Why the strange custom encoding implementation vs. a more standard hex output of some hash function?