Hi--

I'm thinking of using JBossCache in a large project and I've been reading the 
docs, but I'm not totally clear about some aspects.  I appologize for the 
really basic questions, but I was hoping someone might know, since it would 
help me choose whether to use JBossCache.

I've got a Map that's tracking how many times certain things are accessed in 
order to do some statistics.  So, I've got a map of key -> long where I'll be 
incrementing the value extremely often.  I want the current values to persist 
between sessions, but if on a major error or shutdown, I lost a few updates, 
it's not the end of the world (likewise, if I few machines in a cluster 
occasionally step on each other and I lose an increment, it's not a crisis).

So, I know that I want to use JBossCache and have it occasionally write updates 
to disk.  I assume a CacheLoader is the right way to go.  Here are my questions:

1) Does this decouple cache reads from saving to disk?  So, I can do an update 
and the main thread of my program containues without waiting for the update to 
disk.  (I've been prototyping using a SQL database, and waiting for writes to 
happen before continuing makes my system unusable).

2) Does it write every for update, or can it batch changes?  I'd love it if I 
could say "Only write changed values every 5 minutes".

3) If the above are doable, can they be done with the exisiting CacheLoaders, 
or would I need to write a custom one?

and a free bonus question:

4) Is there any way to make things more memory-efficient if I'm mapping 
long->long.

Thank you very much for your help,
Dan

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3906905#3906905

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3906905


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to