A demo CRM for my talk on "The Thick Front-End".
There are 5 applications in this series:
- CRM Rails. A standard Rails app with no ajax and an API. Shows the baseline of how most apps are developed today.
- CRM Rails-jQuery. A fork of CRM Rails that uses basecamp-style ajax.
- CRM Angular. An Angular.js app that interfaces to either CRM Rails or CRM node.js.
- CRM node.js. A drop-in replacement for the CRM Rails API written in node.js.
- CRM Scala. A drop-in replacement for the CRM Rails API written in Scala with Play.
DO NOT READ TOO MUCH INTO THESE. This was just me playing around writing super contrived applications. You should try these experiments (and more!) yourself to determine what the right stack for your application is. I'm not trying to prove a point about anything here, just having fun.
Framework | Database | Notes | Hits | Response Time |
---|---|---|---|---|
Rails (Webrick) | PostgreSQL | HTML | 5814 | 199ms |
Rails (Thin) | PostgreSQL | HTML | 8256 | 177ms |
Rails (Webrick) | PostgreSQL | 5722 | 278ms | |
Rails (Thin) | PostgreSQL | 6525 | 431ms | |
Rails (unicorn 3x) | PostgreSQL | 16060 | 252ms | |
Rails (unicorn 4x) | PostgreSQL | 13439 | 315ms | |
Rails (puma/jruby) | PostgreSQL | 3437 | 512ms | |
Rails (Thin) | MongoDB | no orm | 4875 | 560ms |
Sinatra (Thin) | MongoDB | no orm | 12455 | 173ms |
Sinatra (puma) | MongoDB | no orm | 8585 | 234ms |
Sinatra (unicorn 10x, 1000 users) | MongoDB | no orm | 28215 | 42ms |
Sinatra (unicorn 10x, 2000 users) | MongoDB | no orm | 46286 | 205ms |
Sinatra (unicorn 10x, 4000 users) | MongoDB | no orm | 65494 | 152ms |
Sinatra (unicorn 20x, 5000 users) | MongoDB | no orm | 65907 | 291ms |
node.js | PostgreSQL | 26080 | 100ms | |
node.js (1000 users) | MongoDB | 27304 | 71ms | |
node.js (2000 users) | MongoDB | 46064 | 198ms | |
node.js (4000 users) | MongoDB | 52390 | 246ms | |
Scala/Play | MongoDB | 25811 | 68ms | |
Scala/Play (4000 users) | MongoDB | 84012 | 60ms |
- anything not marked as 'HTML' was hitting
api/v1/customers.json
. - node.js tests never used an orm
- It's very interesting that rails + mongo was slower than rails + pg since you'd think mongo would be faster, and that there was no ORM with mongo. This was repeatable too.
Rails (Webrick) + PostgreSQL + HTML
Rails (Thin) + PostgreSQL + HTML
Rails (unicorn 4x) + PostgreSQL
Sinatra (unicorn 10x) + MongoDB
Sinatra (unicorn 10x 2000 users) + MongoDB
Sinatra (unicorn 10x 4000 users) + MongoDB
Sinatra (unicorn 20x 5000 users) + MongoDB
Scala (Play) + MongoDB 1000 users