Home Download Docs Code Community

Permanodes

Permanodes are how Perkeep models mutable data on top of an immutable, content-addressable datastore. The data is modeled using nodes with two camliTypes: permanode and claim.

Permanode

A permanode is an anchor from which you build mutable objects. To serve as a reliable (consistently nameable) object, it must have no mutable state itself. In fact, a permanode is really just a signed random number.

{"camliVersion": 1,
 "camliType": "permanode",

 // Required.  Any random string, to force the digest of this
 // node to be unique.  Note that the date in the ASCII-armored
 // GPG JSON signature will already help it be unique, so this
 // doesn't need to be a great random.
 "random": "615e05c68c8411df81a2001b639d041f"

<REQUIRED-JSON-SIGNATURE>}

Claim

A claim is any signed JSON schema blob. One common use is modifying “attributes” on a permanode. The state of a permanode is the result of combining all attribute-modifying claims which reference it, in order. Claim nodes look something like this:

{"camliVersion": 1,
 "camliType": "claim",
 "camliSigner": "....",
 "claimDate": "2010-07-10T17:20:03.9212Z", // redundant with data in ascii armored "camliSig",
                                           // but required. more legible. takes precedence over
                                           // any date inferred from camliSig
 "permaNode": "sha1-xxxxxxx",        // what is being modified
 "claimType": "set-attribute",
 "attribute": "camliContent",
 "value": "sha1-yyyyyyy",
 "camliSig": .........}

All claims must be signed.

The anagrammatical property claimType defines what the claim does, and is one of the following:

Attributes

A permanode can have any attribute you like, but here are the ones that currently mean something to Perkeep:

Website layout inspired by memcached.
Content by the authors.