Ilya, Aleksandr,

The flag is called platformNearCacheEnabled, my idea is to have just one
flag for all platforms.

If some platform is present on the given node (.NET, C++) and it supports
native near caching,
then the flag is honored, otherwise it is ignored. We should not throw
exceptions,
because mixed clusters are possible (.NET nodes along with Java nodes).

> Why would enabling it affect mixed clusters?
Initially the idea was to enable .NET near cache whenever
NearCacheConfiguration is present.
If we assume .NET-only clusters, it makes sense: existing code will work
faster automatically.

Mixed cluster is just one of the possible use cases when this may be a bad
idea,
e.g. users have enabled near caching to speed up their Java-based
computations,
and .NET nodes are used for something else, wasting memory on near caching
unnecessarily.

On Tue, Feb 18, 2020 at 4:30 PM Aleksandr Shapkin <lexw...@gmail.com> wrote:

> Pavel,
>
>
>
> I think it’s ok to add a new flag.
>
> Though we may change a name to something like #usePlatformCacheIfAvailable
>
>
>
> But it may vary depending on the implementation, i.e.
>
> should we throw an error if there is no native cache
>
> available for a platform or just ignore the configuration.
>
> вт, 18 февр. 2020 г. в 15:05, Pavel Tupitsyn <ptupit...@apache.org>:
>
> > Igor,
> >
> > The problem is - we need to pass this flag around the cluster for Server
> > Near Caches,
> > so that .NET near caches are started accordingly.
> >
> > There are 2 kinds of Near Caches:
> > - On client nodes: created on every client node separately by calling
> > ignite.CreateNearCache
> > - On server nodes: created on all server nodes if
> > CacheConfiguration.NearCacheConfiguration is set
> >
> > When user says ignite.CreateCache(new CacheConfiguration
> > {NearCacheConfiguration = ...}),
> > the whole config is sent to all server nodes, and .NET-specific flag has
> to
> > be included somehow.
> >
> > On Tue, Feb 18, 2020 at 2:59 PM Igor Sapego <isap...@apache.org> wrote:
> >
> > > Do you suggest to introduce it in general configuration? Why not
> > introduce
> > > it only on platform side? Is there any .NET-specific configuration?
> > >
> > > Best Regards,
> > > Igor
> > >
> > >
> > > On Tue, Feb 18, 2020 at 1:10 AM Pavel Tupitsyn <ptupit...@apache.org>
> > > wrote:
> > >
> > > > Igniters,
> > > >
> > > > I'm working on .NET Near Cache feature [1]
> > > > (storing deserialized cache entries in CLR memory to improve
> > > performance).
> > > >
> > > > Implementation is based on Java near cache, with some callbacks to
> .NET
> > > > side
> > > > for updating and invalidating cached entries.
> > > >
> > > > However, I'd like to make this feature optional: enabling Java near
> > cache
> > > > should not
> > > > always enable .NET near cache - some users may have mixed clusters,
> > etc.
> > > >
> > > > Therefore I'm adding NearCacheConfiguration#platformNearCacheEnabled
> > > > boolean flag.
> > > > Are there any objections or better ideas to configure this behavior?
> > > >
> > > > Thanks,
> > > > Pavel
> > > >
> > > > [1] https://issues.apache.org/jira/browse/IGNITE-12691
> > > >
> > >
> >
>
>
> --
> Alex.
>

Reply via email to