DEV Community

Cover image for Which is better for a CRM? Django with PSQL or NodeJS with MongoDB?
Charanjit Singh
Charanjit Singh

Posted on

Which is better for a CRM? Django with PSQL or NodeJS with MongoDB?

Which one is better? Considering following:

  • Realtime Updates on client [ For Eg. a Contact is updated ]
  • Database Schema could change as per new requirements.
  • Database might need to be sharded in future.
  • REST API for clients.
  • Less[No] Vulneribilities.
  • Easily Integratable with other systems like hubspot.
  • Scheduling and Queue Management.
  • Better Coding experience.
  • Distributed System.
  • Millions of requests per minute.

Top comments (6)

Collapse
 
adnanbabakan profile image
Adnan Babakan (he/him)

Hi,
Once I was assigned to design a realtime online exam website and I decided to use Node.js and MongoDB for 2 reasons: 1- Node.js works perfectly with Socket.io (for realtime connections and updates) 2- MongoDB is not an RDMBS which makes it really fast for realtime connections and its schema can change pretty easily. MongoDB doesn't have a strict schema actually, you can even have different columns for each record (Not encouraged though).
Node.js is very much able to respond to millions of request per minute. Python is a good programming language and Django is awesome. But as far as I know, Python is slower than JavaScript. So consider this as well.
I think your situation is somehow similar to mine back then. So I hope this helps you.

Collapse
 
mattschwartz profile image
Matthew Schwartz

I would almost always pick Django with Postgres first but your realtime updates requirement makes NodeJS the better choice. For large scale projects I find Python + Django a much more pleasant coding experience. NodeJS, though, makes hooking up sockets to the UI for pushing updates very simple.

Collapse
 
cjsingh profile image
Charanjit Singh

There's asgi gut, if we introduce microservices, NodeJS becomes more dominant with mongodb

Collapse
 
amlana24 profile image
amlan

A CRM app will have so many objects like Accounts, Leads, Opportunities etc. There will be xomplex relationships between these object if you need an effective CRM. I dont think Mongo will be a good choice for such complex DB relationships. You will need a relational DB. According to me best choice will be Django with PSql. But there are other aspects to consider too like how do you handle file attachments. So it may be good to have a combination and break out the application in multiple components.

Collapse
 
masterroshan profile image
TJ Johnson

I wonder... Leads and Opportunities could be states. A Lead could be a customer you haven't yet acquired. I'm inclined to think node + mongo is the better choice, although Django 3.0 + ASGI can handle sockets.

Collapse
 
cjsingh profile image
Charanjit Singh

Just curious! about different viewpoints around the globe.