How does this differ from libpq’s (and, by association, the pg driver’s)
native support for this?
It builds on top of pg’s async interfaces. But allows you to use them in
a semi transparent manner. Your code will look like usual (i.e. no
callbacks for processing results), thanks to Ruby1.9 Fibers.
The async facilities currently found in pg require that you send the
query, poll on the socket and may be run a call back after the data
arrives
How does this differ from libpq’s (and, by association, the pg driver’s)
native support for this?
It builds on top of pg’s async interfaces. But allows you to use them in
a semi transparent manner. Your code will look like usual (i.e. no
callbacks for processing results), thanks to Ruby1.9 Fibers.
How does this differ from libpq’s (and, by association, the pg driver’s)
native support for this?
-Erik
As far as I can tell, it uses libpq’s drivers but in a ‘reactor’ way to
remain single threaded while handling multiple requests. It blocks the
request’s fiber while that request is waiting for the database, and
resumes it when the query returns. So it’s basically libpg +
concurrency without threads. This has potential to be more scalable
than using threads, at least I hope so.
-=R
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.