On Tue, Jul 26, 2016 at 5:53 PM, Igor Rudyak <[email protected]> wrote:

> Hi Valentin,
>
> For writeAll/readAll Cassandra cache store implementation uses async
> operations (http://www.datastax.com/dev/blog/java-driver-async-queries)
> and
> futures, which has the best characteristics in terms of performance.
>
>
Thanks, Igor. This link describes the query operations, but I could not
find the mention of writes.


> Cassandra BATCH statement is actually quite often anti-pattern for those
> who come from relational world. BATCH statement concept in Cassandra is
> totally different from relational world and is not for optimizing
> batch/bulk operations. The main purpose of Cassandra BATCH is to keep
> denormalized data in sync. For example when you duplicating the same data
> into several tables. All other cases are not recommended for Cassandra
> batches:
>  -
>
> https://medium.com/@foundev/cassandra-batch-loading-without-the-batch-keyword-40f00e35e23e#.k4xfir8ij
>  -
>
> http://christopher-batey.blogspot.com/2015/02/cassandra-anti-pattern-misuse-of.html
>  - https://inoio.de/blog/2016/01/13/cassandra-to-batch-or-not-to-batch/
>
> It's also good to mention that in CassandraCacheStore implementation
> (actually in CassandraSessionImpl) all operation with Cassandra is wrapped
> in a loop. The reason is in a case of failure it will be performed 20
> attempts to retry the operation with incrementally increasing timeouts
> starting from 100ms and specific exception handling logic (Cassandra hosts
> unavailability and etc.). Thus it provides quite reliable persistence
> mechanism. According to load tests, even on heavily overloaded Cassandra
> cluster (CPU LOAD > 10 per one core) there were no lost
> writes/reads/deletes and maximum 6 attempts to perform one operation.
>

I think that the main point about Cassandra batch operations is not about
reliability, but about performance. If user batches up 100s of updates in 1
Cassandra batch, then it will be a lot faster than doing them 1-by-1 in
Ignite. Wrapping them into Ignite "putAll(...)" call just seems more
logical to me, no?


>
> Igor Rudyak
>
> On Tue, Jul 26, 2016 at 1:58 PM, Valentin Kulichenko <
> [email protected]> wrote:
>
> > Hi Igor,
> >
> > I noticed that current Cassandra store implementation doesn't support
> > batching for writeAll and deleteAll methods, it simply executes all
> updates
> > one by one (asynchronously in parallel).
> >
> > I think it can be useful to provide such support and created a ticket
> [1].
> > Can you please give your input on this? Does it make sense in your
> opinion?
> >
> > [1] https://issues.apache.org/jira/browse/IGNITE-3588
> >
> > -Val
> >
>

Reply via email to