Hi all,

I have a following scenario to cater to. I have a typical client-server
application.
I have 5 different physical boxes and every box hosts 2 JVMs of "server"
M1-> JVM1,JVM2
M2-> JVM3,JVM4
M3-> JVM5,JVM6
M4-> JVM7,JVM8
M5-> JVM9,JVM10

Whenever a request comes on any machine (via loadbalancer) say M1 and say
JVM1 caters to the request, it generates a time series data and sends it
back to the client. The computation is quite time consuming. In order to
serve fast to the clients, I have decided to use Ignite Data Grid and once
the response is generated, I will store the response in a data grid. For the
same (keeping in mind RAM available on the boxes), I have decided to
introduce Ignite Data Grids on M1,M2 and M3 running with an Xmx of 2 GB but
with Persistent Store enabled. Hence the configuration will look like

M1-> JVM1,JVM2,DataGrid1
M2-> JVM3,JVM4,DataGrid2
M3-> JVM5,JVM6,DataGrid3
M4-> JVM7,JVM8
M5-> JVM9,JVM10

Every client is going to create its own cache (based on the id of the
dataset in question) on these data grids, irrespective of whether the
request comes from M1 (having a data grid) or M5 (Not having a data grid).
If the request comes again for the same dataset id in question, it will look
for the cache and get the data already present in ignite and will skip
lengthy computation of hours which it had to do earlier.

Following is the protocol i have to follow 

1) Bulk insert data into cache by JVM1 (data around 5GB)
2) Bulk retrieve data by JVM5 from cache (data around 5GB)

If inserts throw an exception for any reason on this earth, drop the cache
for that id and try one more time. If any exception happens, fallback and do
not try again. If retrieve throw an exception, recompute.

QUESTIONS:
QUESTION 1
Based on the documentation
https://apacheignite.readme.io/v2.1/docs/transactions#atomicity-mode, I will 
go for CacheAtomicityMode as ATOMIC. But If there is a
PartialUpdateException, then what is desirable putAll or just iterate over
the keys which have failed and put them in the cache and how do we
understand the actual cause of Partial Failure because it is likely to
happen again if I re-do a putAll even with a list of failed keys ?

QUESTION2
I have read with the Metrics interfaces Ignite has provided but If I have to
check what's the size of data of a particular cache in persistent store and
what percentage of that data is also available on RAM , how can I do that ?

QUESTION 3
Keeping in mind the above scenario wherein bulk inserts and retrievals are
required, is it better to have a replicated mode rather than partitioned
modes with back ups enabled since the data loss is not acceptable, it should
be binary 0 or 1. So if M1 AND M2 go down or DataGrid1 AND DataGrid2
processes crash during or before the retrieval, at least we can depend upon
M3 and DataGrid3.

QUESTION4
Keeping in mind, if I go for REPLICATION, which property do we set to ensure
that data was replicated properly while bulk inserts and JVM1 WAITS for
replication to be successful and then do any move ahead.


QUESTION5
The api available with Ignite class is getOrCreateCache, how do we just
check whether a cache with name "X" has been created or not ?

Thank you for the patience to read through.








--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/CacheAtomicityMode-and-CacheMode-tp16313.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to