<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello all.<div><br></div><div>So as you know eviction changed pretty substantially from JBC3 but the overall design still remained the same. &nbsp;I'm proposing a radical change to the design, which we briefly discussed in Neuchatel.</div><div><br></div><div>Here's a recap of what has changed already since JBC3:</div><div><br></div><div>1. &nbsp;ExpirationAlgorithm and ElementSizeAlgorithm dropped, unnecessary. &nbsp;Leaves us with {FIFO, LRU, MRU, LFU}</div><div>2. &nbsp;Eviction queue design improved to O(1) for most operations on most algorithms, except LFU (O(log n))</div><div>3. &nbsp;Expiration treated as a top-level construct where lifespans for entries can be provided on a per-entry basis</div><div>4. &nbsp;Eviction watermarks are now exclusively size-based (numElements) and not time-based.&nbsp;</div><div>5. &nbsp;MinTTL still supported.</div><div><br></div><div>Now here is how I want to change things further:</div><div><br></div><div>1. &nbsp;Drop MRU and LFU. &nbsp;I don't see MRU being useful except in very specific edge cases. &nbsp;LRU somewhat useful but very expensive.</div><div>2. &nbsp;Re-introduce a time-based watermark. &nbsp;Brian, this is where your thoughts are most useful - how do you see this being used? &nbsp;In passivation?</div><div>3. &nbsp;Get rid of the eviction queues. &nbsp;Unnecessary duplication of keys. &nbsp;The core datastructure can be refactoreed to provide an efficient, threadsafe lookup for entries, where entries are also ordered for eviction. &nbsp;</div><div>4. &nbsp;To support 3. and make it as efficient as possible, eviction may only be an approximation. &nbsp;(e.g., if items 1 - 10 are added in order, and 3 need to be removed based on FIFO, we may lose 7, 9 and 10 instead of 8, 9 and 10.). &nbsp;How much of a concern is this? &nbsp;(typical tradeoff of accuracy vs efficiency)</div><div><br></div><div>Cheers</div><div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-infinispantal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-infinispantal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div>Lead, JBoss Cache</div><div><a href="http://www.jbosscache.org">http://www.jbosscache.org</a><br><a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>