Overview

Check the Graphs, they show a couple of possible Setups of the CMS and what is used where.

http://cyberpunk.cl/malandro/

Get the Code:

http://codecoop.org/projects/malandro/

Structure Requirements

Some words about the Basic Requirement's for the Structure of the CMS

Distributed

  • Every write and read operation to the database can be done via the Middleware
  • The usage of the Middleware should be optional (Single Server Setup)

Modules

Every Features (Publishing, Search, Tags, User Login, Sessions, Admin) has to be clearly separated as a module and should be optional.

Lightweight

Every Module should work with the smallest possible Memory Footprint and should use the fastest solution for the task.

Multi-Site Setup

One Instance of the CMS should be able to Host many different Sites with the same Codebase. (shared and local code)

Code Overview

Using

  • Programming Language: Python
  • Web Application Framework: CherryPy?
  • Database Access: SQL-Alchemy
  • Templates: Clear-Silver (C based using the Python Wrapper)
  • Middleware: ZeroC ICE (C++ based using the Python Wrapper)

Installation

$ less INSTALL

Directory Structure

What is where?

bin               # basic startup code

conf              # global configuration files

lib               # shared code
 - malandro       # 
  - content       # database model classes
  - db            # db access class
  - frontend      # front-end initialization, url mapping 
  - producer      # static file producer
  - publisher     # content distribution layer
 - middleware     # ice middleware code
 - ....           # more external library's we might need

local             # default template for all possible local customizations for each site
example.com       # example site setup
 - admin          # admin interface 
 - app            # main app with all dynamic interactions
 - conf           # local cofiguration
 - dynamic/htdocs # webroot for the dynamic part of the site 
 - static/htdocs  # webroot for the static part of the site
 - templates      # html templates

Traces

Start of the Application

$ ./bin/malandro_start.py     (path setup, load globa configuration)
 lib/malandro/__init__py      (will load the needed modules depending on the configuration. starts the http server)
 lib/frontend/http.py         (configure the website url mapping, load the root apps and start cherrypy http server)

TODO: How should we do Virtual Hosting with CherryPy?? WSGI and Apache?...

Two Cases

$ curl http://127.0.0.1:8080/ CherryPy?

Middleware

TODO:

  • Write Example Code to Test the Speed of ICE (via 127.0.0.1 and via LAN, Ice with SSL enabled via 127.0.0.1 and via LAN.)
  • Test and Research the Ice Publisher and Subscriber Feature

Attachments