<div dir="ltr">Hi,<div><br></div><div>another option is to use the off-heap allocator from Netty project. It'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"><<a href="mailto:ttarrant@redhat.com" target="_blank">ttarrant@redhat.com</a>></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'd gladly accept a<br>
DataContainer implementation as you propose :)<br>
<br>
Before you start working on it, however, I'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>
> Hi Yavuz, Tristan, et. al.<br>
><br>
> I am extremely interested to learn if anything materialized from the<br>
> <a href="https://issues.jboss.org/browse/ISPN-871" target="_blank">https://issues.jboss.org/browse/ISPN-871</a> effort.<br>
><br>
> If nothing materialized, I would like to take a stab at doing this,<br>
> specifically by doing the following:<br>
><br>
><br>
> 0. Use Peter Lawrey's openHFT HugeCollections project<br>
> (<a href="https://github.com/OpenHFT/HugeCollections" target="_blank">https://github.com/OpenHFT/HugeCollections</a>) as the off-Heap Cache<br>
> implementation provider.<br>
><br>
> 1. Start with Peter's net.openhft.collections.HugeHashMap<K,V><br>
> implementation Class as a highly optimized off-Heap basis and a potential<br>
> Cache<K,V> candidate<br>
><br>
> 2. Confirm from ISPN-dev team that the ambition to use<br>
> org.infinispan.container.DataContainer interface as a bridge to provide<br>
> potential non-ISPN built CacheImpl<K,V> candidates is sound/complete (and<br>
> intended)<br>
><br>
> 3. Modify HugheHashMap<K,V> so that it explicitly implements<br>
> org.infinispan.container.DataContainer interface.<br>
><br>
> 4. Confirm that modified my net.openhft.collections..HugeHashMap<K,V> can<br>
> interoperate with the full ISPN 5.3/6.x APIs, exactly as if it were a<br>
> default ISPN-provided org.infinispan.CacheImpl<K,V><br>
><br>
> Could any one from the ISPN-dev team comment if this ambition has merit and<br>
> a liklihood of "working" as outlined above (effectively resuming the work<br>
> 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>
> ISPN documentation that advocates the use of DataContainer for taking on<br>
> this type of effort?<br>
><br>
> Thanks,<br>
> Ben<br>
><br>
><br>
><br>
> --<br>
> 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>
> Sent from the Infinispan Developer List mailing list archive at Nabble.com.<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>
><br>
><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>