Welcome! Log In Create A New Profile

Advanced

Re: Providing access to nginx state machine

agentzh
May 06, 2010 09:48PM
On Thu, May 6, 2010 at 10:53 PM, Marko Kevac <marko@kevac.org> wrote:
> Hello.
>
> As far as I can see nginx provides access to it's state machine only
> via 'upstream modules'. Am I right?
>

Surely not :)

> I want to speak to another network service from nginx handler without
> blocking it.
>
> Lighttpd web server, for example, provides simple way to do this. You
> can connect(), send() something, for example, give lighttpd descriptor
> and return something like WAITING_FOR_FD. When descriptor becomes
> ready, lighttpd will return to same module and module will be
> available to receive().
>
> Is there similar API in nginx?
>

There's no such simple elegant API in the nginx core. See the
implementation of ngx_http_upstream.c for details :)

Our ngx_drizzle and ngx_postgres are also examples to let third party
libraries (like libdrizzle and libpq) manage the sockets for us in a
content handler. My ngx_echo module is also an example falling into
the same category (more or less).

BTW, upstream modules are just special cases of content handler modules ;)

Cheers,
-agentzh

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

Providing access to nginx state machine

Marko Kevac 3162 May 06, 2010 10:56AM

Re: Providing access to nginx state machine

agentzh 1202 May 06, 2010 09:48PM

Re: Providing access to nginx state machine

Marko Kevac 1097 May 11, 2010 07:40AM

Re: Providing access to nginx state machine

Marko Kevac 1077 May 11, 2010 10:44AM

Re: Providing access to nginx state machine

Piotr Sikora 1045 May 11, 2010 12:10PM

Re: Providing access to nginx state machine

Marko Kevac 990 May 11, 2010 12:48PM

Re: Providing access to nginx state machine

Piotr Sikora 1135 May 11, 2010 04:02PM

Re: Providing access to nginx state machine

Marko Kevac 965 May 11, 2010 04:20PM

Re: Providing access to nginx state machine

Piotr Sikora 1349 May 12, 2010 11:30AM



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

Online Users

Guests: 197
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