Live data from Hacker News

A Newbie’s Guide to Cassandra

blog.insightdatascience.com

21–26 of 26 posts

Re: A Newbie’s Guide to Cassandra

#21

> Cassandra’s data model is a partitioned row store with tunable consistency where each row is an instance of a column family that follows the same schema "Total Newbie" apparently means well-versed in database paradigms and terminology.

It's not you, it's the author. That's a horrible way to describe it.

It's partitioned: Cassandra is a clustered database that will automatically route data to the right nodes. It does this by partitioning a token ring among members of the cluster. If you need more capacity, you add nodes and they claim more of the "token ring".

The row store: Cassandra groups data within partitions (see above) which determines which hosts get the data. Within each partition, Cassandra sorts the CQL rows based on your schema. If you had a table of "employees", you could have them partitioned by last initial, and then clustered by last name - all of the employees with last name starting with "J" would be on the same machines, and then they'd be sorted on disk "Ja...", "Je...", etc

Re: A Newbie’s Guide to Cassandra

#22
post #7

> Cassandra’s data model is a partitioned row store with tunable consistency where each row is an instance of a column family that follows the same schema "Total Newbie" apparently means well-versed in database paradigms and terminology.

Agreed. If anyone has recommended resources for someone coming from from SQL world and wanting to learn more about databases like Cassandra and HBase space, please share!

Datastax academy is probably the best free source

Searching YouTube for Cassandra summit talks is probably second

There was a push to do some better docs on the ASF website but it's just manpower that is currently spending time writing code instead - we have no real full time doc writers that focus on the open source product. Maybe some day someone will volunteer (and if you want to volunteer, I'll commit the docs for you - the site has a how to contribute guide, but honestly I'll take GitHub PRs if they're nontrivial even though it's an annoying workflow for our non-GitHub master).

Re: A Newbie’s Guide to Cassandra

#23
post #6

Earlier quoted context omitted.

any recommendation and resources to read up on for when to use cassandra and how to design the schema?

When you need a key value store that can easily and mostly consistently and with low latency replicate across multiple data centers (or aws regions), in multi master setups. In all other cases you'll probably be better off with Postgres, MySQL or similar.

Using Cassandra as a key value store is ok, but ignores one is it's legit strengths.

Re: A Newbie’s Guide to Cassandra

#24
post #15
post #12

Earlier quoted context omitted.

Completely mirrors my experience with Cassandra. I think they'd have a real contender on their hands if operating a cassandra cluster didn't basically take a full time engineer. Its backup story is absolutely abysmal, and tooling is atrocious -- during a support incident a DataStax guy suggested I dump a table with sstable2json (or something like that) which generated a 100GB json file. When I pointed out that basica…

As a long time Cassandra user: people use sstable2json all the time, but most people don't have 100gb sstables (or 20gb sstables that make 100gb of json) Certainly something we can do better - how would you break it up? Adding a key to dump an individual partition to json?

It wasn't that large a database if I remember -- maybe 1TB? The sstable sizes seemed reasonable at the time, I think it was just explosion due to json.

Anywhoo, one huge file is fine, what's not fine is having one huge json object -- streaming parsers might be ubiquitous in the XML world, but definitely not in json land. Something simple like small json documents separated by newlines would work.

Re: A Newbie’s Guide to Cassandra

#25
post #24
post #15

Earlier quoted context omitted.

As a long time Cassandra user: people use sstable2json all the time, but most people don't have 100gb sstables (or 20gb sstables that make 100gb of json) Certainly something we can do better - how would you break it up? Adding a key to dump an individual partition to json?

It wasn't that large a database if I remember -- maybe 1TB? The sstable sizes seemed reasonable at the time, I think it was just explosion due to json. Anywhoo, one huge file is fine, what's not fine is having one huge json object -- streaming parsers might be ubiquitous in the XML world, but definitely not in json land. Something simple like small json documents separated by newlines would work.

https://issues.apache.org/jira/browse/CASSANDRA-13848 Created just for you

Re: A Newbie’s Guide to Cassandra

#26
post #25
post #24

Earlier quoted context omitted.

It wasn't that large a database if I remember -- maybe 1TB? The sstable sizes seemed reasonable at the time, I think it was just explosion due to json. Anywhoo, one huge file is fine, what's not fine is having one huge json object -- streaming parsers might be ubiquitous in the XML world, but definitely not in json land. Something simple like small json documents separated by newlines would work.

https://issues.apache.org/jira/browse/CASSANDRA-13848 Created just for you

What a guy slash gal; cool!
Post reply on HN