I’ve been looking att different web stacks, mainly rails and node.js. One thing that strikes me is that while rails is often used with a relational database Node.js seem to go hand in hand with Mongodb, judging by the blogosphere.
Is there a specific reason for this? I like the modularity of node but I’m also sceptical to NOSQL. I get the feeling that if having a rdbms is important I should use rails since they seem to be a second class citizen in the node ecosystem.
Because they’re both JavaScript. There’s no other real benefit to using Node and Mongo – feel free to use another RDBMS supported by Node.
Node has https://npmjs.org/package/mysql, which will probably be less fast than Ruby’s drivers (it’s slower than PHP’s), and https://github.com/brianc/node-postgres, which I don’t have any experience with.
There is also Sequelize, http://www.sequelizejs.com, which supports postgres and SQLite, and is a bit of a clone of ORMs from other languages.
3
I think it has to do mostly with the cutting edge nature of both solutions, so they get talked about in the same places.
Another might be the problem domain that both are solving are similar (dealing with sets of data that may have varying properties).
Both are also used to a varying degree on projects that have a narrow focus.
Larger projects with larger data domains are more likely (but not necessarily) going to use a more robust framework and have requirements that fit better with a relational database.
3