We imagine how wiki client code might maintain its permanent state in IPFS. We suggest an integration with the journal as currently implemented to create Fedwiki on IPFS.
IPFS provides global persistent storage indexed by hashes returned when bytes are saved as immutable blocks.
Wiki provides a mutable view into a collection of pages where each page knows and can recapitulate its history.
# State
We suggest Wiki on IPFS write a complete copy of a page with every edit. The wiki journal will then contain both the Action as observed while editing and the IPFS hash for the page after the Action has been applied.
Note: An Action contains more information than can be reconstructed by comparing two Stories.
We further suggest that Wiki on IPFS write an "export" of a whole site as a collection of page slugs and their most recent IPFS hash. The hash returned from this write can be saved in IPNS as it now represents the complete and current state of the site.
Note: An IPFS "export" amounts to publishing a collection of changes as it makes access to new content available. A user that maintains a private wiki could publish on a schedule that meets their needs.
# Fork
A Wiki on IPFS could fork content from non-IPFS sites and would expect these pages to not have Journal Actions annotated with hashes.
A Wiki on IPFS site could fork content from other IPFS sites by finding them through IPFS mechanisms and copying the pages. A fork Action would include the IPNS source to be consulted for updates.
A non-IPFS wiki would not have access to Wiki on IPFS content unless it was also published on the open internet by the usual means. When the open internet falls into disuse then this case doesn't matter.
A Wiki on IPFS site can exploit the reliable storage of page content for pages that are traveling into and off of the open internet but only those revisions written by Wiki on IPFS sites will have exact copies of pages in IPFS as they were written.
If IPFS were to fall into disuse then page history can still be reconstructed for pages within an individual's possession by replaying the Actions of the Journal.
# Evolution
In this proposal we imagine two systems, the open internet and the IPFS, coexisting without presuming which system will outlive the other. We aspire to use each system as intended so that our content can outlive either system's demise.
See Computational Habitat where we consider the changes in landscape we have experienced and how we are preparing wiki to persist as a symbiont to whatever hosts survive.
See Open Junta for a related opportunity.
# Coding Example
An example of how to use ipfs to store assets exists in the wiki-client repo on github .