[
https://issues.jboss.org/browse/ISPN-7418?page=com.atlassian.jira.plugin....
]
Gustavo Fernandes commented on ISPN-7418:
-----------------------------------------
| This part of the transcoding enhancement is related to the changes required to the core
cache code to force the cache to store keys and values of a certain type.
Not sure if the user will be able to force it. Consider a cache that is configured with
MimeType "text/plain; charset=UTF8". The following scenarios will prevent the
cache from storing plain text:
* When using OFF_HEAP: keys and values must be byte[ ] with a WrappedByteArray around it.
* When using Remote Query: keys must be byte[ ] and values must be ProtobufValueWrapper
(which wraps the byte[ ]), and the byte[ ] must be protobuf encoded.
* When using the server: keys and values should be byte[ ] to avoid back and forth
conversions.
* When using script: scripts have a metadata header that allows for plain text, but it
assumes storage is done via byte[ ] obtained from String.getBytes(charset) and it
currently does conversions back and forth.
Add per-cache key/value type information
----------------------------------------
Key: ISPN-7418
URL:
https://issues.jboss.org/browse/ISPN-7418
Project: Infinispan
Issue Type: Sub-task
Reporter: Galder ZamarreƱo
This part of the transcoding enhancement is related to the changes required to the core
cache code to force the cache to store keys and values of a certain type.
The type information should be defined via a MIME type, and should be configured by the
user.
A cache can only have a single key+value type combination. A single cache will not
support storing data of different key and/or value types. Amongst other reasons, this is
done for space efficiency.
Once a cache can be configured with a specific key and value type, the user should be
able to retrieve the value with an alternative MIME type. Behind the scenes, the cache
should be able to transform the value from the give type to target type on the fly.
As suggested in the wiki, there should be the possibility for the key/value type to be
implicitly determined by the key+value type passed in during the first cache write. The
aim of this is to enable remote clients to decide what the key+value type are upon writing
to the cache for the first time, and hence avoid cache pre-configuration.
Some transcoders might require additional configuration. The cache needs to be able to be
configured with the necessary options to do on the fly transcoding for clients. E.g.
schema for protobuf...etc.
An important aspect here is that consistent hashing should not be affected by
transcoding.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)