• Make node.js Core Bigger
  • Originally written by Mikeal
  • The Nuggets translation Project
  • Translator: imink
  • Proofread by jifaxu FrankXiong

Defend the use of a more powerful Node.js core

Node.js has the smallest standard library compared to other platforms. Combined with powerful ecological tools such as NPM, Node.js has been a huge success.

This success has led to a culture of Node.js development that tends to use smaller reusable modules, larger ecosystems, and smaller core libraries. There have been calls to make node.js’s core library smaller.

Spotlight #6: “Small Core” – Keeping Node Core Small with Sam Roberts and Thomas Watson

Getting people excited about the ecosystem is what Node.js is good at, and the standard specification of Node.js for third-party libraries helps the ecosystem a lot.

As new technologies continue to emerge, the Node.js core needs to establish a standard specification for compatibility so that the Node.js ecosystem can flourish.

Not using require(‘ HTTP ‘) would be a disaster.

When Node.js first emerged, all similar platforms had a canonical way of associating HTTP “servers” with “frameworks.”

CGI (Perl), WSGI (Python), and Rack (Ruby) are essentially the same thing, and programmers build apis through Web frameworks to analyze HTTP. This is especially important for low-concurrency platforms, where programmers can rely on external Web servers (Apache, Nginx, etc) to manage incoming connections while parsing HTTP.

When Node.js started in 2009, CommonJS had already defined a similar specification for JavaScript called JSGI. Service support for the specification already exists on other JS platforms, such as Narwhal, and implementations of node.js versions are coming soon.

Isaacs, an early Node.js contributor and later NPM author, developed a version of JSGI called EJSGI (EVented-JsGi) that is compatible with node.js’s asynchronous concurrency model; But this is not the end of Node.js.

In contrast, Node.js goes further than other platforms. Node.js basically defines the “framework” layer of apis and ties it to the entire server implementation. On the surface, Node.js has a smaller standard library than its contemporaries, but it actually goes further than it did in its early days.

Standardization is at the core

There is definitely a burden of maintaining reference Implementations of the standard library sample implementation. Node.js’s built-in Stream library is always several versions behind NPM. But that doesn’t mean he’s not part of the core

In order for the library to be truly scalable and reliable in the ecosystem, these standards and specifications must be incorporated into the core. There are many excellent standard libraries out there outside the node.js core library ecosystem, but none of them are being taken for granted.

The Abstract Blob Store is an excellent standard library that I wouldn’t miss. However, many influential Node.js developers feel that it is not yet reliable enough to use in specific projects. Several cloud service providers still don’t have implementations of the library, and it is far from being used by default compared to the standard libraries that have been normalized by the core of Node.js.

The reason we keep many libraries out of the core library is to encourage innovation in the ecosystem. Normalization is a process that does not promote a particular type of innovation. By incorporating these standard specifications into the core of Node.js, we hope to prevent competition between specifications in the ecosystem.

In the future, we will add some new technologies to Node.js, such as THE HTTP/2 API, because we want to add SUPPORT for HTTP/2 like we did for HTTP/1.1 to keep the ecosystem highly compatible.