Yes, get your point... but that won´t solve it either.

( Sorry, I am having trouble expressing myself. ( I am still up after
an all nighter ) )

> Use a Timer to flush objects with timestamps more then $TIME ago.

Ok, suppose I flush the objects in the cache ( within the factory ).
And then an email with id "3" comes along, for which I create a new
instance.
Now, in some other part of the framework, the old instance of the
email with id "3" ( before the flush ) is still laying around, and
sooner rather than later I find myself comparing them using strict
equality. The operation yields false even though they are
"semantically" equivalent.
This is the whole point.

I CANNOT use value based comparison ( eg. implement a compareTo() or
o1.id == o2.id ), only native IDENTITY comparison. This limitation is
by design. I am doing some complex relational algebra in memory.
Actually, its not event identity comparison, but small integers
associated to these instances that are ultimately stored and in bitmap
indexes and operated on using bitwise ops.

So, what I am looking for is some insight about the different
approaches of constructing weak VALUE reference ( in contrast to KEY
reference ) dictionaries.

I need some sleep apparently.
Thanks,
Aldo


On Nov 29, 2007 10:02 AM, Tom Chiverton <[EMAIL PROTECTED]> wrote:
> On Thursday 29 Nov 2007, Aldo Bucchi wrote:
> > While some of these emails will surface constantly at the user
> > interface ( while reading a thread ) others will only be used for mere
> > seconds and will never appear again. It makes sense to remove the
> > latter from memory... specially when we are approaching six figures in
>
> Sounds like a lest-recently-used cache is needed, keyed of the mail id.
> Easy enough - get(id) either returns from cache and updates timestamp for id
> or fetches remote copy, stores and returns from cache.
> Use a Timer to flush objects with timestamps more then $TIME ago.
> LRU caches are well understood and widely documented.
>
> --
> Tom Chiverton
> Helping to administratively facilitate killer appliances
> on: http://thefalken.livejournal.com
>
> ****************************************************
>
> Please note, as of 10th December 2007 the registered office address of 
> Halliwells LLP will be at 3 Hardman Square, Spinningfields, Manchester, M3 3EB
>
>
> ****************************************************
>
> This email is sent for and on behalf of Halliwells LLP.
>
> Halliwells LLP is a limited liability partnership registered in England and 
> Wales under registered number OC307980 whose registered office address is at 
> St James's Court Brown Street Manchester M2 2JF.  A list of members is 
> available for inspection at the registered office.  Any reference to a 
> partner in relation to Halliwells LLP means a member of Halliwells LLP.  
> Regulated by The Solicitors Regulation Authority.
>
> CONFIDENTIALITY
>
> This email is intended only for the use of the addressee named above and may 
> be confidential or legally privileged.  If you are not the addressee you must 
> not read it and must not use any information contained in nor copy it nor 
> inform any person other than Halliwells LLP or the addressee of its existence 
> or contents.  If you have received this email in error please delete it and 
> notify Halliwells LLP IT Department on 0870 365 2500.
>
> For more information about Halliwells LLP visit www.halliwells.com.
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>



-- 
:::: Aldo Bucchi ::::
+1 858 539 6986
+56 9 8429 8300
+56 9 7623 8653
skype:aldo.bucchi

Reply via email to