DEV Community

loading...

Discussion on: Deciding a database architecture for a Social Networking use-case?

Collapse
bgadrian profile image
Adrian B.G.

You are on the right track, you will see the improvements over a mySQL-ilike database after you write a few dozens queries. Do not jump on Cassandra unless you have a team of devops and TB of data, is a big gun for big problems.

Few examples:
DGraph - written in Go and fast
Neo4J - big community
OrientDB - SQL like queries.

Here is a comparison between the 3 of them db-engines.com/en/system/Dgraph%3B...
and a list of popularity db-engines.com/en/ranking/graph+dbms

I would prefer a cloud-based managed DB in the first iterations because I don't want to handle the DevOps but nowadays all of them have docker images which makes them very easy to install.

Collapse
presto412 profile image
Priyansh Jain Author • Edited

Hmm, Dgraph does seem promising. I also looked at ArangoDB, and it seems damn nice for a direct transition from MongoDB, since I'm more used to JSON storage. Neo4j is commercial for enterprise and requires learning Cypher queries, and the same goes for ArangoDB.
Neo4j does seem well supported and popular, any issues I have should get resolved.

OrientDB, on the other hand, is free to use but does seem buggy, and some online content does point to the fact that using it in production may fail.

So finally, I think I will have to decide between using OrientDB and ArangoDB. What are your opinions on this?

Collapse
rrampage profile image
Raunak Ramakrishnan • Edited

Just came across this post right now. What did you end up using finally?

I used Arango at my previous workplace to build a "Suggested Friends" feature. Graph queries are a pleasure to write using Arango's Query Language. The database was very performant for our user base of 1 million with around 400 edges per user. We were able to run it on a single instance with 8 GB RAM. It out-performed our previous Postgres-based solution by almost 15 times and reduced a huge Redis instance which we had needed for caching results.

Thread Thread
presto412 profile image
Priyansh Jain Author

Woah. Nice. I ended up with using Postgres and graphql, although I'm not working on the project anymore. The consultant was hell bent on using a cloud managed database such as RDS, and we had to use postgres.

Thread Thread
bgadrian profile image
Adrian B.G.

That is a shame, the devs will have a hard time scaling and querying 4+ deep relationships.

I was in the opposite situation a few months back, as a consultant I recommended a Graph database for a similar project and they ended up using a SQL.

Collapse
rhymes profile image
rhymes

You should probably go through a second phase of research and test them before you commit to one of them.

Managed options could be AWS Neptune and Azure Cosmos DB.

For the opensource options try also to go through their github and see how active they are and what kind of issue tickets they have open.

Thread Thread
presto412 profile image
Priyansh Jain Author

Hmm, the app is more waterfall staged, as in, the deployment will only be taken care of at the end, the MVP is when the entire product development is done.
I'm not sure I should commit to a cloud managed database, while in development, cause if later the requirements change it might load up the work.

Will definitely have a good look at the open-source options before proceeding, thanks!