<div dir="ltr">Hi,<div><br></div><div>another option is to use the off-heap allocator from Netty project. It&#39;s just an allocator, so it would require extra work when compared with HugeCollections. </div><div>I tried this approach approach with Hazelcast: <a href="https://github.com/jerrinot/hugecast">https://github.com/jerrinot/hugecast</a></div>

<div><br></div><div>Cheers,</div><div>Jaromir</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 15, 2014 at 11:44 AM, Tristan Tarrant <span dir="ltr">&lt;<a href="mailto:ttarrant@redhat.com" target="_blank">ttarrant@redhat.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ben,<br>
<br>
HugeCollections does indeed look interesting, and we&#39;d gladly accept a<br>
DataContainer implementation as you propose :)<br>
<br>
Before you start working on it, however, I&#39;d better expand on the<br>
reasons for implementing an off-heap DataContainer: we would ultimately<br>
like to have cache entries directly accessible as (Direct)ByteBuffers<br>
which means we could then use NIO2 to directly transfer that data over<br>
the network (JGroups, HotRod, etc) without additional copy operations.<br>
HC uses Unsafe.allocateMemory() which does not have this facility, so we<br>
would still have to copy data from there to a heap-based ByteBuffer<br>
before being able to pass that on to any NIO2 methods.<br>
<br>
This is all in the initial planning stages, so any comments are welcome<br>
<span class="HOEnZb"><font color="#888888"><br>
Tristan<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 01/15/2014 11:54 AM, cotton-ben wrote:<br>
&gt; Hi Yavuz, Tristan, et. al.<br>
&gt;<br>
&gt; I am extremely interested to learn if anything materialized from the<br>
&gt; <a href="https://issues.jboss.org/browse/ISPN-871" target="_blank">https://issues.jboss.org/browse/ISPN-871</a> effort.<br>
&gt;<br>
&gt; If nothing materialized, I would like to take a stab at doing this,<br>
&gt; specifically by doing the following:<br>
&gt;<br>
&gt;<br>
&gt; 0.  Use Peter Lawrey&#39;s openHFT HugeCollections project<br>
&gt; (<a href="https://github.com/OpenHFT/HugeCollections" target="_blank">https://github.com/OpenHFT/HugeCollections</a>) as the  off-Heap Cache<br>
&gt; implementation provider.<br>
&gt;<br>
&gt; 1.  Start with Peter&#39;s net.openhft.collections.HugeHashMap&lt;K,V&gt;<br>
&gt; implementation Class as a highly optimized off-Heap basis and a potential<br>
&gt; Cache&lt;K,V&gt; candidate<br>
&gt;<br>
&gt; 2.  Confirm from ISPN-dev team that the ambition to use<br>
&gt; org.infinispan.container.DataContainer interface as a bridge to provide<br>
&gt; potential  non-ISPN built  CacheImpl&lt;K,V&gt; candidates is sound/complete (and<br>
&gt; intended)<br>
&gt;<br>
&gt; 3.  Modify HugheHashMap&lt;K,V&gt; so that it explicitly implements<br>
&gt; org.infinispan.container.DataContainer interface.<br>
&gt;<br>
&gt; 4.  Confirm that modified my net.openhft.collections..HugeHashMap&lt;K,V&gt; can<br>
&gt; interoperate with the full ISPN 5.3/6.x APIs, exactly as if it were a<br>
&gt; default ISPN-provided org.infinispan.CacheImpl&lt;K,V&gt;<br>
&gt;<br>
&gt; Could any one from the ISPN-dev team comment if this ambition has merit and<br>
&gt; a liklihood of &quot;working&quot; as outlined above (effectively resuming the work<br>
&gt; started at <a href="https://issues.jboss.org/browse/ISPN-871" target="_blank">https://issues.jboss.org/browse/ISPN-871</a>)?  Is there any in-place<br>
&gt; ISPN documentation that advocates the use of DataContainer for taking on<br>
&gt; this type of effort?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Ben<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://infinispan-developer-list.980875.n3.nabble.com/infinispan-dev-Infinispan-embedded-off-heap-cache-tp4026102p4028642.html" target="_blank">http://infinispan-developer-list.980875.n3.nabble.com/infinispan-dev-Infinispan-embedded-off-heap-cache-tp4026102p4028642.html</a><br>


&gt; Sent from the Infinispan Developer List mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;<br>
&gt;<br>
<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.”<br>Antoine de Saint Exupéry
</div>