Hi Yichun Zhang, Thanks for the help! Going by the documentation of the lua-nginx-module on its subrequest handling it looks really promising for my use case. I am currently writing the Sphinx2 upstream module. Would get back with questions in case I have any on using the lua-nginx-module for achieving what I need to do. Regards,Reetesh
> Date: Wed, 27 Nov 2013 12:39:15 -0800 > Subject: Re: Help on designing using multiple location/upstream modules > From: [email protected] > To: [email protected] > > Hello! > > On Tue, Nov 26, 2013 at 4:30 AM, Reetesh Ranjan wrote: > > I have thought of the following design, in terms of nginx modules I would > > use: > > > > 1 My main location module that picks the keywords entered and communicates > > to Redis and Sphinx > > 2 For communicating to Redis I thought of using HttpRedis2Module > > (http://wiki.nginx.org/HttpRedis2Module) > > 3 For communicating with Sphinx, I am trying to write a simple C++ client > > or adapt the Sphinx C++ client > > (http://sourceforge.net/projects/cppsphinxclient/) or its parts into an > > upstream module. > > > > This looks trivial if you use ngx_lua module as the glue. In > particular you can check out the ngx.location.capture and > ngx.location.capture_multi API functions for captured subrequests: > > https://github.com/chaoslawful/lua-nginx-module#ngxlocationcapture > > https://github.com/chaoslawful/lua-nginx-module#ngxlocationcapture_multi > > And probably also the "light thread" API that can work with the > subrequest API above: > > https://github.com/chaoslawful/lua-nginx-module#ngxthreadspawn > > When using the Lua API provided by ngx_lua, everything is nonblocking > out of the box :) > > Regards, > -agentzh > > _______________________________________________ > nginx-devel mailing list > [email protected] > http://mailman.nginx.org/mailman/listinfo/nginx-devel
_______________________________________________ nginx-devel mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-devel
