Apache Cassandra is a top level open source project from Apache Software Foundation. It was developed by Facebook for in-box search,in July 2008 facebook made it open-source. Apcahe included it in Incubator in March 2009 and later in Feb 2010 made it one of its top level project.
Cassandra Architecture is purely basic on one point that Hardware and Software Failures can happened and do happen and hence some mechanism should be implemented to deal with these scenarios without affecting the output.
When a write request comes to any node in a Cassandra cluster, the node is called Coordinator for the request and acts as a proxy between the client and the replicas throughout the request cycle.
Apache Cassandra is one the most popular No Sql database to manage large amount of structured, semi structures and un structured data across multiple data centers and the cloud. Cassandra is a write friendly nosql database to provide linear scalability, continuous availability and implementable simplicity across many commodity servers with no single point of failure.
In previous article we came across how to install and run a single node Cassandra cluster in Ubuntu. In this article we will come across how to setup a multi-node cluster on Ubuntu. We will try to create a cluster using 5 different machines to make a ring of 5 nodes.
Gossip is a peer-to-peer communication protocol that helps all the nodes to communicate and exchange state information of them and other another nodes they know about. This communication keeps on running every second and passed state inflammation to up to three nodes in the cluster. This process of exchanging state data of their own and other nodes they know about keeps all the nodes up to date.
In Cassandra a keyspace can be considered as a scheme in Relational Database. Keyspaces are basically the containers for application data; they holds a group of similar column-families(tables in rdbms) all together. Generally a cluster has one keyspace per application and all the application data goes in it.
In Cassandra a table is known as column-family, column-families consists of rows and columns as in any relational Database. Cassandra tables can have a single or compound primary key, in this article we will see how to create a table in Cassandra with single primary key and compound primary key.
Till now, we have seen how to create a Cassandra keyspace, how to show all the tables of a keyspace, how to create a new table in keyspace and how to show structure of tables in a keyspace. In this particular article we will see, how to insert a record in Cassandra tables to store application table. We will use already created table ?student? to insert a few rows of data.