On Fri, Jul 9, 2010 at 11:08 PM, tbatchelli <tbatche...@gmail.com> wrote:
> Hi David, > > Out of curiosity, how are these tests connecting to the database, > especially in the cases of MongoDB and CouchDB? In the case of CouchDB > you're clearly using HTTP in a way that it creates one connection per > request, I believe. In the case of MongoDB, the driver provides a > connection pool (default of 10) and these connections are kept alive > and reused between requests. You might be comparing the difference > between making one connection per request vs. pipelining many request > over an already established connection... > > Toni. One big problem with the PostgreSQL and MySQL numbers is that they don't use pooling. I found a simple example of adding that to the PostgreSQL code and done so, though I'm still hunting for a MySQL example :P As far as CouchDB I'm using Richard Newman's nice clj-apache-http library which is a wrapper around Apache HTTP Client. It reuses connections by default. However Iooking into this some more, the connections might still be the bottleneck - I'm looking into using multithreaded client connection manager. Will be interesting to see what numbers come up after that. If the whole premise of the blog post turns out to be flawed at least we have a page documenting the basics of how to use Clojure with several dbs ;) David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en