반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리

Key concepts and data model

2015. 12. 11. 11:29 | Posted by 솔웅


반응형

카산드라에서 사용되는 주요 개념들 정리해 보겠습니다.


Key concepts and data model






Key concepts

The following concepts are important for understanding Cassandra:

Cluster
    A group of nodes where you store your data. In this guide, you create a single-node cluster.
   
    데이터를 저장하는 노드들의 그룹이다.

   
Replication

    The process of storing copies of data on multiple nodes to ensure reliability and fault tolerance. The number of copies is set by the replication factor.

    여러 노드들에 데이터의 복사본을 저장하는 프로세스. 이렇게 함으로서 안정성과 fault tolerance (내고장성 耐故障性)을 보장할 수 있다. 복사본의 수는 replication factor에 의해 세팅된다.

   
Partitioner

    A partitioner distributes data evenly across the nodes in the cluster for load balancing.

    partitioner는 로드발란스를 위해 클러스트에 있는 노드들에 데이터가 고르게 분산되도록 조절한다.

   
Data Center
   
    A group of related nodes configured together within a cluster for replication purposes. It is not necessarily a physical data center. In DataStax Enterprise, the term related nodes refers to the type of node: transactional, analytics, search. Each type of node must be contained in its own data center.
   
    replication을 위해 클러스트 안에 설정된 연결된 노드들의 그룹이다. 꼭 물리적인 데이터 센터로 구분될 필요는 없다. DataStax Enterprise에서는 transactional, analytics, search 등의 노드 타입과 관련된 노드들을 가리킨다. 각 노드의 타입은 속해있는 데이터 센터에 포함돼 있어야 한다.

   
Links to related information in Cassandra


   
The data model distilled


Cassandra is a partitioned row store. It is an open-source, distributed-database system that is designed for storing and managing large amounts of data across commodity servers.

카산드라는 분할된 행의 저장공간이다. 오픈소스이며 범용서버에서 대량의 데이터를 저장하고 관리하기 위해 디자인된 분산 데이터베이스 시스템이다.


You design the data model

    The design of the data model is based on the queries you want to perform, not on modelling entities and relationships like you do for relational databases.

    데이터 모델의 디자인은 실행하고자 하는 쿼리에 기반한다. modelling entity 와 relationship에 기반한 관계형데이터베이스와는 다르다.

   
Column family
   
    In general, the term Table has replaced Column family. A Cassandra database consists of column families. A column family is a set of key-value pairs. Every column family has a key and consists of columns and rows. You can think of column family as a table and a key-value pair as a record in a table.
   
    일반적으로 얘기하는 Table은 카산드라에서는 Column family 가 그 역할을 한다. 카산드라 데이터베이스는 이러한 column family들로 구성된다. column family는 key-value pair들로 구성 돼 있다. 각 column family는 key와 column/row 들로 구성돼 있다. 이 column family는 관계형데이터베이스에서의 table 이라고 생각하면 된다. 그리고 key-value pair는 테이블의 record라고 생각하면 된다.
   
    Note: In CQL 3 (the latest implementation of the Cassandra Query Language), column families are called tables. The Cassandra CLI client utility (deprecated) , API classes, and OpsCenter continue to use column family.
   
    Note : CQL3에서는 column family를 table 이라고 부른다. Cassandra CLI client utility (deprecated) , API classes, 그리고  OpsCenter 에서는 계속 column family라고 부른다.

   
Table
   
    The definition of a table depends on the version of CQL:
   
    table에 대한 정의는 CQL 버전에 의존한다.

   
        In CQL 3, a table is a collection of ordered (by name) columns.
        In previous versions of CQL, a column family was synonymous, in many respects, to a table. In CQL 3 a table is sparse, which means it only includes columns for rows that have been assigned a value.

        CQL 3에서는 name에 의해 정렬된 column들의 집합이다.
        그 이전 버전의 CQL 에서는 column family는 table 과 거의 동의어로 사용됐다. CQL 3 에서 table은 값이 할당된 row들에 대한 column들을 포함하고 있다는 의미가 들어있다.



     
Keyspaces
   
    The outermost grouping of data, similar to a schema in a relational database. All tables go inside a keyspace. Typically, a cluster has one keyspace per application.
   
    outermost grouping of data 로 관계형 데이터베이스의 Schema 와 비슷하다. 모든 테이블들은 keyspace 안에 있게 된다. 일반적으로 어플리케이션 당 하나의 클러스터는 하나의 keyspace를 갖는다.
   



http://www.slideshare.net/planetcassandra/apache-cassandra-and-datastax-enterprise-explained-with-peter-halliday-at-wildhacks-nu


위 링크로 가시면 슬라이드를 볼 수 있는데 그 중에서 나오는 개념 몇개 옮겨봅니다.


   
Snitches
   
    Snitch는 어떤 데이터센터와 rack 에 write 하고 read 할 것인지 결정한다.

   
Gossip = Internode Communications
   
    매 순간 어떤 노드와 정보를 exchange 할 것인지에 대한 peer to peer communication protocol
    카산드라는 이 gossip을 카산드라 클러스터에 있는 다른 노드들에 대한 위치와 상태정보를 알아내는데 사용한다.


Vnodes (Vertual Nodes)   

    각 노드가 single token range를 가지는 대신 Vnode는 각 노드를 많은 range (256) 로 나눈다.



그리고 회의 하다가 나온 얘긴데 Spark 을 사용하면 테이블 간 join 사용 효과를 낼 수 있다고 합니다.
   
Apache Spark

        테이블간 join 할 수 있도록 해 준다.
   

   

반응형