wiki:DeveloperGuidelines/Architecture

Version 21 (modified by Fran Boon, 7 years ago) ( diff )

--

Architecture

Sahana Eden uses the MVC (Model-View-Controller) design with a WebServices architecture

Conceptual View

Sahana Eden is a highly flexible tool which is used in many different scenarios, so there is no single conceptual view. This varies heavily between deployments.

Module View

Sahana Eden is designed to be deployed flexibly from lightweight laptop installs to highly-available cloud deployments, so it supports a range of stacks.

Web Server Apache Other web servers can also be used, such as Cherokee.
Application Sahana Eden
Web Application Framework Web2Py
Programming Language Python & Java Script
Database MySQL, PostgreSQL, or SQLite MySQL, PostgreSQL, and SQLite are supported. Other databases should be usable without major additional work since Web2Py supplies many connectors.
Operating System Linux (Debian recommended) Windows and Mac OS X are possible, but only recommended for developer & single-user environments.

Execution View

Being a lightweight system, most Sahana deployments are simple Client-Server:

  • A single (usually Virtual) Server contains the 3 tiers of Web, Application & Database

If there is a need to scale beyond this, then the 3 tiers can be separated onto different servers, each of which can be duplicated for performance & redundancy:

Code View

Sahana Eden uses the MVC (Model-View-Controller) design

Folder layout is shown here:

Note: Models are actually stored in modules/s3db to allow conditional loading.

Builds

Since Python is an interpreted language, there isn't a need to do builds when editing Python code on a developer machine. There is a 'compile' script for server-based deployments and CSS/JS are minified using their build script:

Compile & Builds are quick (<1 min & <5 mins)

Release Process

Testing

Testing is done using UnitTest, Twill, Selenium and Travis CI:

Data Model

ER Diagrams

We don't maintain ER diagrams for the whole system as it would be too large to be meaningful. Instead we recommend building your own for the relevant modules for your deployment using one of these tools:

  • MySQL Workbench
  • dbwrench (for PostgreSQL)

Key/Value Tables

In order to allow extensibility of the core schema, many resources have key/value 'tag' tables associated with them.

This allows supporting many different coding schemes at the same time and could allow interop with triple-store databases via RDF.


DeveloperGuidelines

S3 API Guide

Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.