Welcome! Log In Create A New Profile

Advanced

Re: Providing access to nginx state machine

Piotr Sikora
May 11, 2010 04:02PM
Hi,

> Connect to network service (not HTTP). Send some request. Acquire
> result. And all this asynchronously.
> The result should not be returned to user, instead I want to do
> something with it.

But is this request associated with the incoming request? That is, do you
want to communicate with your network service for each request and finish it
before response is sent back to the client?

> So, in order not to block nginx, I must use its state machine, right?

There is no state machine per se. You need to add/remove your events to/from
nginx's event model (which is OS-independent abstraction layer on top of
epoll/kqueue/etc).

> As far as I can understand, ngx-drizzle is doing something like this.

Actually, it isn't. It is communicating with 3rd-party library (libdrizzle).
You won't see any network communication in there, only library calls and
events triggered on library's socket.

Like I said previously, you most likely want to use either subrequests or
"independent reqequests".

Best regards,
Piotr Sikora < piotr.sikora@frickle.com >



_______________________________________________
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 3149 May 06, 2010 10:56AM

Re: Providing access to nginx state machine

agentzh 1195 May 06, 2010 09:48PM

Re: Providing access to nginx state machine

Marko Kevac 1090 May 11, 2010 07:40AM

Re: Providing access to nginx state machine

Marko Kevac 1068 May 11, 2010 10:44AM

Re: Providing access to nginx state machine

Piotr Sikora 1037 May 11, 2010 12:10PM

Re: Providing access to nginx state machine

Marko Kevac 984 May 11, 2010 12:48PM

Re: Providing access to nginx state machine

Piotr Sikora 1126 May 11, 2010 04:02PM

Re: Providing access to nginx state machine

Marko Kevac 959 May 11, 2010 04:20PM

Re: Providing access to nginx state machine

Piotr Sikora 1342 May 12, 2010 11:30AM



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

Online Users

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