Node.js + Coffeescript = computing awesomeness

http://nodejs.org/

http://jashkenas.github.com/coffee-script/

From the Node.js website:

“Node’s goal is to provide an easy way to build scalable network programs. In the “hello world” web server example above, many client connections can be handled concurrently. Node tells the operating system (through epoll, kqueue, /dev/poll, or select) that it should be notified when a new connection is made, and then it goes to sleep. If someone new connects, then it executes the callback. Each connection is only a small heap allocation.

This is in contrast to today’s more common concurrency model where OS threads are employed. Thread-based networking is relatively inefficient and very difficult to use. See: this and this. Node will show much better memory efficiency under high-loads than systems which allocate 2mb thread stacks for each connection. Furthermore, users of Node are free from worries of dead-locking the process—there are no locks. Almost no function in Node directly performs I/O, so the process never blocks. Because nothing blocks, less-than-expert programmers are able to develop fast systems.”

I totally agree with the event machine, no-blocking approach, and that something like this was needed to improve the coding experience.

A few thoughts:

V8 Javascript is basically a compiled language: so we get binary speed with abstraction of Javascript

CoffeeScript is used which gives the clean and readable code replacing Javascript yet compiles through to machine code

 

 

Advertisements

2 Comments »

  1. Excellent post. I absolutely love this website. Keep it up!

  2. magnificent submit, very informative. I ponder why the opposite experts of this sector do not realize this. You must proceed your writing. I’m sure, you’ve a great readers’ base already!|

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: