项目作者: uuhnaut69
项目描述 :
spring boot data cassandra examples
高级语言: Java
项目地址: git://github.com/uuhnaut69/spring-boot-data-cassandra-example.git
Cassandra-notes
Cassandra is a distributed database management system designed for handling a high volume of structured data across commodity servers.
Cassandra’s design criteria:
- Distributed: Runs on more than one server node.
- Scale linearly: By adding nodes, not more hardware on existing nodes.
- Work globally: A cluster may be geographically distributed.
- Favor writes over reads: Writes are an order of magnitude faster than reads.
- Democratic peer to peer architecture: No master/slave.
- Favor partition tolerance and availability over consistency: Eventually consistent (see the CAP theorem: Here)
- Support fast targeted reads by primary key: Focus on primary key reads alternative paths are very sub-optimal.
- Support data with a defined lifetime: All data in a Cassandra database has a defined lifetime no need to delete it after the lifetime expires the data goes away.
Ideal Cassandra Use Cases:
spring boot data cassandra example
create keyspace
create keyspace testcass with replication={'class':'SimpleStrategy', 'replication_factor':1}
CREATE TABLE customer(
id timeuuid PRIMARY KEY,
name text,
age int,
active boolean
);