Non-relational database-cassandra-

Source: Internet
Author: User
Keywords OK installation path variable

Cassandra is a mixed relational database, similar to Google's bigtable. Its main function is richer than the dynomite (distributed Key-value Storage System), but the support degree is inferior to the document storage MongoDB (the open source product between the relational database and the non relational database, the relational database has the richest function, most resembles the relational database. The supported data structure is very loose and is a JSON-like Bjson format, so you can store more complex data types. Cassandra was originally developed by Facebook and then turned into an Open-source project. It is an ideal database for online social computing. Based on Amazon's proprietary, fully distributed dynamo, the data model based on the BigTable (column accessibility) of Google is combined. Peer-to-peer to centralized storage. Many aspects can be called Dynamo 2.0.

Main Features:

Distributed

Based on the structure of column

High extensibility

function

The main characteristic of Cassandra is that it is not a database, but a distributed network service composed of a bunch of database nodes, and a write operation to Cassandra will be replicated to other nodes, and the Cassandra read operation will also be routed to a node to read. For a Cassandra cluster, extended performance is a relatively simple thing to do, just add nodes to the cluster.

There are many reasons to choose Cassandra for your site. Compared to other databases, there are three salient features:

Flexible mode: Using Cassandra, like document storage, you don't have to solve the fields in the record ahead of time. You can add or remove fields whenever the system is running. This is an amazing efficiency boost, especially on large deployments.

True scalability: Cassandra is a purely horizontal extension. To add more capacity to the cluster, you can point to another computer. You don't have to reboot any process, change the application query, or migrate any data manually.

Multi-Data Center recognition: You can adjust your node layout to prevent a data center from burning, and an alternate datacenter will have at least a full copy of each record.

Other features that make Cassandra more competitive:

Scope query: If you don't like all of the key-value queries, you can set the scope of the key to query.

List data structure: In mixed mode you can add a super column to 5 dimensions. This is very convenient for each user's index.

Distributed write operations: There is a place to read or write any data at any time. And there will be no single point of failure.

Application clients: Twitter, Facebook

Installation Instructions (Windows)

Take Cassandra 1.0.2 as an example. [1]

1, installation document preparation

Download Cassandra, Jre 1.6. (all recommended latest version)

2. Configure Java

(1) The process of installing the JRE is simple, not explained here.

(2) in System Properties, open the Environment Variables window and add a system variable:

Java_home: Generally C:\Program files\java\jre6, set according to the actual installation path.

3. Configure Cassandra

(1) Unzip the downloaded Cassandra Package and place it in a directory.

Note that the path to the program does not contain spaces to avoid problems that cannot be found by loading certain files.

(2) in System Properties, open the Environment Variables window and add a system variable:

cassandra_home:d:\apache-cassandra-1.0.2, set according to the actual installation path.

(3) Modify the log store address

Open file: log4j-server.properties, modifying

Log4j.appender.r.file=d:\apache-cassandra-1.0.2\system.log, set according to the actual installation path.

(4) Modify other addresses

Open file: Cassandra.yaml, modify:

Data_file_directories:

-D:\apache-cassandra-1.0.2\data

Commitlog_directory:d:\apache-cassandra-1.0.2\commitlog

Saved_caches_directory:d:\apache-cassandra-1.0.2\saved_caches

Set according to the actual installation path.

(5) Modify the memory size and CPU core settings

*)

# assume reasonable defaults for e.g. a xiandai desktop or

# cheap Server

system_memory_in_mb= "4096"

System_cpu_cores= "4"

;;

Set according to the actual situation.

4, start

Start Cassandra in the command prompt tool and use the Nodetool tool to confirm that Cassandra has started:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.