lua parser and redis2 questions

Marcos Ortiz mlortiz at uci.cu
Sat Jun 4 19:47:16 MSD 2011


On 06/04/2011 11:12 AM, Marcos Ortiz wrote:
> On 06/04/2011 08:19 AM, logar.damir wrote:
>> I'm new to redis/nginx combinations, however I think you should also add
>> following modules:
>> -https://github.com/agentzh/lua-redis-parser
>> -https://github.com/chaoslawful/lua-nginx-module.
>>
>> Then you can use
>>
>> content_by_lua '
>> local replies = ngx.location.capture("/redis2")
>> local parser = require('redis.parser')
>> -- assuming the replies variable holds n redis responses
>> --  to be parsed:
>>      local results = parser.parse_replies(replies, n)
>>      for i, result in ipairs(results) do
>>          local res = result[1]
>>          local typ = result[2]
>>          -- res and typ have exactly the same meaning as in
>>          --  the parse_reply method documented above
>>      end
>> '
>>
>> Posted at Nginx Forum:http://forum.nginx.org/read.php?2,203154,203862#msg-203862
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx at nginx.org
>> http://nginx.org/mailman/listinfo/nginx
> Here on the blog of Mike Ferrier, you can find a excellent user-case 
> for the combination of Redis, Lua, Nginx and Rails
> http://mikeferrier.ca/2011/05/14/my-beautiful-dark-twisted-reverse-proxy-lru-cache/
>
> -- 
> Marcos Luis Ortiz Valmaseda
>   Software Engineer (Distributed Systems)
>   http://uncubanitolinuxero.blogspot.com
Sorry, the right link is this:
http://mikeferrier.ca/2011/05/14/my-beautiful-dark-twisted-reverse-proxy-LRU-cache/

-- 
Marcos Luis Ortiz Valmaseda
  Software Engineer (Distributed Systems)
  http://uncubanitolinuxero.blogspot.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110604/9ef1d3e2/attachment.html>


More information about the nginx mailing list