OT: 'best' dynamic language
manlio_perillo at libero.it
Tue Apr 22 18:31:09 MSD 2008
Marcin Kasperski ha scritto:
>>> Regarding nginx support: currently I tend to believe that using
>>> nginx as reverse proxy (and static file server) may be the best
>>> runtime configuration....
>> The problem with reverse proxy is that you need another server,
> FastCGI/SCGI/etc are also another server, just less explicit ;-)
Of course :)
>> and this server is usually written in Python, and most of the time
>> it uses threads for concurrency,
> If you are hardcore, you can use twisted. But IMO it is overkill for
By the way I'm a Twisted programmer :).
This how I came to know and low asynchronous programming!
And I have also used Twisted Web (and Nevow) for a rather big web
However I think that Nginx + mod_wsgi + templating system like Mako
produces applications that are more maintainable and modular.
> Also, threads are not that bad in such context. Note that here you have
> non-trivial code, which makes some database operations, dynamically
> formats pages using templates, etc. The cost of some context switches
> is far less noticeable than in case of static file serving.
The problem is not with context switches, but with the Python Global
>> 1) Use Nginx as main server + reverse proxy
>> 2) Run your application embedded in Apache or
>> Nginx (but the application should be written with care)
> I do not see any advantages of apache here (unless you want to
> use existing permissions, authorization etc infrastructure already
> defined for apache).
No, Apache *has* advantages.
You have a very robust server for your application, and it's wsgi module
allows much more control then any of the "custom" servers written in Python.
More information about the nginx