paulgorman.org

< ^ txt

Sat Jul 4 09:50:34 EDT 2015 Slept pretty well. We're supposed to have highs above eighty for the next few days. Ugh. Watched The Terminator on Netflix, which was better that I remembered/feared it might be. The animatronics aged a little poorly. ## Nodejs ## I thought this was an interesting take on a hackernews question about the uses of nodejs: j13z 13 minutes ago > Node is a tool for running Javascript on the server. Your desire to use it will stem entirely upon your desire to write javascript to perform server side tasks. Now that's often what people think of Node.js, but that's not really why Node.js is interesting. It's not just "JavaScript on the browser". Instead, you should think of Node.js more like a JavaScript binding to `libuv`, which is the C library that provides the event-driven I/O core (event loop / queue). (An example for a `libuv` binding in another language, Lua would be `luv` [1].) Reasons why JavaScript was picked for Node.js: 1) It already dealt with events due to its usage in browsers and 2) a fast existing JIT runtime, V8. To answer the original question: You might want to use Node.js if your problem is a good fit for the Reactor pattern [2]. For example, scalable network services that "mediate" between a lot of (async) I/O. Not number crunching. Nginx uses the same core concept (Reactor). [1]: https://github.com/luvit/luv [2]: https://en.wikipedia.org/wiki/Reactor_pattern ## CentOS/RHEL ## I installed a CentOS7 vm today. Pretty nice. One odd thing is that the network link doesn't come up at boot. I had to edit `/etc/sysconfig/network-scripts/ifcfg-eth0`, and change "ONBOOT=no" to "ONBOOT=yes". Easy to fix, but that's a pretty odd default. Hmm. They have a wheel group by default. Nice. I miss that in Debian for some reason.

< ^ txt