Welcome! Log In Create A New Profile

Advanced

Re: [ANN] ngx_lua v0.1.5: ability to capture multiple parallelsubrequests

All files from this thread

File Name File Size   Posted by Date  
graph_image.png 49.7 KB open | download Roman Vasilyev 02/11/2011 Read message
Akins, Brian
February 10, 2011 01:16PM
agentzh,

I was wondering if you had considered having a capture mode that used a
callback rather than coroutines? In really high traffic servers, the
coroutines seem to eat a good bit of memory.

An example use could be:

Define a callback

function mycallback(res)
do_stuff_with_res
end

Then later..

ngx.location.capture("/some_other_location", mycallback)


You could also pass closures as well:

x = something_I_care_about
callback = function (res) return someothercallback(res, x) end
ngx.location.capture("/some_other_location", callback)


My Lua is a little rusty, but you get the idea.

--
Brian Akins


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

Re: [ANN] ngx_lua v0.1.5: ability to capture multiple parallelsubrequests

Akins, Brian February 10, 2011 01:16PM

Re: [ANN] ngx_lua v0.1.5: ability to capture multiple parallelsubrequests

agentzh February 10, 2011 10:58PM

Re: [ANN] ngx_lua v0.1.5: ability to capture multiple parallelsubrequests

Justin Cormack February 11, 2011 04:14AM

Re: [ANN] ngx_lua v0.1.5: ability to capture multiple parallelsubrequests

agentzh February 11, 2011 06:02AM

Re: [ANN] ngx_lua v0.1.5: ability to capture multiple parallelsubrequests

Roman Vasilyev February 11, 2011 03:42PM

Re: [ANN] ngx_lua v0.1.5: ability to capture multiple parallelsubrequests Attachments

Roman Vasilyev February 11, 2011 06:12PM

Re: [ANN] ngx_lua v0.1.5: ability to capture multiple parallelsubrequests

agentzh February 11, 2011 10:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 74
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready