User Tools

Site Tools


content:tech:rhizome

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
content:tech:rhizome [19/03/2013 19:31]
Andrew Bettison add requirements, architecture, better discussion of naming
content:tech:rhizome [01/11/2015 19:08]
Andrew Bettison Update [Technical documentation] section
Line 1: Line 1:
 ====== Rhizome ====== ====== Rhizome ======
  
-**Rhizome** is a file distribution system developed by [[:|The Serval Project]] that enables files to be propagated over different network topologiesRhizome can distribute files via meshdirect connect and client-server connections.+**Rhizome** is a resilient content distribution system developed by [[:|The Serval Project]].  It forms the basis of all non-[[http://en.wikipedia.org/wiki/Connection_oriented|connection-oriented]] services provided by [[:content:servalmesh:|Serval Mesh]], such as [[meshms|text messaging]], file sharing, voice mail, and automatic software upgrades
  
-==== Requirements ====+==== Technical documentation====
  
-  * Rhizome is a system for transporting **units of data** ("files") between nodes in any digital [[http://en.wikipedia.org/wiki/Telecommunications_network|telecommunications network]] +  * [[Rhizome API]] describes the APIs for applications that use Rhizome 
-  * Users do not use Rhizome directly, but **indirectly via [[http://en.wikipedia.org/wiki/Application_software|applications]]** which use Rhizome as their data transport +  * [[Security Framework]] describes the cryptographic features of Rhizome 
-  * Rhizome uses **[[http://en.wikipedia.org/wiki/Store_and_forward|store and forward]]** to move data between network nodes +  * [[:content:activity:naf4]] describes the original development of the Rhizome HTTP REST API (bewaresome details will be out of date)
-  * Rhizome is **application agnostic**: it performs no special interpretation or transformation of any unit of data that depends on the application which produced or receives the data +
-  * Rhizome nodes may communicate using **[[http://en.wikipedia.org/wiki/Network_layer|network layer]]** connections over established networks, eg, [[:content:technologies:mdp|MDP]] over [[:content:technologies:servalmesh|Serval Mesh]], [[http://en.wikipedia.org/wiki/Transmission_Control_Protocol|TCP]] or [[http://en.wikipedia.org/wiki/User_Datagram_Protocol|UDP]] or [[http://en.wikipedia.org/wiki/Http|HTTP]] over public Internet or cellular GSM +
-  * Rhizome may be developed to allow adjacent nodes may communicate over **[[http://en.wikipedia.org/wiki/Data_link_layer|data link layer]]** connections, eg, Wi-Fi devices within range, local Ethernet LAN hosts +
-  +
-==== Architecture ====+
  
-The basic unit of data exchange in Rhizome is the **"bundle"**.  A bundle consists of a "manifest" optionally accompanied by a "payload" (sometimes called a "file"): +==== Purpose and features ====
-  * A Rhizome **manifest** is a small set of meta-data that Rhizome uses to describe the payload +
-  * A Rhizome **payload** is a single, contiguous sequence of bytes which Rhizome transports intact but does not interpret or use+
  
-The Rhizome software enforces set of basic conditions on every manifest it receives from whatever source, for example that certain fields must always be present and have certain size or formbut does not enforce any conditions specific to applications that use Rhizome This complies with the //application agnostic// requirement.+  * Rhizome is **[[http://en.wikipedia.org/wiki/Store_and_forward|store and forward]]** service for transporting units of data called **payloads** ("files") between **applications** running on nodes in a digital [[http://en.wikipedia.org/wiki/Telecommunications_network|telecommunications network]] 
 +  * Rhizome is designed for [[http://en.wikipedia.org/wiki/Wireless_mesh_network|wireless mesh networks]] such as [[MDP]] in the [[:content:servalmesh:|Serval Mesh]], but can also be used within fixed network infrastructure 
 +  * 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 wantedsubject 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 ====
  
-Bundles are copied between Rhizome **"nodes"**.  A Rhizome node is any node (device) in the network that is running the Rhizome software.+  * Users do not use Rhizome directly, but //indirectly via [[http://en.wikipedia.org/wiki/Application_software|applications]]// which use Rhizome as their data transport 
 +  Current Rhizome applications: 
 +    [[MeshMS]], the simple text messaging service of the [[:content:servalmesh:|Serval Mesh]] app for Android 
 +    [[:content:servalmaps:|Serval Maps]], an Android app produced by the [[:|Serval Project]], uses Rhizome to share geo-tagged data like photos and documents 
 +    the [[:content:servalmesh:|Serval Mesh]] app for Android uses Rhizome to distribute software upgrades 
 +    * the file sharing service of the [[:content:servalmesh:|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 [[http://opendatakit.org/|Open Data Kit]] form and uses Rhizome to transport completed forms to a central collection server 
 +    * [[Sensor Logger]], an Android app produced by [[:content:about]], uses Rhizome to send continuous accelerometer logs to the [[:content:seniordevs:servalhq|Serval HQ]] 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 manifest ===+==== Rhizome's data model ====
  
-The Rhizome manifest is a set of key-value pairs called **"fields"**.+Every file distributed by Rhizome ("payload") is accompanied by some structured meta-data called a **[[Rhizome manifest|manifest]]**. 
 + 
 +A payload plus a [[Rhizome manifest|manifest]] together form a **[[Rhizome bundle]]**. 
 + 
 +==== 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 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 [[http://www.sqlite.org/|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: 
 +    * own Serval Identities 
 +    * Serval Identities of recently reachable nodes 
 +    * current time 
 +    * current or recent geographic location 
 + 
 +== Network connections == 
 + 
 +  * Rhizome nodes may transfer bundles using **[[http://en.wikipedia.org/wiki/Network_layer|network layer]]** connections over established networks, eg, [[http://en.wikipedia.org/wiki/Transmission_Control_Protocol|TCP]] or [[http://en.wikipedia.org/wiki/User_Datagram_Protocol|UDP]] or [[http://en.wikipedia.org/wiki/Http|HTTP]] over public Internet or cellular GSM 
 +  * Adjacent Rhizome nodes may transfer bundles over **[[http://en.wikipedia.org/wiki/Data_link_layer|data link layer]]** connections, eg, [[MDP]] to [[:content:servalmesh:|Serval Mesh]] devices within Fi-Fi range 
 + 
 +==== 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 
 + 
 + 
 +==== User intervention ==== 
 + 
 +  * Users may improve the local capacity of Rhizome by operating nodes with high storage capacity 
 +  * Users may improve the reach of Rhizome by periodically moving a node between distant locations 
 + 
 +==== Architecture ====
  
-The Rhizome manifest is designed for forward and backward compatibility between different versions of the Rhizome software: +Rhizome is currently implemented as part of the [[:content:servaldna:|Serval DNA]] daemon.
-  * Every Rhizome node uses the manifest fields it recognises and silently ignores those it does not +
-  * Every Rhizome node preserves all manifest fields intact when it stores the manifest and when it transmits the manifest to other nodes+
  
-==== The name "rhizome" ====+==== The name "Rhizome" ====
  
-Once a file is inserted into Rhizome, it can be notoriously difficult to eradicate.  This suggested an analogy to a biological process of vegetative reproduction: a [[http://en.wikipedia.org/wiki/Rhizome|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.+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 [[http://en.wikipedia.org/wiki/Rhizome|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 [[http://en.wikipedia.org/wiki/Elymus_repens|couch grass]] into their garden knows how obstinate a rhizome can be.
  
-Curiously, but not by coincidence, the principles of the [[http://en.wikipedia.org/wiki/Rhizome_(philosophy)|rhizomatic]] philosophy of thought also resemble the high-level requirements of the Rhizome file distribution system.+==== Prototypes ====
  
 +The [[Rhizome Retriever]] was the first prototype of the manifest-payload distribution system.
  
content/tech/rhizome.txt · Last modified: 21/02/2016 22:52 by Andrew Bettison