"Hacking" the event model of Nginx
Manlio Perillo
manlio_perillo at libero.it
Sun Apr 13 13:07:50 MSD 2008
François Battail ha scritto:
> Manlio Perillo <manlio_perillo at ...> writes:
>
>> If you need "speed", try my WSGI module.
>> http://hg.mperillo.ath.cx/nginx/mod_wsgi/
>
> First, thanks a lot for your reply. Well, I believe Python is a great language
> but I will keep C (I was considering using assembly language!) because I will be
> able to have *zero copy* between my database buffers and my xml to xhtml
> translation, I already know where the bottleneck is and that's why I made this
> choice.
>
Ok.
>> Give at look at:
>> http://hg.mperillo.ath.cx/nginx/mod_wsgi/file/tip/src/ngx_wsgi.c
>> row 850.
>
> Well, I'm not too sure it's relevant to my case but I will investigate in depth;
> thanks to share your knowledge.
>
What type of connection do you want to create?
>> Is my_http_worker in a separate thread?
>> Then this will not work, Nginx is not thread safe.
>
> Yes there are separate threads launched for each Nginx worker process, it's not
> an issue as a request is linked to a worker process, just a matter of mutex;
> nothing to scare me!
The problem is with:
ngx_post_event
as far as I know it is not thread safe, unless you enable threads
support in Nginx (but in current version it is broken).
> The mix using non preemptive model and worker thread is
> very interesting but not so easy to do.
>
What are you trying to do?
> Thanks for your kind reply,
>
> Best regards
>
Regards Manlio Perillo
More information about the nginx
mailing list