Skip to content

Instantly share code, notes, and snippets.

@clemesha
Created May 25, 2009 09:27
Show Gist options
  • Save clemesha/117471 to your computer and use it in GitHub Desktop.
Save clemesha/117471 to your computer and use it in GitHub Desktop.

Knoboo

A new knoboo that:
  • Uses Django
  • Uses twisted.web
  • Is a current Work in Progress, and is still broken/incomplete in several (fixable) places

Dependencies

  • Django
  • Twisted trunk
  • knoboo 'master' branch

How to run knoboo

IMPORTANT: Please follow these instructions exactly

(This is because knoboo currently depends on a certain top-level directory structure, namely the Twisted trunk be called Twisted, to work, this will change after the next release of Twisted.)

0. Make a new directory that both knoboo and Twisted will be downloaded to:

mkdir knobooenv
cd knobooenv

1. Download local dependencies:

svn co svn://svn.twistedmatrix.com/svn/Twisted/trunk Twisted
git clone git://github.com/knoboo/knoboo.git

2. Initialize the database (say 'yes' to creating a superuser):

cd knoboo
python knoboo/manage.py syncdb

3. Start knoboo by running (Note the dependence of the Twisted trunk being one dir up):

../Twisted/bin/twistd -n knoboo

4. Open Firefox to http://APP_HOST:APP_PORT and login with the superuser account that was created from step 2.

Architecture and definitions

Kernel

The Kernel is the process that manages Engines. The Kernel may be run remotely"

Engine

An interpreter process. The process where a Notebook's code is executed in

Development details

Bookshelf

  • Attach data to Notebooks
  • Choose 1, many, all (Select by title - show datemod,collabs,nbid)
  • When Notebook loads, 'data' in trasfered to 'kernel' dir.
  • Always keep a copy of the 'original data' - give ability to remove.
  • Have a variable DATA. When DATA is printed, shows data associated with Notebook.

Kernel

  • The directory 'data' is where each engines runtime environment exists.
  • The file $knoboo/kernel/engine/base.py is where an 'engine' (actual process that a notebook's code is executed in) specific config options (run_path, uid, guid, chroot jail, etc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment