Skip to content
Gordon Woodhull edited this page Feb 25, 2014 · 26 revisions

RCS is a fast storage of common metadata in a RCloud deployment instance. For lack of better name RCS stands for RCloud Storage but suggestions for a better name are welcome. Conceptually, the back-end can be an arbitrary key/value store, RCloud provides out-of-the-box bindings to file-based back-end and Redis back-end.

RCS details

Valid key formats:

<user>/<notebook-id>/<key>...
<user>/system/<key>...
.<domain>/<notebook-id>/<key>...
.<domain>/system/<key>...

Usernames may not start with a dot (.) to not cause ambiguity between domains and usernames. At R level keys should be constructed using usr.key() function or application-specific sub-function such as stash.key()

Currently used keys:

  • <user>/system/config.json user configuration (contains interests, current notebook id etc.)

  • .stash.<stash-name>/<notebook-id>/<version>.gist stashed gist

  • .stash.<stash-name>/<notebook-id>/<tag>.tag tag - payload is the version hash associated with that tag. Typically HEAD tag is used to store the most recent version.

Invalid keys currently used - should be probably deprecated and replaced by 1.0 with conforming keys:

  • notebook/<notebook-id>/public - set to 1, if present the notebook is published
  • notebook/<notebook-id>/starcount - star counter
  • notebook/<notebook-id>/stars/<user> - user starred a notebook

Proposed RCloud 1.0 keys

See #351. As noted above, rename notebook/<notebook-id>/* to .notebook/<notebook-id>/*

Remove <user>/system/config.json and unpack the data. Idea being that changes to notebook lists and configuration can have finer granularity so that two browser windows editing will not clobber each others' state.

  • <user>/system/config/notebooks/<notebook-id> - if present, set to 1 indicating the user hasn't removed the notebook and has the notebook in All Notebooks. (I.e. it was in all_books of config.json before.)
  • metadata in interests and all_books is moved to
    • .notebook/<notebook-id>/username - owner
    • .notebook/<notebook-id>/description - name of notebook
    • .notebook/<notebook-id>/last_commit - last modified timestamp
    • .notebook/<notebook-id>/visibility - public (default) or private, whether other users can see the notebook in All Notebooks
  • interests is now redundant with .notebook/*/stars/<user> and get.my.starred.notebooks: removed.
  • <user>/system/config/current - current open notebook
    • <user>/system/config/current/notebook - notebook id
    • <user>/system/config/current/version - notebook version (commit hash)
  • <user>/system/config/recent/* - recently opened notebooks, <notebook-id> = <timestamp>
  • <user>/system/config/nextwork - next number for "New Notebook"
  • add glorious per-user options to `/system/config/*, e.g.:
    • sidebar state
    • syntax highlighting colors
    • "Show Source" checkbox state
    • autosave