ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: Can Ignite be configured to provide an array like replicated and durable map?
Date Thu, 10 Sep 2015 19:16:28 GMT
mfronczyk wrote
> Do I need to use EntryProcessor and invoke if I'll guarantee that all data
> is directly accessible by the client application? My idea is to run Ignite
> embedded in the client, instead of as a remote cluster, to minimise the
> latency, and to have a single backup node to which the data will be
> replicated. Invoke seems like an API to execute operations on the cluster.

I would still recommend to use invoke, because otherwise you will send the
whole updated value to backup(s) which is going to be slow in case you store
all 16384 elements as one entry. Also it looks like you need to configure
cache in replicated mode (see [1]).

[1] https://apacheignite.readme.io/docs/cache-modes#replicated-mode

mfronczyk wrote
> Storing 1 billion elements in separate keys isn't probably the way to go.
> As you said, it'll take much more memory and fetching 16k of objects will
> be slow. If I store 16384 array elements as one cache entry, how will it
> work when a single element is modified? Will it have to replicate the
> whole
> array to the backup node and will it cause writing of the whole array to
> the permanent data store?

It depends on cache atomicity mode (see [2]). In ATOMIC mode the whole value
is sent to backup nodes even if invoke method is used to update it. But in
TRANSACTIONAL mode this never happens and only EntryProcessor instance is
sent across network, so I think you should go with transactional cache. Note
that updates in transactional caches are generally slower that in atomic
caches, but it sounds like you're going to have more reads than updates, so
transactional mode should fit your use case.

[2] https://apacheignite.readme.io/docs/transactions

Let us know if you have more questions.


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Can-Ignite-be-configured-to-provide-an-array-like-replicated-and-durable-map-tp1304p1347.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message