Data Model

  1. Parameters
    1. Concepts
      1. Further Reading

        Status: Final

        alj: TODO: introductory textHere is an example Path macro usage: blogidea1. And an example image:A (one-dimensional) list containing the two paths "blog/idea/1" and "blog/idea/2", with a stylised file next to each path. Idea 1 shows a lightbulb, idea 2 shows a deeply smug expression.

        Parameters

        alj: TODO: introductory text

        We give precise semantics to these parameters in the spec proper, the list need not fully make sense on the first read-through.An instantiation of Willow must define concrete choices of the following parameters:

        Concepts

        Willow can store arbitrary bytestrings of at most bytes. We call such a bytestring a Payload.

        A Path is a sequence of at most max_component_count many bytestrings, each of at most max_component_length bytes, and whose total number of bytes is at most max_path_length. The bytestrings that make up a Path are called its Components.

        A Timestamp is a U64, that is, a natural number between zero (inclusive) and (exclusive). Timestamps are to be interpreted as a time in microseconds since the Unix epoch.

        The metadata associated with each Payload is called an Entry:

        The metadata for identifying a Payload.
        struct Entry {
         
        The identifier of the namespace to which the Entry belongs.
         
        The identifier of the subspace to which the Entry belongs.
         
        The Path to which the Entry was written.
         
        The claimed creation time of the Entry.alj: TODO fix renderingWall-clock timestamps may come as a surprise. We are cognisant of their limitations, and use them anyway. To learn why, please see invalid-reference
         
        The length of the Payload in bytes.
         
        The result of applying hash_payload to the Payload.
        }

        A PossiblyAuthorisedEntry is a pair of an Entry and an AuthorisationToken. An AuthorisedEntry is a PossiblyAuthorisedEntry for which is_authorised_write returns true.alj: TODO better inline code tag styling

        a is a prefix of a and of ab, but not of ab.A Path s is a prefix of a Path t if the first Components of t are exactly the Components of s.

        We can now formally define which Entries overwrite each other and which can coexist.

        An Entry e1 is newer than another Entry e2 if

        A store is a set of AuthorisedEntries such that

        When two peers connect and wish to update each other, they compute the joins of all their store with equal NamespaceIds. Doing so efficiently and in a privacy-preserving way can be quite challenging, we recommend our invalid-reference protocol.Formally, adding a new Entry to a store consists of computing the join of the original store and a singleton store containing only the new Entry.The join of two store that store Entries of the same namespace_id is the store obtained as follows:

        A namespace is the join over all11 store in existence of a given NamespaceId. This concept only makes sense as an abstract notion, since no participant in a distributed system can ever be certain that it has (up-to-date) information about all existing store. A subspace is teh set of all Entries of a given SubspaceId in a given namespace. This again is more of a conceptual notion than a computer-friendly one.

        Further Reading

        alj: TODO

        A Willow emblem: a stylised drawing of a Willow’s branch tipping into a water surface, next to a hand-lettered display of the word "Willow".