You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Juozas Baliuka <ba...@mwm.lt> on 2002/01/16 16:43:50 UTC

RE: [simplestore] enhancements (was: [simplestore] inital check in)

At 08:51 AM 1/16/2002 -0500, you wrote:
>
>The example prompts a few points.  You'd be creating some sort of
>secondary session.  How would you go about getting the attribute name
>list?  Would you really want to tie the store to the user and have a
>half baked session?  Why even have a special servlet?  You just get a
>store instance and use it.  If you want to do session like work then you
>are going to need wrappers and some group functionality.  I'm working on
>the same stuff today in JCS.  I'm trying to clean up the distributed
>sessions.
There are a lot of ways to wrap HttpSession, HttpContext in Filer,
and you can implement ditributed, presistent session or both of them,
depends on situation and then it useful. I am not competent at this time.
It is not very trivial to implement transparent clustering, example was not 
about this.

>Oh, if you come up with a good memory store, I'd like to talk about the
>API.  I made the memory manager pluggable in JCS.  The memory manager
>needs to be able to call an overflow method on the cache hub though.  It
>should at least call some sort of overflow() method in itself when it
>needs to clean up the list, so an extended class could implement it.

I think methods like "memory.overflow()" has no meaning in JAVA.
You will never implement the best memory manager in JAVA application or 
Application container, because
JVM + GC will be better :).
Use java.lang.ref.* there is no better way in JAVA at this time.


>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [simplestore] enhancements (was: [simplestore] inital check in)

Posted by Juozas Baliuka <ba...@mwm.lt>.
>
>When the number of items reaches a set maximum, I'd like to remove the
>reference to them from the hashtable and spool them to disk.  Reaching
>the set item number limit, the cache should overflow onto disk.  It is a
>rough swap that's all.
>
>This technique doesn't endlessly leak memory.

I believe your OS does this job "Virtual Memory Management", no JVM no JAVA 
application must do this.
It is impossible for OS to do this if JVM  allocates not moveable memory, I 
believe it don't.
I think it is not very meaningful to dublicate OS functionality in JAVA 
application, It can be meaningful
if single application with single thread runs on your machine.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [simplestore] enhancements (was: [simplestore] inital check in)

Posted by Aaron Smuts <aa...@verizon.net>.

> -----Original Message-----
> From: Juozas Baliuka [mailto:baliuka@mwm.lt]
> Sent: Wednesday, January 16, 2002 10:44 AM
 
> I think methods like "memory.overflow()" has no meaning in JAVA.
> You will never implement the best memory manager in JAVA application
or
> Application container, because
> JVM + GC will be better :).
> Use java.lang.ref.* there is no better way in JAVA at this time.
> 
 
When the number of items reaches a set maximum, I'd like to remove the
reference to them from the hashtable and spool them to disk.  Reaching
the set item number limit, the cache should overflow onto disk.  It is a
rough swap that's all.  

This technique doesn't endlessly leak memory.

Aaron




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>