First of all its more important to think about other resources.
1) Has an interpreter ( for faster development ) - imo un true
2) Has a compiler ( because compiled code would run faster ) - really ? what about different archs on dev and server machines and deployment ?
3) Has OO capabilities - why ? functional languages are better suited for parallel programming
4) Statically typed - why ? if it has "null" value in type system then there is no difference between this and non statically typed imo.
Better criteria are
- How many good quality libraries are there and frameworks for you to use.
- How you will deploy this solution
- How easy it is to bring new developers to your project
What is the quality of community :)
Ocaml is a great language and with Lwt library you can do async code even while having 1 process easy. Ocaml also is blazing fast! This seems to be nice solutions but you don't have a lot of production ready frameworks.
Erlang has the libraries, its cool, fast and seems to be best solutions for your needs.
Ruby and Ruby On Rails will not enable you to write concurrent code easy but you will be able to build solution fast and start to earn money on it :) I mean like 10 times faster then in other languages because you have ready blocks. Also deployment is easiest in this case.
Node.js great speed, easy to pickup languages ( javascript ) but early stage of development so not many production ready things.
Now this is how i approach solutions:
In terms of performance you have a trade of
- Memory cap
CPU cap
- Memory cap ( ram ) means that solution written in this language will consume more and more ram and in the end you will have to buy new boxes fast and boxes to scale will have to be "fat":)
- CPU cap means that the solution has really agressive garbage colector and allocates a lot of small objects that are cleaned often.
Node.js and Rails in this context are Memory capped, Rails will consume on avg ~250mb of ram per worker on production.
Ocaml / Oscigen , Erlang / Webmachine are CPU capped, most of functional languages will be going this route.
I did small test for webmachine on my macbook pro with i5 CPU https://gist.github.com/1996858
This resource was serving simple json pulled each time from redis without caching.
1 million requests
Total: connections 1000 requests 1000000 replies 1000000 test-duration 463.413 s
Connection rate: 2.2 conn/s (463.4 ms/conn, <=1 concurrent connections)
Connection time [ms]: min 390.6 avg 463.4 max 3245.7 median 453.5 stddev 101.6
Connection time [ms]: connect 0.1
Connection length [replies/conn]: 1000.000
Request rate: 2157.9 req/s (0.5 ms/req)
Now the best part i was monitoring memory usage. it was at about 19.3 mb ram.
If you would ask me i would build prototype in of application in Rails then extract json api's and build them in Erlang using webmachine. Or just build app in Erlang using webmachine and just use some nice features of some ruby libs like capistrano for deployment :)