This is an old revision of the document!
Rhizome
Purpose and features
-
-
Rhizome guarantees that payloads will remain intact wherever they are transported
Rhizome makes no guarantees about delivery time or eventual arrival
Rhizome makes its best effort to transport payloads to wherever they are wanted, subject to the constraints of the network (topology, bandwidth) and its nodes (storage, battery), without favouring any payloads above others of equal kind
Rhizome is neutral with respect to originating and receiving nodes, applications, and payload content
Rhizome uses cryptography to preserve the integrity and privacy of payloads
Rhizome protects anonymous senders by not storing or transmitting information that may allow senders to be traced, even on the originating device
Rhizome functions without centralised infrastructure such as well-known servers or a persistent network connection
Rhizome can be configured to use central servers to improve efficiency and reach
Rhizome applications
Users do not use Rhizome directly, but
indirectly via applications which use Rhizome as their data transport
Current Rhizome applications:
-
-
the
Serval Mesh app for Android uses Rhizome to distribute software upgrades
the file sharing service of the
Serval Mesh app for Android is a simple UI for sharing, browsing and saving/viewing non-MeshMS content in Rhizome
Serval SAM is a crowd survey app for Android that allows the user to fill in an
Open Data Kit form and uses Rhizome to transport completed forms to a central collection server
-
Future applications may include:
voice mail
disaster response situational awareness
medical or environmental sensor data collection
collaborative text editing and whiteboarding
distributed document management
citizen journalism
classroom and remote teaching tools
group chat
Wikipedia caching
Applications inject data into Rhizome by supplying a payload and some meta data
Applications extract data from Rhizome, receiving the payload and all meta data
Rhizome's data model
Every Rhizome payload (“file”) is accompanied by some structured meta data called a manifest:
some meta data is supplied by the originating application to accompany the payload, but is not used by Rhizome, eg, File name, Content MIME type
some meta data is created and used by Rhizome to identify, prioritise, route and expire the payload, eg, Bundle ID, Bundle Version, Payload size, Payload hash (digest)
-
A Rhizome bundle = manifest + payload
Rhizome manifest
The Rhizome manifest is a set of key-value pairs called fields, A manifest is stored and transmitted in either text or binary representation:
Backward and forward compatibility
Both Rhizome manifest representations (text and binary) are designed to allow upgrades.
Forward compatibility arises from an extensible manifest data format that allows unrecognised fields to be skipped:
The text manifest uses a special field delimiter (newline) that cannot appear in any field value
-
Every Rhizome node uses only the manifest fields it recognises and successfully parses, and ignores any it does not (possibly logging a warning)
Every Rhizome node always stores and transmits the manifest intact, without modification, including any unrecognised fields
Backward compatibility is done using a standard replace/deprecate/delete process:
The format and meaning of existing fields is never changed
Software upgrades may introduce a new field that can coexist with the older field(s) it supercedes
For a while, software upgrades create manifests containing the deprecated field and the newer field
Eventually a software release and all following releases cease to insert the deprecated field
This provides a time window during which the
automatic field upgrade has a chance to upgrade all the Rhizome software in the field
Sender and recipient
If a bundle does not indicate the
Serval Identity of its intended recipient, it is for general consumption (broadcast)
If a bundle does not indicate the
Serval Identity of its sender, then it is of unknown origin (anonymous)
Rhizome's data transport
A Rhizome node is any network node (device) that is running the Rhizome software
A Rhizome node exchanges manifests and payloads directly with adjacent nodes on the network
Rhizome bundles are transferred between nodes automatically and autonomously, ie, without user intervention, using any available network connection
A manifest may be stored on many nodes at a time
A payload may be stored on many nodes at a time
A manifest may persist for any length of time on any node
A payload may persist for any length of time on any node
Each Rhizome node advertises its recently acquired bundles to its neighbours
Rhizome store
A Rhizome node contains a Rhizome store
A Rhizome store is a database containing payloads indexed by PH (Payload Hash) and manifests indexed by BID (Bundle ID)
A Rhizome store may reside in volatile (RAM) or non-volatile (Flash, disk) local storage
The original implementation of the Rhizome store used
SQLite for the database
Rhizome Rank
Every Rhizome node maintains its own ordered list of all the manifests in its store, called the Rank
Every Rhizome node attempts to fetch missing payloads from neighbouring nodes, in order of rank
Every Rhizome node recovers local storage space by evicting its lowest ranked payloads
A bundle's position in the rank depends on meta data in the manifest and local node state, which may include:
Network connections
Rhizome nodes may transfer bundles using
network layer connections over established networks, eg,
TCP or
UDP or
HTTP over public Internet or cellular GSM
-
Neutrality
Rhizome interprets meta data uniformly, regardless of the originating or receiving application
Rhizome ranks (prioritises) payloads using uniform rules that do not depend on the originating or receiving application
Rhizome software does not encapsulate any application-specific logic
Rhizome does not record the originating or transited nodes of any payload, so nodes cannot rank (prioritise) payloads based on point of origin, only on available meta data
Rhizome does not rank (prioritise) based on the content of payloads
Bundle integrity
Rhizome does not modify any manifest once it is created
Rhizome does not modify any payload
Rhizome creates a random 256-bit Elliptic Curve private key for every bundle, called the Bundle Secret or BS
The 256-bit public key derived from the Bundle Secret is called the Bundle ID or BID
Rhizome does not reveal the Bundle Secret to any other application or node
Rhizome computes the 512-bit SHA512 hash of the payload, called the Payload Hash or PH (also File Hash or FH)
At injection, Rhizome inserts the Payload Hash into the bundle's manifest
Rhizome signs every complete manifest using the Bundle Secret
Rhizome nodes will only store and transmit manifests with valid signatures
Only an application possessing the original Bundle Secret can alter the manifest or payload
The net result of Rhizome's crytpo system is that:
any party may create a new bundle (with a new Bundle ID)
only the originating party may modify the manifest or payload of an existing bundle (keeping the same Bundle ID)
thus, once a bundle is created, all new payloads with the same Bundle ID are guaranteed to be from the same original sender
Payload security
User intervention
Architecture
Rhizome is currently implemented as part of the Serval DNA daemon.
The name "Rhizome"
Once a file is inserted into Rhizome, it can be notoriously difficult to eradicate. This is analogous to a biological process of vegetative reproduction: a rhizome is an underground plant stem with the ability to send out shoots which develop into new plants. If a rhizome is cut into smaller pieces, each piece can grow into a new organism. Anybody who has battled the incursion of couch grass into their garden knows how obstinate a rhizome can be.
Curiously (but not coincidentally) some of the principles of the rhizomatic philosophy of thought also describe the behaviour of the Rhizome file distribution system.