Some people ask me privately what a Node is! Let me make a brief introduction (some parts are difficult to explain, so I pasted some from the manual)

  1. Let’s start with Node

You might be able to answer the question “What is Node?” but you probably have another question: “What is Node for?

Node’s stated goal is “to provide an easy way to build scalable network applications.” What’s wrong with the current server program? Let’s do a math problem. In languages such as Java™ and PHP, each connection generates a new thread, and each new thread may require 2 MB of accompanying memory. On a system with 8 GB of RAM, the theoretical maximum number of concurrent connections is 4,000 users. As your customer base grows, you must add more servers if you want your Web application to support more users. Of course, this increases server costs, traffic costs, labor costs, etc. In addition to these cost increases, there is a potential technical problem that users may use different servers for each request, so any shared resources must be shared across all servers. For all of the above reasons, the bottleneck in the overall Web application architecture (traffic, processor speed, and memory speed) is the maximum number of concurrent connections the server can handle

Node claims that it never deadlocks, because it doesn’t allow locks at all, and it doesn’t block I/O calls directly. Node also claims that the server running it can support tens of thousands of concurrent connections.

Node is ideal for situations where you might expect high traffic before responding to a client, but not necessarily much server-side logic and processing is required

Examples of Node performing well include:

  1. RESTful API
  2. Twitter queue
  3. Video game statistics

Node is a server program. However, the base Node product is certainly not like Apache or Tomcat. Essentially, those servers are “setup ready” server products that enable immediate deployment of applications. With these products, you can get a server up and running in a minute. Node is certainly not such a product.

  1. Node: Easy to learn, easy to get started and performs well

    Node.js is JavaScript running on the server side. It can be used for background development, and it is easier to learn on the basis of learning JavaScript. In addition, Node.js is based on Google’s V8 engine, with fast execution and good performance

  2. For a company

    Node.js is an emerging technology, and many companies are looking for people who have some knowledge of Node.js

We will continue to introduce Node to you. For example:

1. Node.js REPL execution environment

2. The use of NPM

3. Node.js callback functions (how callback works)

4. Concepts of blocking and non-blocking in Node.js

5. Node.js event operations

6. Common modules of Node.js

7. Route operations of Node.js

8. Node.js Express framework