<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Oct 27, 2016 at 9:56 AM Pedro Ruivo &lt;<a href="mailto:pedro@infinispan.org">pedro@infinispan.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
<br class="gmail_msg">
On 27-10-2016 14:20, William Burns wrote:<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; On Thu, Oct 27, 2016 at 4:56 AM Pedro Ruivo &lt;<a href="mailto:pedro@infinispan.org" class="gmail_msg" target="_blank">pedro@infinispan.org</a><br class="gmail_msg">
&gt; &lt;mailto:<a href="mailto:pedro@infinispan.org" class="gmail_msg" target="_blank">pedro@infinispan.org</a>&gt;&gt; wrote:<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;     On 26-10-2016 23:06, William Burns wrote:<br class="gmail_msg">
&gt;     &gt; I have been working on adding in off heap support for a given<br class="gmail_msg">
&gt;     cache.  I<br class="gmail_msg">
&gt;     &gt; wanted to check in and let you all know what I was thinking for the<br class="gmail_msg">
&gt;     &gt; configuration and changes that would come about with it.<br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     &gt; TLDR;<br class="gmail_msg">
&gt;     &gt; New config under data container to enable off heap, StoreAsBinary<br class="gmail_msg">
&gt;     &gt; removed, Equivalence removed<br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     &gt; First I was planning on adding new sub elements of data container.<br class="gmail_msg">
&gt;     &gt; These would be instance, binary and off-heap.  Only of the three could<br class="gmail_msg">
&gt;     &gt; be picked as they are mutually exclusive.  Instance is as we<br class="gmail_msg">
&gt;     operate now<br class="gmail_msg">
&gt;     &gt; where we store the instance of the object passed to us.  Binary is<br class="gmail_msg">
&gt;     &gt; essentially what we have now that is called storeAsBinary with<br class="gmail_msg">
&gt;     both keys<br class="gmail_msg">
&gt;     &gt; and values converted.  Lastly off-heap would store the entry as a<br class="gmail_msg">
&gt;     byte[]<br class="gmail_msg">
&gt;     &gt; store completely in native memory.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;     I prefer &#39;object&#39; instead of &#39;instance&#39;.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; Sounds fine with me.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;     Are you also planning to remove the expiration and/or eviction<br class="gmail_msg">
&gt;     configuration elements and set them in the data-container sub elements?<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; I wasn&#39;t planning on touching those.  But now that you mention it,<br class="gmail_msg">
&gt; eviction only makes sense in the data container, where as expiration is<br class="gmail_msg">
&gt; container and cache store.  And taking this further storeAsBinary is<br class="gmail_msg">
&gt; both as well, only off-heap is container only.  I wonder if instead we<br class="gmail_msg">
&gt; should have a separate storage element at the same level as<br class="gmail_msg">
&gt; data-container.  I can see it either way.<br class="gmail_msg">
<br class="gmail_msg">
Let me know if this makes sense:<br class="gmail_msg">
<br class="gmail_msg">
&lt;expiration&gt; //no changes here<br class="gmail_msg">
&lt;memory evictionStrategy=... evictionPolicy=...&gt;<br class="gmail_msg">
<br class="gmail_msg">
//one of the following<br class="gmail_msg">
     &lt;on-heap max-entries=.../&gt;<br class="gmail_msg">
     &lt;on-heap-binary max-size=.../&gt;<br class="gmail_msg">
     &lt;off-heap ...max-size? and off-heap config.../&gt;<br class="gmail_msg">
<br class="gmail_msg">
&lt;/memory&gt;<br class="gmail_msg">
&lt;persistence&gt; //no changes here<br class="gmail_msg">
<br class="gmail_msg">
wdyt?<br class="gmail_msg"></blockquote><div><br></div><div>Seems fine to me.  And to be honest I forgot to mention this but EvictionStrategy and EvictionPolicy are completely redundant now.  Policy has been for a while as we always used the same thread and Strategy is only Caffeine and for off heap I was thinking of a simple LRU.</div><div><br></div><div>This means that the data container element would be removed in favor of &quot;memory&quot;?  The reason being is that equivalence will be gone and afaik we never really supported a custom data container (eviction wouldn&#39;t work with it and neither would off heap).  In that case why not just keep using data container element?  </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     &gt; Example:<br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     &gt;  &lt;data-container&gt;<br class="gmail_msg">
&gt;     &gt;    &lt;off-heap/&gt;<br class="gmail_msg">
&gt;     &gt;   &lt;/data-container&gt;<br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     &gt; The reason it is a subelement instead of a property is because<br class="gmail_msg">
&gt;     off-heap<br class="gmail_msg">
&gt;     &gt; will most likely require some additional configuration to tell how<br class="gmail_msg">
&gt;     many<br class="gmail_msg">
&gt;     &gt; entries to store in the a bucket (think non resizing HashMap).<br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     &gt; With these changes storeAsBinary becomes redundant, so I was<br class="gmail_msg">
&gt;     planning on<br class="gmail_msg">
&gt;     &gt; removing this configuration completely.  I would rather remove since<br class="gmail_msg">
&gt;     &gt; this is 9.0 and not deprecate.  As far as I know nobody really used it<br class="gmail_msg">
&gt;     &gt; before.<br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     &gt; Also another side effect is I was removing all of the Equivalence<br class="gmail_msg">
&gt;     &gt; classes.  I am not sure if I can plainly remove them since they have<br class="gmail_msg">
&gt;     &gt; lived in commons for quite a while, but it would be best if I could,<br class="gmail_msg">
&gt;     &gt; although I am fine deprecating.  In its place the instance setting for<br class="gmail_msg">
&gt;     &gt; data-container will always wrap byte[] to satisfy equals and hashCode<br class="gmail_msg">
&gt;     &gt; methods.<br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     &gt; Any feedback would be appreciated.<br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     &gt; Thanks,<br class="gmail_msg">
&gt;     &gt;  - Will<br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     &gt; _______________________________________________<br class="gmail_msg">
&gt;     &gt; infinispan-dev mailing list<br class="gmail_msg">
&gt;     &gt; <a href="mailto:infinispan-dev@lists.jboss.org" class="gmail_msg" target="_blank">infinispan-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:infinispan-dev@lists.jboss.org" class="gmail_msg" target="_blank">infinispan-dev@lists.jboss.org</a>&gt;<br class="gmail_msg">
&gt;     &gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br class="gmail_msg">
&gt;     &gt;<br class="gmail_msg">
&gt;     _______________________________________________<br class="gmail_msg">
&gt;     infinispan-dev mailing list<br class="gmail_msg">
&gt;     <a href="mailto:infinispan-dev@lists.jboss.org" class="gmail_msg" target="_blank">infinispan-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:infinispan-dev@lists.jboss.org" class="gmail_msg" target="_blank">infinispan-dev@lists.jboss.org</a>&gt;<br class="gmail_msg">
&gt;     <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; _______________________________________________<br class="gmail_msg">
&gt; infinispan-dev mailing list<br class="gmail_msg">
&gt; <a href="mailto:infinispan-dev@lists.jboss.org" class="gmail_msg" target="_blank">infinispan-dev@lists.jboss.org</a><br class="gmail_msg">
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br class="gmail_msg">
&gt;<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
infinispan-dev mailing list<br class="gmail_msg">
<a href="mailto:infinispan-dev@lists.jboss.org" class="gmail_msg" target="_blank">infinispan-dev@lists.jboss.org</a><br class="gmail_msg">
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br class="gmail_msg">
</blockquote></div></div>