commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Vest <mr.chrisv...@gmail.com>
Subject Re: [pool] comparison with other pool library
Date Sat, 03 Mar 2012 19:22:29 GMT
On Sat, Mar 3, 2012 at 19:55, Mark Thomas <markt@apache.org> wrote:

> On 03/03/2012 18:32, Chris Vest wrote:
> > Hey guys,
> >
> > I've written an object pool myself, and make a short comparison between
> it
> > and commons-pool in my documentation, to help people choose between the
> two.
> > It's here http://chrisvest.github.com/stormpot/ (under the "why
> choose..."
> > headline)
> > and some more here
> > https://github.com/chrisvest/stormpot/blob/master/package-info.md (under
> > the "Introduction" headline)
> >
> > Let me know if I've misrepresented commons-pool. I don't want to spread
> > misinformation.
>
> A few areas where your statements are not entirely accurate:
>
> Thread safety:
> - Commons Pool *is* thread safe.
>

Roger!


>
> APIs:
> - There are two types of Pool hence two APIs (ObjectPool and
> KeyedObjectPool). Each type has multiple implementations. Users are free
> to use implementation specific methods *if they want to* but to suggest
> that there are many implementations each with a different API is not
> correct.
>

Okay, I'll figure out a more accurate rewording of those parts.


>
> Performance:
> Any numbers to back up the claim that Commons Pool is less performant?
> It wouldn't surprise me on multi-core machines - that is after all one
> of the primary goals of Commons Pool 2.
>

I assume you are referring to this part: "The Stormpot API is slanted
towards high through-put. The Commons-Pool API is slanted towards a rich
feature set."
I don't actually say that Commons Pool is slow — only that Stormpot has an
API that is intentionally designed to permit a well performing
implementation — precisely because I don't have any numbers comparing the
two. Not yet, anyways. My focus for the current iteration has been on
features and (even more evidence of) correct multi-threaded operation.
Perhaps this has made the text a little outdated, though this is still the
reason why Stormpot has a more invasive API.
I believe it is possible to make a fast and scalable implementation of the
Commons Pool ObjectPool interface - perhaps with striped stacks - but with
Stormpot I have designed the API in a way that I hope allow me more options
in writing code that performs well.


>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message