Need advice about which tool to choose?Ask the StackShare community!
Cassandra vs Neo4j: What are the differences?
What is Cassandra? A partitioned row store. Rows are organized into tables with a required primary key. Partitioning means that Cassandra can distribute your data across multiple machines in an application-transparent matter. Cassandra will automatically repartition as machines are added and removed from the cluster. Row store means that like relational databases, Cassandra organizes data by rows and columns. The Cassandra Query Language (CQL) is a close relative of SQL.
What is Neo4j? The world’s leading Graph Database. Neo4j stores data in nodes connected by directed, typed relationships with properties on both, also known as a Property Graph. It is a high performance graph store with all the features expected of a mature and robust database, like a friendly query language and ACID transactions.
Cassandra can be classified as a tool in the "Databases" category, while Neo4j is grouped under "Graph Databases".
"Distributed" is the top reason why over 96 developers like Cassandra, while over 55 developers mention "Cypher – graph query language" as the leading cause for choosing Neo4j.
Cassandra and Neo4j are both open source tools. It seems that Neo4j with 6.61K GitHub stars and 1.63K forks on GitHub has more adoption than Cassandra with 5.27K GitHub stars and 2.35K GitHub forks.
According to the StackShare community, Cassandra has a broader approval, being mentioned in 342 company stacks & 240 developers stacks; compared to Neo4j, which is listed in 114 company stacks and 47 developer stacks.
The problem I have is - we need to process & change(update/insert) 55M Data every 2 min and this updated data to be available for Rest API for Filtering / Selection. Response time for Rest API should be less than 1 sec.
The most important factors for me are processing and storing time of 2 min. There need to be 2 views of Data One is for Selection & 2. Changed data.
i love syclla for pet projects however it's license which is based on server model is an issue. thus i recommend cassandra
Scylla can handle 1M/s events with a simple data model quite easily. The api to query is CQL, we have REST api but that's for control/monitoring
By 55M do you mean 55 million entity changes per 2 minutes? It is relatively high, means almost 460k per second. If I had to choose between Scylla or Cassandra, I would opt for Scylla as it is promising better performance for simple operations. However, maybe it would be worth to consider yet another alternative technology. Take into consideration required consistency, reliability and high availability and you may realize that there are more suitable once. Rest API should not be the main driver, because you can always develop the API yourself, if not supported by given technology.
Cassandra is quite capable of the task, in a highly available way, given appropriate scaling of the system. Remember that updates are only inserts, and that efficient retrieval is only by key (which can be a complex key). Talking of keys, make sure that the keys are well distributed.
Pros of Cassandra
- Distributed119
- High performance97
- High availability81
- Easy scalability74
- Replication52
- Reliable26
- Multi datacenter deployments26
- Schema optional10
- OLTP9
- Open source8
- Workload separation (via MDC)2
- Fast1
Pros of Neo4j
- Cypher – graph query language70
- Great graphdb61
- Open source33
- Rest api31
- High-Performance Native API27
- ACID23
- Easy setup21
- Great support17
- Clustering11
- Hot Backups9
- Great Web Admin UI8
- Powerful, flexible data model7
- Mature7
- Embeddable6
- Easy to Use and Model5
- Best Graphdb4
- Highly-available4
- It's awesome, I wanted to try it2
- Great onboarding process2
- Great query language and built in data browser2
- Used by Crunchbase2
Sign up to add or upvote prosMake informed product decisions
Cons of Cassandra
- Reliability of replication3
- Size1
- Updates1
Cons of Neo4j
- Comparably slow9
- Can't store a vertex as JSON4
- Doesn't have a managed cloud service at low cost1