Search Mailing List
justin at wfprod.com
Mon Jul 8 21:28:18 CEST 2013
I'm having trouble finding answers to my questions.
I'm looking for an example of a call to Postgres' async interface, libpq(PQsendQuery/PQgetResult).
Example Google searches that return no results:
Consequently, I'm inclined to conclude that I'm trying to do something I am not supposed to do.
I have a PSGI app that sits between NGINX and PostgreSQL that I want to replace. I believe PSGI forks on each request. The child accepts a request, decrypts the user's cookie, then uses the cookie info to connect to Postgres as that user. The data comes back, the PSGI app wraps it in a response, sends it back to the user and exits.
I want to use ev_async and PQsendQuery/PQgetResult to replace this PSGI application. My questions are:
Is Libev the appropriate tool for this or is there something better? (Why can't I find an example?)
Is ev_async the proper watcher in this case?
Can someone give me a three sentence explanation on how to go about this? (use x watcher, use idle for y, use a timer for z)
I was looking at adapting STUD (The Scalable TLS Unwrapping Daemon ) for this but the Ringbuffer is everywhere. I think it would be easier to get Libev and Libpq working together and then add SSL (to replace NGINX) after that.
7813 Harwood Road
North Richland Hills, TX 76180
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the libev