[infinispan-issues] [JBoss JIRA] (ISPN-1409) Introduce a binary-stream upgrading CacheLoader
Galder Zamarreño (Commented) (JIRA)
jira-events at lists.jboss.org
Thu Oct 6 02:36:16 EDT 2011
[ https://issues.jboss.org/browse/ISPN-1409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632642#comment-12632642 ]
Galder Zamarreño commented on ISPN-1409:
----------------------------------------
Some tricks for Externalizers to deal with byte representation belonging to different versions of a type can be found in:
https://github.com/infinispan/infinispan/blob/master/core/src/test/java/org/infinispan/marshall/multiversion/MultiPojoVersionMarshallTest.java
One of the challenges here is unit testing all of this. Another is how to control that a user does give you a different Externalizer implementation, as opposed to modifying the existing impl.
> Introduce a binary-stream upgrading CacheLoader
> -----------------------------------------------
>
> Key: ISPN-1409
> URL: https://issues.jboss.org/browse/ISPN-1409
> Project: Infinispan
> Issue Type: Feature Request
> Reporter: Sanne Grinovero
> Assignee: Manik Surtani
> Fix For: 6.0.0.FINAL
>
>
> We need a CacheLoader decorator able to chain sets of two different Externalizers which are targeting the same Java type to transform from one binary format to the next binary format.
> Example: a Person object stored in the cache and an Externalizer is coupled to it. In a new release the Externalizer is changed to provide a different binary representation. Using the old one the stream is transformed from a byte[] to a Person, then this Java instance is feed to the new Externalizer implementation to get the new corresponding byte[]; the updated stream is stored in the decorated CacheLoader so that the nodes going to be attached to the cache store and using the new Externalizer will be fine.
> A little complexity is introduced if the cache has to know about different sets of Externalizers if several different types need to be upgraded. A possible solution is to use a single decorator instance for each type, creating a chain of decorators if they are able to pass "as is" each externalizer id they are not directly coupled to.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list