Is it a good strategy to accumulate in webserver memory upto a specific limit of data over time that is being written to the database & send it as batch updates after every specified interval or after data grows bigger than threshold size.
Such kind of data would be very small like just adding a relationship between two entities which means adding just a set of ids to the rows.
(Of course, the delayed data should be such that is not expected to be immediately visible).
Are there any disadvantages of this approach ?
Usage: Building web application using Cassandra DB, with Java & JSF.
Short answer: this is a bad idea.
Cassandra’s batch operations (e.g. http://pycassa.github.com/pycassa/api/pycassa/batch.html) are there to allow you to group updates in an idempotent unit. This allows you to retry the batch as a unit, so the purpose is roughly similar to a transaction in a relational database.
However, unlike the transaction analogy, the impact on performance is negligible and in fact making the load artificially “bursty” is usually counterproductive.