Python Desktop Server

Python Desktop Server is a WebLog authoring and RssAggregator environment. Written in Python, uses Medusa as Desktop Web Server (and MetaKit as its Data Store). Something of a clone of Radio Userland?

  • article by Georg Bauer on the Multi Threaded model he created, because Medusa's single-threaded approach doesn't work well with slow calculations. It has it's problems with computed pages, though. There are solutions: change your computations to a Co Routine or Generator model where only part of the computation is done per invocation and build some pseudo channel that can be used in Medusa. This is quite complicated, especially if you don't have full control about the computations invoked... The problem with long running computations in the core Medusa framework is that they block the server from responding to new requests. So you need a way to push them off to free up the incoming requester again!

Georg Bauer then went on to write Too F Py (Toolserver Framework For Python - a Python Web Framework). The main point in creating this framework was the desire to combine the high performance static content delivery of Medusa with some Multi Threaded engine to integrate dynamic tools. The result is a web server where dynamic tools can be freely mixed with static content. The static content is delivered by Medusa without much hassle - it goes out as fast as it can. The dynamic tools are handled by dynamically assigned worker threads... Other tools are Linda-style thread communication and tools that are dynamically instantiated based on the namespace you use. Just dig through the source - it's fascinating what one can pack into roundabout 5000-and-something lines of code.


Edited:    |       |    Search Twitter for discussion

TwinPages: ThoughtStorms