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)

adnanbabakan profile image
Adnan Babakan (he/him)

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 (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.

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.

cjsingh profile image
Charanjit Singh

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

amlana24 profile image

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.

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.

cjsingh profile image
Charanjit Singh

Just curious! about different viewpoints around the globe.

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.