RFC: Feasibility of a "dynamic module loader" built in to nginx?

Eugaia ngx.eugaia at gmail.com
Mon Aug 30 04:31:43 MSD 2010


  Hi,

What might work just as well, and wouldn't suffer the API / performance 
issues would be making it easier to compile optional modules into the 
source without recompiling the whole Nginx source code.

When I'm doing module development, I just build the object code of the 
module I'm writing, and combined it with the pre-compiled object files 
of all the other parts of Nginx, thereby typically taking less than a 
second to compile (I'm assuming most developers do this too).

It would be nice to be able to have an alternative build script that 
makes it easier to do this in a customizable way, allowing the reuse of 
existing object code if it's available, compiling it if it's not and 
forcing re-compiling if so desired.

It could be set up to accept the normal configuration options, then 
automatically work out which object files needed to be re-generated and 
which ones could use the pre-compiled versions, and could be extended to 
include options and 3rd party modules too.

It wouldn't be particularly difficult to do this, but I'm really busy 
with other stuff at the moment. If someone wants to write such a script, 
I'll add it to the ngx_devel_kit 
(http://github.com/simpl-it/ngx_devel_kit).  Otherwise I'll write it at 
some point later on, but I can't give any timelines as of yet.

Cheers,

Marcus.

On 29/08/2010 23:17, Piotr Sikora wrote:
> Hi,
> I was thinking about this about two weeks, but (as Maxim already 
> pointed out) currently there is no ABI, which means that you would 
> need to build modules against your target nginx version on your target 
> operating system.
>
> This renders this idea viable only for 3 use cases that I can think of 
> right now:
> 1) operating system's pre-compiled binary packages,
> 2) corporate environments / clusters with staging server(s),
> 3) closed-source modules.
>
> Having this probably wouldn't hurt, but it won't be useful for as many 
> people as you would hope to.
>
> Best regards,
> Piotr Sikora < piotr.sikora at frickle.com >
>
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx




More information about the nginx mailing list