Question-36: What is the purpose of clustering column?

Answer: Assume if you have to retrieve the data in the sorted order, and while querying the data, if sorting is applied it would affect overall performance of the query. So why not store the data in already sorted order. Purpose of the having clustering column is to define rows sorted in a particular partition using clustering columns. Hence, while defining the clustering column you must understand the purpose of the data. For example, if you wanted to retrieve the data based on the last or first transaction then you should store the data based on the time in descending order. Which would help in extracting data faster for the most recent transactions.

Question-37: What is the purpose of materialized view?

Answer: If you want data combine from multiple tables and also want to define a new primary key, without creating a new table and loading the data into this. Then metallized views can be helpful, because using the metalized view you can combine the data from more than one table and even you can define a new primary key on that metalized view based on your query requirement. This is a good approach when you see foreign key requirement and join tables. But as you know, Cassandra does not support the join operation between the table and can be handled using the materialized views.  

Question-38: What happens with the data which is in the metalized view are updated in the underlying table?

Answer: Data in the metalize view is automatically updated when the data for the underlying table is changed. Metalized view means actually you are copying the data from existing tables and creating a new table based on your requirement but that is done by the storage engine itself. And you may not be aware underlying mechanism.

Question-39: How frequently data would be exchanged between the node using the gossip protocol?

Answer: Gossip is a peer to peer communication protocol, and using this node periodically exchange state information about themselves and about other nodes they have the information for. Gossip process runs every second and share messages with up to three other nodes in the cluster. As a result, all the nodes quickly learn about all the other nodes in the cluster. 

Question-40: How gossip knows which information for a particular node is latest or not?

Answer: When information exchanges between nodes using gossip protocol, it always has a version associated. And during save operation older information is overwritten with the most current state for a particular node, based on the associated version detail.