[
https://issues.jboss.org/browse/ISPN-6845?page=com.atlassian.jira.plugin....
]
Krzysztof Sobolewski edited comment on ISPN-6845 at 7/7/16 7:30 AM:
--------------------------------------------------------------------
I have a prototype implementation of this, but it's a direct extension of the existing
classes/interfaces and the result is not really merge-worthy. It does the followng
things:
* The configuration of key/data name/type is changed from a single String to a
List<String> so that we can declare multiple columns for the key and the value
* The configuration builder uses varargs so source compatibility (not binary
compatibility) is preserved
* The Key2StringMapper interface is extended so that it can return multiple values
(Objects, not String) for the key
* The Key2StringMapper is also applied to the values
* The TableManagers are modified to generate multi-column statements, which is a little
more involved than a simple String.format() :)
Overall, it works, but is a little awkward (Key2StringMapper applied to values?
Key2StringMapper that generates Object[]? The mapper for values takes an extra
"parameter" that is crammed in front of the array ob objects extracted from the
database. The boolean fetchValues and boolean fetchMetadata parameters are ignored. Etc).
The code is in
https://github.com/ksobolew/infinispan/tree/ISPN-6845 if someone wishes to
take a look.
was (Author: ksobolewski):
I have a prototype implementation of this, but it's a direct extension of the existing
classes/interfaces and the result is not really merge-worthy. It does the followng
things:
* The configuration of key/data name/type is changed from a single String to a
List<String> so that we can declare multiple columns for the key and the value
* The configuration builder uses varargs so source compatibility (not binary
compatibility) is preserved
* The Key2StringMapper interface is extended so that it can return multiple values
(Objects, not String) for the key
* The Key2StringMapper is also applied to the values
Overall, it works, but is a little awkward (Key2StringMapper applied to values?
Key2StringMapper that generates Object[]? The mapper for values takes an extra
"parameter" that is crammed in front of the array ob objects extracted from the
database. The boolean fetchValues and boolean fetchMetadata parameters are ignored. Etc).
The code is in
https://github.com/ksobolew/infinispan/tree/ISPN-6845 if someone wishes to
take a look.
A JDBC-based CacheLoader/CacheWriter that breaks down keys and values
into multiple table columns
-------------------------------------------------------------------------------------------------
Key: ISPN-6845
URL:
https://issues.jboss.org/browse/ISPN-6845
Project: Infinispan
Issue Type: Feature Request
Components: Loaders and Stores
Affects Versions: 9.0.0.Alpha2
Reporter: Krzysztof Sobolewski
Even in the JBoss Cache days we (at my $DAYJOB) were not really happy with how the JDBC
cache loader stores the data. Yes, marshalling the value into a BLOB is universal and
portable, but nevertheless we created our own variant that increases visibility into the
data by storing each attribute of the value in its own database table, in a human-readable
format. It also very slightly improves performance, but that's not the primary goal. I
think something like this would be useful in Infinispan.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)