Thanks Yichun and Jeff for your inputs and sorry for late ack. I had a brief look at ngx_drizzle, I see that it needs the library to expose underlying fd, which is not possible in our case, but looks an interesting solution. The other cosocket API mechanism seem to be using unix domain socket as per the docs, so this would be similar to using pipe/socket to handle async apis where the callback could trigger event on the pipe/socket. Please correct me if am missing something? (never worked on lua :) )
Use case is very similar to image optimization case in pagespeed. I am guessing cosocket approach can also fit here? @Jeff regarding using pipes to trigger event, does it create one pipe per request or just one pipe where say module can - trigger the async API, - queue the nginx_request and proceed with other requests, (not sure this is possible with nginx?, as i think nginx handler cannot return something like NGX_AGAIN to resume handler where it called async api) - when there is event on pipe, nginx pipe_event_handler can figure out which request's data is ready and respond Easiest approach I can think of is to use domain socket in upstream form, but wanted to avoid as it it would mean additional socket descriptor per request. If you can help understand at design level w.r.t nginx, will be faster to adapt :) Thanks again!!
_______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel