[infinispan-dev] CacheLoader and CacheStore

Radim Vansa rvansa at redhat.com
Wed Aug 14 05:21:22 EDT 2013


On 08/13/2013 04:50 PM, Mircea Markus wrote:
> On 13 Aug 2013, at 15:30, Galder Zamarreño <galder at redhat.com> wrote:
>
>> On Aug 13, 2013, at 12:20 PM, Mircea Markus <mmarkus at redhat.com> wrote:
>>
>>> On 13 Aug 2013, at 07:59, Galder Zamarreño <galder at redhat.com> wrote:
>>>
>>>> My preference is for #1.
>>>>
>>>> The main reason is cos JSR-107 is about to hit mainstream and we should try to align with it in a way that we reduce confusion. Remember that JSR-107 users are potential Infinispan users, and viceversa, so keeping these interfaces separated would make the mental effort required to bridge the knowledge between the two easier.
>>>>
>>>> I tried to go back in the JSR-107 discussions to find discussions (google group) on this topic but couldn't find anything. Maybe Manik remembers something about it, but seems like this topic has been pretty much set in stone for quite a while.
>>>>
>>>> In terms of configuration, there's no issue at all. Each cache store provides its own schema now.
>>>
>>> good point. Not the custom ones though, these still need a custom tag.
>> ^ No, we don't, or if we currently do, we shouldn't stop doing so.
> Nooo... writing a custom parser for a custom cache store is quite a bit of work and requires understanding of ISPN configuration hierarchy. People would hate us! E.g. the jdbc one: http://goo.gl/VQiQ3u

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.

Just my 2c.

Radim

>
>> IOW, even those who want to create a custom cache store should follow the same pattern of providing their own XML schema parser for their config, configuration builder files…etc. That gets rid of the problem altogether, and by checking the type of the cache loader/store, we can figure out whether it's read-only, write-only or read-write (assuming we keep the interfaces separated).
>
>
> Cheers,



More information about the infinispan-dev mailing list