Page Storage Abstraction

Considerations for a client-side module abstraction unifying origin, remote, local and ultimately exotic medium like NDN and Tahoe-LAFS. A primary goal is to allow multiple media to cooperate much like federated sites work together.

Survey

We've scanned the wiki-client codebase for logic that could be impacted by changes in how we handle storage. Many of these just make assumptions that might not hold going forward.

Yikes. Almost 30 places. The good news is that they were easy to find, reasonably placed, and modular enough to sustain modification.

fetch

lib/link show page

lib/drop files.

lib/legacy get template

lib/page revision

lib/pageHandler useLocalStorage

lib/pageHandler get searching resolutionContext

system

also favacon.png

lib/plugin getScript

lib/factory get /system/factories.json

lib/neighborhood fetch sitemaps (slowly)

dom

lib/refresh get whenGotten

lib/refresh emitFooter

lib/refresh dragHandler

lib/refresh emitControls (add factory)

lib/refresh emitTwins

lib/itemz item from static pages in html

ghost

lib/refresh create future for dead links

lib/page suggest neighbors

lib/pageHandler create ghost explaining trouble

action

lib/editor update, split

lib/factory drop links.

lib/page become

lib/legacy implicit fork

lib/factory put page (edit)

lib/pageHandler push to origin or local storage

lib/legacy template become

lib/itemz create item in page

future

lib/image urls, asset management

also telehash

conventions

lib/lineup crumbs (path to page)

lib/page asSlug

lib/resolve interpret links in text

Analysis

We consider next steps toward making sound abstractions based on our experience to date and anticipation of advanced features.

Group impact areas into functional sections. For example, those that talk about particular pages vs. those that depend on whole sites.

Compare impact areas to functional areas offered by various storage systems, especially NDN.

Propose subsystems, like pageHandler, that could concentrate interaction with storage abstractions. Do we need a siteHandler?

Develop scenarios that exercise subsystems in demanding situations such as intense collaboration or intermittent connectivity.

Propose protocols for communicating with abstractions. Callbacks, events, pipes, promises, whatever. Goal is to make storage modules easy to write and make correct.

Pilot implementation with http and browser local storage. Show that several new scenarios (like local sync or site relocation) are easy to realize.

Evaluate pilot storage implementations as isolated npm modules. Can they be useful stand-alone?

See Three Layer Storage for more recent thinking.

See Models for SFW for model-view separation.