Connection pooling

50 views
Skip to first unread message

Robin Barooah

unread,
Feb 11, 2009, 3:23:40 PM2/11/09
to Sublime SimpleDB
Thanks to Landon Fuller for a patch adding connection pooling.

http://github.com/rbarooah/simpledb-scala-binding/commit/ef69c691236beab684dc5bf4e92d309531b16bb4

I'm not going to shout out every commit, but his one makes the library
considerably more production usable.


Dustin Whitney

unread,
Feb 11, 2009, 3:41:56 PM2/11/09
to Sublime SimpleDB
Is there a significant benefit of using connection pooling over a
single threaded model wrapped in an actor?

On Feb 11, 3:23 pm, Robin Barooah <robi...@gmail.com> wrote:
> Thanks to Landon Fuller for a patch adding connection pooling.
>
> http://github.com/rbarooah/simpledb-scala-binding/commit/ef69c691236b...

Landon Fuller

unread,
Feb 11, 2009, 4:03:58 PM2/11/09
to sublime-...@googlegroups.com

On Feb 11, 2009, at 12:41 PM, Dustin Whitney wrote:

>
> Is there a significant benefit of using connection pooling over a
> single threaded model wrapped in an actor?

Do you mean maintaining a connection per thread, or maintaining one
connection in an actor, or?

A connection per thread would only be efficient if the actors are long
lived -- SimpleDB's HTTP setup time is 1-2 seconds without an
existing perstistent HTTP/1.1.
However, that is still a -long- time to wait when setting up a new
actor (eg, tacking on 1-2 seconds to the first page load, etc).

Wrapping one connection in one actor would disallow parallelism, which
is where SimpleDB shines. Maintaining a pool of actors would be
replicating what commons-pool provides.

Hopefully I didn't misinterpret your query.

-landonf

PGP.sig

Dustin Whitney

unread,
Feb 11, 2009, 6:05:46 PM2/11/09
to Sublime SimpleDB
So abstractly speaking in pseudo-code , you never call

httpClient.getConnectionManager().releaseConnection() ?

I see that there is a line:

method.releaseConnection

I assume that does not release the HTTP connection to SimpleDB? I'll
look it up after dinner.

Great commit - this library is rad

-Dustin
>  PGP.sig
> < 1KViewDownload

Dustin Whitney

unread,
Feb 12, 2009, 1:06:07 AM2/12/09
to Sublime SimpleDB
Ok, after reading the commons-httpclient docs, I get it. Just
curious, why didn't you elect to use commons-httpclient's
MultiThreadedHttpConnectionManager? Just a preference, or are there
more options when using commons-pool?

-Dustin
Reply all
Reply to author
Forward
0 new messages