Welcome! Log In Create A New Profile

Advanced

advice on module design

Manlio Perillo
March 26, 2010 05:08PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

As I wrote in a previous message, in an effort to improve the WSGI
module, I have moved Python support to a separate module:
http://hg.mperillo.ath.cx/nginx/ngx_python_module

When the module is included in Nginx, the Python interpreter will be
initialized unconditionally.

The new `ngx_http_wsgi module` now use the "module init" callback
function, to do its own Python specific initialization (in old version
this was done in the HTTP post configuration callback), since this is
the only place where we know the `ngx_python_module` has been fully
initialized.


A different solution is to define a custom "python" directive in the
`ngx_python_module`, and initialize the Python interpreter here only if
directive is specified in configuration file.

The disadvantage is that:

* I can no more use multiple directives for Python configuration
(not a big deal)
* The `ngx_http_wsgi_module must` can no more assume the Python
interpreter is initialized (again, not a big deal)


What is the best solution?


Thanks Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkutIfoACgkQscQJ24LbaUQCoACeOFTPzpKSRQFZG+gwLyhXCWus
It8AoJdZeYEY2s89FWvhKt8gl2+lbCo1
=PYew
-----END PGP SIGNATURE-----

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

advice on module design

Manlio Perillo 2284 March 26, 2010 05:08PM

Re: advice on module design

Peter Leonov 901 March 27, 2010 07:42AM

Re: advice on module design

Manlio Perillo 913 March 27, 2010 03:00PM

Re: advice on module design

Peter Leonov 1259 March 28, 2010 07:14AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 291
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready