JBoss POJOCache

0 views
Skip to first unread message

Stuart Grimshaw

unread,
Mar 22, 2010, 6:59:01 PM3/22/10
to Sheffield Java User Group
Has anyone tried using JBoss's POJOCache in a stand alone app?

Are there any other caching options I should be looking at? I'm having
a go at the programming exercise we give to interviewees just to see
what my solution looks like in comparison to some of the ones we have
received.

-S

Ed Bowler

unread,
Mar 23, 2010, 5:58:07 AM3/23/10
to java-sh...@googlegroups.com
On Mon, Mar 22, 2010 at 10:59 PM, Stuart Grimshaw
<stuart....@gmail.com> wrote:
> Has anyone tried using JBoss's POJOCache in a stand alone app?

I've only played with it deployed in jboss, and not in a production
setting, so I'm probably not in any way qualified to talk about it,
but the api looked pretty nice, I just failed to convice my boss at
the time to use it in production.

> Are there any other caching options I should be looking at?

what do you mean by caching ? jboss cache is ACID transactional, and
fully persistant, and I believe it now has a query api ... sounds like
a database to me.

These people have some interesting scalability solutions

http://www.terracotta.org/

including things like shared heap across multiple jvm.

> I'm having a go at the programming exercise we give to interviewees just to see
> what my solution looks like in comparison to some of the ones we have
> received.

Without giving away too much then, what are you caching and why ? Cos
to be honest, it's pretty easy to roll your own cache if your needs
are not all that complex.

Stuart Grimshaw

unread,
Mar 23, 2010, 10:31:19 AM3/23/10
to java-sh...@googlegroups.com
On Tue, Mar 23, 2010 at 9:58 AM, Ed Bowler <ed.b...@gmail.com> wrote:
> On Mon, Mar 22, 2010 at 10:59 PM, Stuart  Grimshaw
> <stuart....@gmail.com> wrote:
>> Has anyone tried using JBoss's POJOCache in a stand alone app?
>
> I've only played with it deployed in jboss, and not in a production
> setting, so I'm probably not in any way qualified to talk about it,
> but the api looked pretty nice, I just failed to convice my boss at
> the time to use it in production.

The reason I'm asking is because I get errors trying to start the
cache in a stand alone app, the docs say you can do it, but then don't
really give much insight into how. There may be more in the plain
JBossCache docs though.

>> Are there any other caching options I should be looking at?
>
> what do you mean by caching ?  jboss cache is ACID transactional, and
> fully persistant, and I believe it now has a query api ... sounds like
> a database to me.
>
> These people have some interesting scalability solutions
>
> http://www.terracotta.org/
>
> including things like shared heap across multiple jvm.
>
>> I'm having a go at the programming exercise we give to interviewees just to see
>> what my solution looks like in comparison to some of the ones we have
>> received.
>
> Without giving away too much then, what are you caching and why ?  Cos
> to be honest, it's pretty easy to roll your own cache if your needs
> are not all that complex.

It's nothing too exciting, just simple CSV processing, but with quite
a lot of data to see how people would tackle scaling.

At the moment, it just uses a hashmap, next I wanted to try an
in-memory cache to see what, if any, benefit I might get from it.

Stuart Grimshaw

unread,
Mar 23, 2010, 10:57:51 AM3/23/10
to java-sh...@googlegroups.com
>
> At the moment, it just uses a hashmap, next I wanted to try an
> in-memory cache to see what, if any, benefit I might get from it.
>

Which when I actually think about it wont do the job, when the cache
gets full, stuff will just disappear ... duh!

Unless it gets written to disk, in which case why not just use SQL.

CouchDB next I think ;-)

Ed Bowler

unread,
Mar 23, 2010, 10:58:31 AM3/23/10
to java-sh...@googlegroups.com
On Tue, Mar 23, 2010 at 2:31 PM, Stuart Grimshaw
<stuart....@gmail.com> wrote:
> The reason I'm asking is because I get errors trying to start the
> cache in a stand alone app, the docs say you can do it, but then don't
> really give much insight into how. There may be more in the plain
> JBossCache docs though.

sorry - I've never tried that ... I'm sure you can google as well as I ;)

> It's nothing too exciting, just simple CSV processing, but with quite
> a lot of data to see how people would tackle scaling.
>
> At the moment, it just uses a hashmap, next I wanted to try an
> in-memory cache to see what, if any, benefit I might get from it.

Doesn't it depend on what you mean by scaling ?? If you want to run
as quickly as possible, then you're talking about processing as much
data on as many cores as possible, then looking at things like hadoop
might be worthwhile.

Have you looked at Tim Bray's Wide Finder project ?

http://www.tbray.org/ongoing/When/200x/2008/05/01/Wide-Finder-2

It might be a bit much, but there's some good stuff in there ;)

Reply all
Reply to author
Forward
0 new messages