Code Overview
Files currently used
bin/ice_server.py ICE Server
bin/malandro_start.py Webserver
bin/test_ice.py Test ICE Server
lib/malandro/__init__.py Webserer Main App
lib/malandro/config.py Config File Loader
lib/malandro/content/article.py Plain Article Object
lib/malandro/db/__init__.py DB Connections
lib/malandro/frontend/http.py Load Web Apps
lib/malandro/producer/__init__.py Not in Use
lib/malandro/publisher/article.py Article Publisher, part of the Ice Interface
lib/middleware/CDN/__init__.py ICE Interface Definitions auto-generated by slice2py
lib/middleware/CDN_ice.py ICE Interface Definitions auto generated by slice2py
local/app/root/__init__.py Web Apps
local/templates/app/ Templates for the Web Apps
Example Trace / Walkthrough
curl http://127.0.0.1:8080/article/3000/00/1
-> CherryPy Dispatcher
-> local/app/root/__init__.py
-> viewArticle->default()
ap = ArticlePublisher(config = self._config, ice = self._ice)
-> lib/malandro/publisher/article.py
-> ArticlePublisher->__init__()
-> ICEArticlePublisher->__init__() # because of the config switch
-> local/app/root/__init__.py
-> viewArticle->default()
article = ap.request(int(id))
-> lib/malandro/publisher/article.py
-> ArticlePublisher->request(id)
-> ICEArticlePublisher->request(id)
-> ICE Network (we are a ice client)
[ network ]
-> bin/ice_server.py
-> ArticleDistI->request(id)
ap = ArticlePublisher(config=config, db=db)
-> lib/malandro/publisher/article.py
-> ArticlePublisher->__init__()
-> SQLArticlePublisher->__init__() # because of the config switch
-> bin/ice_server.py
-> ArticleDistI->request(id)
article = ap.request(id)
-> lib/malandro/publisher/article.py
-> ArticlePublisher->request(id)
-> SQLArticlePublisher->request(id)
-> SQLalchemy query(Article).filter_by(id = id).one()
-> MySQL
-> return Article Object
-> bin/ice_server.py
-> ice_article = CDN.Article()
-> lib/middleware/CDN_ice.py
-> Article->__init__() # create a ice article object
-> bin/ice_server.py # map the values because the SQL Alchemy Objects does not work
# as ICE object. There will be a half automatic solution
-> ice_article.id = article.id
-> ice_article.title = article.title
-> return ice_article # give the ice article object to the ice Network
[ network ]
-> lib/malandro/publisher/article.py
-> ICEArticlePublisher -> return article
-> ArticlePublisher -> return article
-> local/app/root/__init__.py
-> viewArticle->default()
return article.title # print out the article title