[infinispan-issues] [JBoss JIRA] Updated: (ISPN-1097) Optimize storeAsBinary behavior for invalidation mode caches

Manik Surtani (JIRA) jira-events at lists.jboss.org
Wed May 11 13:19:18 EDT 2011


     [ https://issues.jboss.org/browse/ISPN-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manik Surtani updated ISPN-1097:
--------------------------------

        Fix Version/s: 5.0.0.CR2
                       5.0.0.FINAL
    Affects Version/s: 4.2.1.FINAL
           Complexity: Medium


I can think of a few solutions, not all pretty.  Let me know what you think would work best:

1.  Pass in a flag per option to control storage.  E.g.,
   
{code}
  cache.withFlags(STORE_KEY_AS_BINARY, STORE_VALUE_AS_OBJECT).put(k, v);
{code}

2.  Make this a cache-wide configuration

{code}
  <storeAsBinary enabledOnKeys="true" enabledOnValues="false" />
{code}


> Optimize storeAsBinary behavior for invalidation mode caches
> ------------------------------------------------------------
>
>                 Key: ISPN-1097
>                 URL: https://issues.jboss.org/browse/ISPN-1097
>             Project: Infinispan
>          Issue Type: Enhancement
>          Components: Marshalling
>    Affects Versions: 4.2.1.FINAL, 5.0.0.CR1
>            Reporter: Paul Ferraro
>            Assignee: Manik Surtani
>            Priority: Critical
>             Fix For: 5.0.0.CR2, 5.0.0.FINAL
>
>
> When using invalidation mode w/storeAsBinary enabled, both the cache key and value are serialized during a cache put.  However, unlike the cache key, the cache value will never be sent over the wire - so it seems that this serialization cost is necessary.  Since INVALIDATION_SYNC is the default mode for hibernate 2nd level caching of entities and collections, and since serializing an entity is potentially costly, this performance hit very noticeable, especially when compared to the performance of JBoss Cache, where serialization only happens when needed. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list