[infinispan-dev] still to do on HR-embedded integration in ISPN-2281

Galder Zamarreño galder at redhat.com
Mon May 13 05:44:59 EDT 2013


On May 13, 2013, at 10:35 AM, Galder Zamarreño <galder at redhat.com> wrote:

> You can blog, but bear in mind that the numbers might change. To be precise, the changes that went into Beta1 are:
> 
> - Change from ByteArrayKey (wrapper) to byte[] keys
> - Change from CacheValue (wrapper) to byte[] value
> - Version stored directly in Versioned*Entry classes
> 
> So, this means that we loose two wrapper objects.
> 
> However, in next release, there will be a wrapper class in the value side (Metadata), but stored internally, in a Metadata*Entry class (all Versioned* classes are heading out...). So, we will gain one wrapper class. But it's worth calculating the memory consumption then, and maybe think if we can optimise this away for Hot Rod.

^ Btw, in case anyone wonders what I mean by that. We could decide to do this:

- if using Hot Rod and no compatibility mode, use Versioned*Entry classes to store data + version.
- if using Hot Rod and compatibility mode, use Metadata*Entry classes to store data + metadata (can include: version, flags, content type…etc).

The benefit of the former is 1 less object per cache entry, cos the Versioned*Entry would gave a ref to version directly, instead of an indirect ref to version via Metadata.

This won't be in next release though. For the moment I'm ditching all Versioned*Entry classes and leaving only Metadata*Entry classes. One Martin has done the tests again, we can see the difference and consider whether it makes sense to do keep both Versioned*Entry and Metadata*Entry classes. Doing this though it's a bit of a PITA from a maintanence perspective...

> 
> REST and Memcached will do need to store the entire Metadata object. REST adds content type and Memcached adds both version and flags.
> 
> Anyway, this is something we can tweak further, but I'm very pleased we have a baseline for beta1, because we can see what the effects of supporting the other endpoint compatibility.
> 
> Cheers,
> 
> On May 7, 2013, at 4:55 PM, Manik Surtani <msurtani at redhat.com> wrote:
> 
>> 
>> On 7 May 2013, at 15:39, Martin Gencur <mgencur at redhat.com> wrote:
>> 
>>> I can make a blog post once we have this for Memcached and REST. I guess it is not ready yet.
>> 
>> Yes please.  Nice work.  :)
>> 
>> --
>> Manik Surtani
>> manik at jboss.org
>> twitter.com/maniksurtani
>> 
>> Platform Architect, JBoss Data Grid
>> http://red.ht/data-grid
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> 
> --
> Galder Zamarreño
> galder at redhat.com
> twitter.com/galderz
> 
> Project Lead, Escalante
> http://escalante.io
> 
> Engineer, Infinispan
> http://infinispan.org
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


--
Galder Zamarreño
galder at redhat.com
twitter.com/galderz

Project Lead, Escalante
http://escalante.io

Engineer, Infinispan
http://infinispan.org




More information about the infinispan-dev mailing list