The Java community is one I know and love,so even though a Nosql database is rarely tied to a language I’m writing this article for you,Java developers around the world. In this article,I’ll show you several options for Nosql databases. After exploring all the options,I’ll narrow the choices down to the top five based on Indeed Jobs,GitHub stars,and Stack Overflow tags. Then I’ll let you know if they’re supported by Spring Data and Spring Boot.
Why Nosql?
Nosql databases have helped many web-scale companies achieve high scalability througheventual consistency: because a Nosql database is often distributed across several machines,with some latency,it guarantees only that all instances will eventually be consistent. Eventually consistent services are often called BASE (basically available,soft state,eventual consistency) services in contrast to traditional ACID properties.
Selecting Nosql Candidates
Defining the top five can be difficult. Many folks have attempted to this recently. See the Research & Notes section at the end of this article for reference.
In mid-August,I told my followers on Twitter that I was writing this article. I asked for good/bad stories about Nosql databases and received a number of options people wanted me to include.
I'm writing an article about Nosql options for@Java developers. I'd be happy to hear what you prefer,as well as good/bad stories in production.
— Matt Raible (@mraible) August 15,2017
I received many suggestions,listed in alphabetical order below:
1. ArangoDB
2. Cassandra
3. Couchbase
4. DynamoDB
5. FaunaDB
6. Hazelcast
7. MongoDB
8. Neo4j
9. Postgresql JSON
10. Redis
11. (JetBrains) Xodus
People also mentioned Hibernate OGM (JPA for Nosql) and NoSQLUnit as tools to help access and test Nosql databases.
Note that I didn’t receive any requests for CouchDB,HBase,Elasticsearch,or Solr. CouchDB and Couchbase are often confused because of similar names,butthey’re quite different. Since CouchDB is a document store,I included it in my rankings. I also added HBase since it is mentioned by ITBusinessEdge,KDnuggets,and DB-Engines (in Research & Notes section). I didn’t include Elasticsearch or Solr because I believe those aren’t often used as the primary data store.
Raible’s Ranking Technique
I used Indeed Jobs,GitHub Stars,Stack Overflow tags,and Docker pulls to develop my system of ranking the top five Nosql databases.
Indeed Jobs
I searched on Indeed Jobs without a location and found very few surprises,save for Amazon’s DynamoDB showing up as a top contender.
Indeed Jobs,September 2017
NOTE: It’s difficult to search for “Postgresql JSON” because most listings specify “Postgresql” as a requirement,not its Nosql support. I searched for “postgres + json”. Xodus is the name of a company,so I had to tack on “JetBrains” to ensure accurate results.
GitHub Stars
I searched and found the top five Nosql options by GitHub stars are Redis,MongoDB,ArangoDB,Neo4j,and Cassandra.
GitHub Stars,September 2017
NOTE: Cassandra,Postgresql are mirrored repositories. DynamoDB,Couchbase,and FaunaDB don’t have their servers on GitHub,so I counted stars for their Java-based drivers. Using number of stars for each option’s Java driver is a good idea,but there’s 11 just for Redis.
You can use Tim Qian’s star-history project to see the star growth of these five.
GitHub Star History
Stack Overflow Tags
I searched on Stack Overflow for tags for each and found that MongoDB and Postgresql are the most popular,followed by Neo4j,Cassandra,and Redis.
Stack Overflow Tags,September 2017
Docker Pulls
I searched on Docker Hub for images and found the stats to be 10M+ for a few,5M+ for Neo4j,and 1M+ for many others. FaunaDB and JetBrains Xodus don’t seem to have images available.
Docker Pulls,September 2017
After gathering this information,it didn’t seem very relevant to include these stats in my ranking. My reason is two-fold: because the numbers aren’t exact and because there weren’t “official” images for each option.
Nosql Options Matrix
I created a matrix to combine jobs,stars,and tags. I awarded 1-5 points based on the ranking they scored in each category. If an option didn’t make the top five,it received a zero. The results – MongoDB,Redis,and Postgresql – are in the table below.
Nosql Option |
Jobs |
Stars |
Tags |
Total |
MongoDB |
5 |
4 |
5 |
14 |
Redis |
3 |
5 |
1 |
9 |
Cassandra |
4 |
1 |
2 |
7 |
Neo4j |
0 |
2 |
3 |
5 |
Postgresql |
0 |
0 |
4 |
4 |
ArangoDB |
0 |
3 |
0 |
3 |
HBase |
2 |
0 |
0 |
2 |
DynamoDB |
1 |
0 |
0 |
1 |
Couchbase |
1 |
0 |
0 |
1 |
CouchDB |
0 |
0 |
0 |
0 |
Hazelcast |
0 |
0 |
0 |
0 |
JetBrains Xodus |
0 |
0 |
0 |
0 |
FaunaDB |
0 |
0 |
0 |
0 |