Il giorno 27/ott/2010, alle ore 12.36, Damjan ha scritto:

> I was reading the documentation of uwsgi to use it with Lua and Ruby, 
> and I wonder why you need to set different modifiers on the web server side?

Performance mainly, and to allow other use (the uWSGI server read the first 
byte and call the corresponding handler,
that can choose even to close the request).

Choosing the right plugin, based on HTTP_HOST, SERVER_NAME and whatever you 
want is expensive.
The ROUTING infrastructure is for this. If you enable it (when it will be full 
ready) it bypass the modifier
system and use regular expressions (pcre based) to pass the data to a specific 
plugin (or to manipulate request).

To reach the maximum performance modifier is the right choice (about 10 
assembly instructions, instead of the thousand
needed for string parsing).

Fastfunc implementation (even if it is broken in the 0.9.7-dev code) is a good 
example.
You do not need special parsing.
You read the first and fourth byte of the request. The fourth byte is a pointer 
to a list of functions to call.
You have a ultra fast (raw ans simple) routing system

Obviously you can remap modifier (the idea is using a formula like --plugins 
name:N) , for example you can load the rack plugin as 0 and you do not need to 
set the modifier1
in the webserver.

--
Roberto De Ioris
http://unbit.it

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to