3

What is node.js based on, under the hood? Is it written from scratch, or is it based on another project?

(Also, can anybody pinpoint the web server technology that makes the http module?)

John K
  • 28,441
  • 31
  • 139
  • 229
  • On youtube: [Ryan Dahl - History of Node.js](http://www.youtube.com/watch?v=SAc0vQCC6UQ#t=7m) – miku Apr 05 '12 at 04:18
  • @Michael Petrotta, I feel your edit made the question less focused because it broadened my question from web server technology to encompass the entire underpinnings. However I don't mind, if I can find out about the web server technology implementation through these answers. The way you've phrased it more broadly, there is a place here for that kind of question. – John K Apr 05 '12 at 14:30
  • I didn't mean to damage your question, John, sorry about that. Looks like you've edited it as desired. – Michael Petrotta Apr 06 '12 at 01:12

2 Answers2

10

...is it based on another project?

Node.js leverages a couple of projects:

Via: http://blog.zorinaq.com/?e=34

miku
  • 181,842
  • 47
  • 306
  • 310
3

Node.js is a event driven platform built on top of Chrome V8 javascript engine.

Its based on similar platforms built in other languages, for example Twisted in Python, EventMachine in Ruby or libevent in C.

Its written from scratch. You can read more about it here http://nodejs.org/about/. You can also join the nodejs developer mailing lists if you want a slightly deeper answer.


Specifically, about the node.js http server, extracted from Node about page linked above:

HTTP is a first class protocol in Node. Node's HTTP library has grown out of the author's experiences developing and working with web servers. For example, streaming data through most web frameworks is impossible. Node attempts to correct these problems in its HTTP parser and API. Coupled with Node's purely evented infrastructure, it makes a good foundation for web libraries or frameworks.

John K
  • 28,441
  • 31
  • 139
  • 229
Rishav Rastogi
  • 15,484
  • 3
  • 42
  • 47