ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Rudyak <irud...@gmail.com>
Subject Re: Configuring Cassandra persistence from code
Date Fri, 13 Jan 2017 02:09:47 GMT
Good question. The main case for this getters/setters API is when you are
going to dynamically create Cassandra persistence configuration for you
cache.

As I see it, in most cases developers will create kind of xml persistent
descriptor template, which will be used to generate final persistence
descriptor for particular cache or just reuse already existing persistence
descriptor. In case you want to generate persistence descritor dynamically
from scratch I don't see much difference from doing it using
getters/setters API or generating XML document - in both cases it will be
lot's of XML API or Persistence Descriptor API calls.

Any thoughts?


On Jan 12, 2017 3:36 PM, "Valentin Kulichenko" <
valentin.kulichenko@gmail.com> wrote:

> Hi Igor,
>
> I just noticed that KeyValuePersistenceSettings class required to
> configure Cassandra store can be created only based on XML file of a
> special format.
>
> If so, this looks like a pretty serious limitation. First of all, when
> configuring such cache, user has to know both Spring configuration format
> and this specific format for persistence. In other words, persistence
> configuration seems to be weirdly separated from all other configurations
> in a separate file with a different format.
>
> But most importantly, what if user wants to create a cache dynamically and
> doesn't know configuration in advance? How are they supposed to create this
> special XML in this case?
>
> Is my understanding correct? If so, I think we should add standard getters
> and setters to KeyValuePersistenceSettings. This will make it compatible
> with Spring and will allow to create it dynamically in code.
>
> Agree?
>
> -Val
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message