by axod · 15y ago · 0 comments
It's not rocket science, it's mainly plumbing - moving data around.
Some people are often too quick to try and emulate people/products by picking out some magical quality, using it, and expecting identical results.
It's just like women who latch onto fashion tips/diet tips from celebs - eg "Oooo Angelina Jolie used the X diet. If I use that, I can be like her".
Similarly, some techies think "Ooo facebook used Erlang. If I use Erlang, I won't have any problems scaling".
It's certainly more in how you approach things, and how you architect things than which particular tool you choose to use. There is no magic solution.
FWIW, I run Mibbit which handles a good number of users and messages per second on a few servers. Not facebook numbers yet, but not small either. I think we do a few billion messages a month.
All those evented frameworks are single-threaded. All my servers have at least 16 cores and in few years they'll have 256 cores and more.
Good luck handling 256 instances of node.js per server.
Good luck connecting all your nodes into distributed cluster.
The only real competition for Erlang in this case is Jetty/Netty with Java or Scala.
Erlang/OTP is just a tool. You still need to work very hard to build a system like Facebook Chat!
Facebook chat doesn't use CPU. Why would it need 16 cores? It's more than likely IO bound. It's just moving boring data around.
If you're using serious CPU power to write a chat backend, you're doing something really badly or using a crappy tool.
Your "But I need more CPU cores!!!" argument is moot.
If you're not using the right tools, for the right job, you're incompetent.