You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Raja <ye...@gmail.com> on 2017/06/08 21:15:19 UTC

Updating a PART(one field) of the "value" object at scale

        CacheConfiguration<Long, Datum> cfg = new CacheConfiguration<Long,
Datum>();
        cfg.setName(DATUM_CACHE);
        cfg.setIndexedTypes(Long.class, Datum.class);
        cfg.setCacheMode(CacheMode.PARTITIONED);
        cfg.setBackups(1);
        cfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
        cfg.setRebalanceMode(CacheRebalanceMode.ASYNC);
        cfg.setRebalanceBatchSize(2 * 1024 * 1024);
        cfg.setRebalanceThrottle(100);
        cfg.setRebalanceTimeout(20);


*Problem Context:*
-------------------
The Datum object has 10 fields in it and cache contains 60 million entries.
Every minute 1 field of Datum object gets updated. Instead of bringing the
whole 'Datum" object and updating that one filed, wanted to SEND that update
to the node which hosts that entry. The above cache configuration is used

I'm doing that with the below code
*IgniteCompute igniteCompute =
ignite.compute().withAsync().withTimeout(10000);
igniteCompute.affinityRun(DATUM_CACHE, datumId, new
DatumCacheUpdater(datumId, value));*

It works, but slow. At 6 million per minute, the ignite cluster becomes
slow. 

My question is there a better approach to the above problem and at scale we
should be able to update a part of the object ?

Appreciate your input into this.

Thank you
Raja







--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Updating-a-PART-one-field-of-the-value-object-at-scale-tp13534.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Updating a PART(one field) of the "value" object at scale

Posted by vkulichenko <va...@gmail.com>.
Raja,

First of all, it sounds like entry processor fits your use case a bit
better: https://apacheignite.readme.io/docs/jcache#entryprocessor

But in any case, you should debug and profile your execution first. Is
everything working as expected? What is taking time? Etc.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Updating-a-PART-one-field-of-the-value-object-at-scale-tp13534p13537.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.