EVOKE system design

by ian on 28 Apr 08 at 20:01 in documentation

history


1 - assayserver (2001): zserver, XML
2 - deepserver (2005) : twisted/apache, XML
3 - evoke (2007) : twisted/apache, .evo

features

  • evo/ pythonic templating
  • data/ python abstraction from mysql databases


overview

  • evoke/base/: core system, i.e. farm-server, evo, schema, clone-app, themes
    • serve/ twisted interface, request-object, dispatcher, bootup
    • render/ .evo template rendering (also the retro XML templating)
    • evo/ .evo templates (system defaults)
    • data/ mysql database abstraction
    • lib/ deep-types (including text formatting), library routines
    • app/ master app for cloning from
    • Resources/ themes, flat files common to all or multiple apps (CSS, JS, images)
  • evoke/<app>/: one or more application modules

app

evoke/base/app

Applications ( apps) are cloned from the generic app at evoke/base/app.

Any number of apps may be run by the one instance of the server.

Each app is associated with its own database.

Each app will:
  • validate users
  • process requests
  • return suitable responses (generally a rendered template, i.e. HTML)
  • store and manage data
Optionally, an app may have its own serve.py script, so that it can be run stand-alone. evoke/[app]/code/serve.py

serve

evoke/serve/

Allows access to multiple databases (one per app). Dispatches multiple applications, each running on multiple domains. Starts up the system, and talks with Twisted, creates the request objects and handles the requests.

  • dispatch.py multi-domain multi-app request handler
  • app.py loads configuration files, creates and initialises the python data structure, and the MySQL databases, on startup.
  • req.py request object definition and initialisation
  • url.py url data-class mix-in methods - generates URL references to data-objects
  • twist.py twisted interface


evoke/base/serve.py : run time server startup script for multi-app server farm
evoke/[app]/code/serve.py : run time server startup script for standalone single-app

data

evoke/data/

Creates and maintains MySQL database structure automatically, based on simple python-class-format schema configuration.

Presents the database as persistent python objects to the application developers, using

  • schema.py definition class for Data objects - creates and maintains MySQL database automatically on system startup
  • data.py persistent python data object - interface with MySQL
  • DB.py MySQL connections
  • pool.py connection pooling
  • patch.py version auto-patching system used e.g. to patch MySQL data on system upgrades

to reply to this, please login or register