[infinispan-dev] CacheLoader and CacheStore
Radim Vansa
rvansa at redhat.com
Thu Aug 15 03:48:26 EDT 2013
On 08/14/2013 08:58 PM, Mircea Markus wrote:
> On 14 Aug 2013, at 18:48, Dennis Reed <dereed at redhat.com> wrote:
>
>>> I've written such parser on Friday, basically just copying and rewriting
>>> the SingleFileCacheStore stuff (adding my own properties instead). It
>>> took me about an hour and I don't hate anyone from infinispan team :)
>>> Maybe I am already advanced ISPN user, but I don't consider it as a
>>> complicated task as long as there is some template (simple cache-store
>>> implementation) I can use for reference.
>> If it took you an hour as an advanced user that's intimately familiar
>> with Infinispan to implement it and get it working,
>> that means for many of our customers it could take days, and quite a few
>> interactions with support.
>>
>> Compare that to the current implementation where ISPN does the XML
>> parsing and calls setters, which takes 0 time no matter the competence
>> of the user.
I won't say days. Actually any magically called setters seem more
cryptic to me (there's even no annotation that would help me find that).
Documentation in [1] also shows only the parser-based approach. I was
rather surprised that it worked (I've started on 5.3 with the
property-based configuration).
The big advantage of the property-based approach is that everything
works out of the box, but the configuration without XSD is error-prone
to typos.
>>
>> I'm 100% *against* forcing customers to write their own XML parsing.
> +1
> The current parsing-free approach will be kept. Just that we'll add a template for writing stores that would contain a sample optional parser.
Will the property based configuration be done on the
*Configuration/*ConfigurationBuilder classes or the *Config ones? It's
confusing which one to use for a new user. The fact that the
configuration code is in org.i.configuration.cache and the business code
in org.i.loaders does not make things more clear as well.
Radim
[1]
https://docs.jboss.org/author/display/ISPN/Cache+Loaders+and+Stores#CacheLoadersandStores-Configuration
More information about the infinispan-dev
mailing list