官术网_书友最值得收藏!

Chapter 1. About Node

Node is an exciting new platform for developing web applications, application servers, any sort of network server or client, and general purpose programming. It is designed for extreme scalability in networked applications through an ingenious combination of server-side JavaScript, asynchronous I/O, and asynchronous programming, and is built around JavaScript anonymous functions, and a single execution thread event-driven architecture.

The Node model is very different from common application server platforms that scale using threads. The claim is that, because of the event-driven architecture, the memory footprint is low, the throughput is high, the latency profile under load is better, and the programming model is simpler. The Node platform is in a phase of rapid growth, and many are seeing it as a compelling alternative to the traditional—Apache, Java, PHP, Python, Ruby on Rails, and so on—approach to building web applications.

At heart it is a standalone JavaScript virtual machine, with extensions making it suitable for general purpose programming, and with a clear focus on application server development. The Node platform isn't directly comparable to programming languages frequently used for developing web applications, and neither is it directly comparable to the containers which deliver the HTTP protocol to web clients (Apache httpd, Tomcat, GlassFish, and so on). At the same time, many regard it as potentially supplanting the traditional web application development stacks.

It is implemented around a non-blocking I/O event loop and a layer of file and network I/O libraries, all built on top of the V8 JavaScript engine (from the Chrome web browser). The I/O library is enough to implement any sort of server implementing any TCP or UDP protocol, such as, DNS, HTTP, IRC, or FTP. While it supports developing servers or clients for any network protocol, the biggest use case is in regular websites in place of a technology such as an Apache/PHP or Rails stack, or to complement existing websites. For example, adding real-time chat or monitoring to existing websites can be easily done with the Socket.IO library for Node.

This book will give you an introduction to Node. We presume that you already know how to write software, are familiar with JavaScript, and know something about developing web applications in other languages. We will dive right into developing working applications and recognize that often the best way to learn is by rummaging around in working code.

主站蜘蛛池模板: 波密县| 临泉县| 麻城市| 平南县| 页游| 娱乐| 宜兰县| 保山市| 霞浦县| 凤翔县| 天水市| 阳西县| 禄劝| 铜川市| 张家港市| 客服| 大丰市| 甘泉县| 寻乌县| 乡城县| 绥棱县| 泰安市| 汾西县| 寿光市| 噶尔县| 沙湾县| 大余县| 安阳市| 南充市| 西宁市| 华池县| 收藏| 即墨市| 浮山县| 准格尔旗| 厦门市| 铅山县| 建湖县| 武城县| 新民市| 搜索|