[uWSGI] status update for 0.9.6

Roberto De Ioris roberto at unbit.it
Tue Jul 20 16:36:00 CEST 2010

Hi all, the 0.9.6 development is going on fast, and amazing new features has been added.

This is the current status, i think we will be able to release a first RC during the first week of August.

- Embedded HTTP server

This is one of the most requested feature.

Simply run uwsgi passing the --http option followed by the address to bind on:

./uwsgi --http :3333 -w simple_app

Now on port 3333 you will have a multithreaded webserver that forward request to uWSGI workers.
If you do not specify the -s/--socket option uWSGI will bind the workers to a random UNIX socket

This feature will speed-up testing and development of the uWSGI project, but even of your WSGI apps 
development as you can use only uWSGI to run apps on your local machine.

The http server is on early stage of development, and is not secure as it does not check for overflow, but we will address this 
in the next days. (and in the mean time you can use it for development, as i do not think you want to buffer overflow yourself ;) )

*** Warning ***

the embedded http server is only meant for development and testing, do not use it in production environment.
HTTP is slow , the uwsgi protocol is fast :)

- Routing 

The uWSGI routing is a new feature for users that do not need a full framework for their apps but still need
a routing system to (fast) map url to python callable.

For now only routing via xmlconf is supported.

The syntax is simple:

<route method="GET|POST" pattern="^/ciccia/(\d+)/(\w+)$">view1</route>

this will call the view1() callable on matched pattern and method.

There are a lot of options, expect official docs soon

The routing system requires the libpcre

- Embedded plugin support


- VirtualHosting mode:


- New commodity options

uWSGI 0.9.6 will add tons of new options to make administrators happy

--logdate (will add timestamp to every logline)
--chdir X (chdir to X at startup)
--env K=V (set environment variable)
--mode (set deploy mode, see below)

- Advanced (and funny) XML configurations

The uWSGI configuration do not need to be the only one in the xml file.

You could have an app-specific xml config file in which you can include the uwsgi configuration:






You can even put multiple uwsgi configuration in the same file using the "id" feature



    <uwsgi id="one.unbit.it">

   <uwsgi id="two.unbit.it">

    <uwsgi id="three.unbit.it">

    <uwsgi id="test">


Now simply run uwsgi specifying the id:

./uwsgi -x megaconf.xml:one.unbit.it
./uwsgi -x megaconf.xml:two.unbit.it
./uwsgi -x megaconf.xml:three.unbit.it
./uwsgi -x megaconf.xml:test

Another useful feature is the "mode" option. You can define xml parameters
based on the "mode"


    <processes mode="development">1</processes>
    <processes mode="production">8</processes>
    <master mode="production" />
    <memory-report mode="development" />

./uwsgi -x hello.xml --mode production

will load only the option marked as "production" and those without mode

./uwsgi -x hello.xml --mode development

will load only the option marked as "development" and those without mode

./uwsgi -x hello.xml

will load all the options

- Stylish module loading

You can load module/callable using "gunicorn" style:

./uwsgi -s :3031 --env TRAC_ENV=/tmp/mytrac -w trac.web.main:dispatch_request

will run trac on port 3031 without defining config files :)

(look at the --env option)

--- Stll-in-dev features ---

the evdis framework
better app loaders
performance counters
remove unix socket file on exit
safely discard http body
better integration with supervisord (for users that do not want to use the uWSGI master process)
AIX official support
run-by-root improvements

Roberto De Ioris
JID: roberto at jabber.unbit.it

More information about the uWSGI mailing list