On Sun, Apr 15, 2012 at 1:01 PM, Markus Walther <dr.marikos@gmail.com> wrote:
> I have reason to study openresty (a nice package - thanks so much for
> providing this to the community!) again.
>
Glad you like it :)
> Sofar, I did not see any module to talk to couchdb efficiently.
>
AFAIK, CouchDB uses the REST-style HTTP protocol. So you can use a
non-blocking HTTP client in ngx_lua to talk to CouchDB efficiently.
One option is to use ngx_proxy + ngx.location.capture, another is to
use a Lua library based on the ngx_lua cosocket API.
Here's some examples:
http://groups.google.com/group/openresty/browse_thread/thread/55a3461e633bbf10/92ca3f8c7ca29c79
> I'm inclined to give this a shot using your lua module - but do you
> have any quick suggestions on how to best approach this?
>
You can take a look at
https://github.com/liseen/lua-resty-http
It's a good start.
or other lua-resty-* libraries like lua-resty-redis,
lua-resty-memcached, and lua-resty-mysql :)
> Thanks a lot in advance, Markus
>
> PS: We had some email conversation in the past, which where very
> helpful. This encourages me to come back this time.
Thanks for your trust :)
Best regards,
-agentzh
P.S. I've cc'd the openresty mailing list so the whole team can see
our discussion here: http://groups.google.com/group/openresty