You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by userx <ga...@gmail.com> on 2018/11/20 05:03:09 UTC

Simple off heap implementation ?

Hi All,

I am an extensive user of Apache Ignite and it has worked well for me in
many scenarios. I was going through the documentation of 
https://apacheignite.readme.io/docs/cache-modes#local-mode
<https://apacheignite.readme.io/docs/cache-modes#local-mode>  

As mentioned in the documentation it is the most light weight mode of cache
operation as the cluster doesn't have to partition or replicate the data to
any other node. This can become a source of very useful offheap
implementation for a client if it becomes a part of the cluster.

So the scenario is this-
Client joins cluster -> stores some data off heap (complemented by
persistent storage) in cache -> uses that data to compute numbers -> destroy
the cache. Repeat all the steps again except the first one.

The question is, is it possible for Client to say that it needs to store the
data on the same client node or the server node running on the same machine
but still be off heap ?

NearCache doesn't solve this as NearCache does involve area of heap to be
used to store the frontend.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Simple off heap implementation ?

Posted by "Maxim.Pudov" <pu...@gmail.com>.
Hi,

To use persistence you need to get familiar with the concept of baseline
topology:
https://apacheignite.readme.io/docs/baseline-topology

It basically means, that you need a fixed set of server nodes to store data.
You can config which node will store partitions of a particular cache by
using
org.apache.ignite.configuration.CacheConfiguration#setNodeFilter

All nodes except one will store real data,  that one will be used for local
cache and computations.

To connect a client to this specific node you can use this configuration:

IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setIgniteInstanceName("client1");
cfg.setClientMode(true);

cfg.setDiscoverySpi(discoverySpi());
cfg.setCommunicationSpi(new
TcpCommunicationSpi().setLocalAddress("0.0.0.0"));
Ignition.start(cfg);

TcpDiscoverySpi discoverySpi() {
        return new TcpDiscoverySpi().setIpFinder(new
TcpDiscoveryVmIpFinder()
            .setAddresses(Arrays.asList("192.168.0.2:47500..47502")));
}

This is only a concept and need to be checked. Hope it will help you.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/