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

Re: Providing access to nginx state machine

agentzh 1231 May 06, 2010 09:48PM

Re: Providing access to nginx state machine

Marko Kevac 1134 May 11, 2010 07:40AM

Re: Providing access to nginx state machine

Marko Kevac 1110 May 11, 2010 10:44AM

Re: Providing access to nginx state machine

Piotr Sikora 1071 May 11, 2010 12:10PM

Re: Providing access to nginx state machine

Marko Kevac 1021 May 11, 2010 12:48PM

Re: Providing access to nginx state machine

Piotr Sikora 1161 May 11, 2010 04:02PM

Re: Providing access to nginx state machine

Marko Kevac 993 May 11, 2010 04:20PM

Re: Providing access to nginx state machine

Piotr Sikora 1381 May 12, 2010 11:30AM



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

Online Users

Guests: 369
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready