7 ms·
I wonder if they have been experimenting with Node.JS.
by mcs 16y ago
I wonder if they have been experimenting with Node.JS.
- kennu 16y agoNode.js is nice for evented I/O, but does it solve any of the other problems Erlang is good at, such as distributed parallel processing? How do you scale a Node.js-based service horizontally over many servers?
- axod 16y agoYou could write facebook chat in pretty much any half decent language. The question is how competent the developers are rather than what tool they decide to use. It's not rocket science, it's mainly plumbing - moving data around.
- nivertech 16y agoif you have unlimited resources and huge datacenters - maybe you can. Try to calculate have many nodes will you need to implement COMET-like chat system for 500M users, especially when you using Python or Ruby with some async IO evented framework.
- axod 16y agoI don't think that's the case. Facebook are the ones with 10,000 servers (probably a lot more now idk). 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.
- nivertech 16y agoI don't give a shit about Facebook! I use Erlang since Ericsson using it since 80-ies. It's already 12 years since Ericsson open-sourced it. 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!
- riprock 16y agoThere's also C++ implementations like boost::asio which would work and scale just fine too. There was a HN post discussing Alex Payne's blog on how node.js is "scaling in the small." http://news.ycombinator.com/item?id=1552908 http://news.ycombinator.com/item?id=1552908 http://al3x.net/2010/07/27/node.html http://al3x.net/2010/07/27/node.html
- axod 16y agoI'm not sure what your point here is. 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.
- nivertech 16y agoI don't need more CPUs. But can you find a single core machine nova days? Most of the servers are 16 cores, which in case of evented framework will be heavily underutilized.
- axod 16y ago> "which in case of evented framework will be heavily underutilized." I'm not following your logic here. If something doesn't need 16 CPUs, why is splitting it over 16 cores a good idea? You're going to be adding a lot of inefficiency, complexity etc for no gain. Most of mine are dual or possibly 4 core. One core for OS stuff, other processes etc, one core to do networking IO for me. As I say, networking IO shouldn't be using CPU. If you're doing long or blocking jobs, pass it over to some other thread. (That's a far better way to utilize multiple cores than splitting the whole networking IO over multiple cores).
- deleted 16y ago[deleted]
- jaxtapose 16y agoHow much do you know about Erlang? Because, anybody competent with the tools of distributed systems would know that Erlang is one of the best tools for the job. You could spend a decade, or more, building the base level functionality that comes stock standard in Erlang. If you're not using the right tools, for the right job, you're incompetent.
- revoltingx 16y agoUm, no. Perhaps at the beginning you will mainly be moving around but as use cases get more complex you will find yourself processing more and more data. (i.e. filtering info, generating hashes, gathering statistics, etc.) Not only that, but i bet that most of the data is on RAM cache, and not bound by network io. That is, initial data load time is minimal and the only new data is whatever the user typed. You can log this in the background so the user doesn't wait for the data to be saved to disk or to a network. So, a decently designed app like this will probably not be much network bound and will be cpu/memory bound. With Erlang and a multicore machine you can really get the bang out of your buck like this.
- puzza007 16y agoI'm not sure that would provide any advantages over Erlang. There's a nice discussion here: http://erlang.2086793.n4.nabble.com/node-js-compared-to-erlang-td2953290.html http://erlang.2086793.n4.nabble.com/node-js-compared-to-erla...
- okaramian 16y agoThere is also the issue of Facebook chat being rolled out in 2008, which I'm assuming Node.js didn't exist by. Node.js would need to provide a significant gain in order to justify refactoring that system.