跳到主要內容
黯羽輕揚每天積累一點點

Node.js 發展史

免費2019-06-30#Node#NodeJS history#NodeJS birthday#NodeJS Timeline#Node.js发展历程#Nodejs历史

考古學者前線快報,Node.js 自 2009 年至今的大事年表

誕生

Ryan Dahl 在 2009/3/3 的這次程式碼提交將蛋殼中的 NodeJS 專案命名為 node,從此,世界上多了一個 Node.js

2009

Package Manager 是第一件要考慮的事情,目的在於解決程式碼複用的問題:

There are a lot of very useful modules out there, but it's tricky right now to actually use more than one of them together.

通過一套模組定義規範來實現複用,目標是:

  • 易宣告易公開:很容易定義一個 package 並公開出去

  • 易安裝易引用:要能輕易引用開源模組,而不需要提供太多的 package 元資訊,並且裝完之後能夠很方便地引用其功能

  • 即取即用:package 的版本、校驗、配置、安裝位置等都不必關心,所有對可用性沒有明顯影響的問題都應該推遲

  • 集中管理:共享同一個 package,方便維護

迄今(2019/6/29)為止,npm 仍具有這些特徵,也是早期設計所決定的

同年,Ryan Dahl 在 JSConf 發表了關於 Node.js 的首次公開演講,嘗試走出去

2010

Express 與 Socket.io 是生態發展的必然產物,Express 作為 Node.js 生態中資格最老的 Web 開發框架,至今仍有一些難以替代的優勢(比如成熟可靠的生態支援)

Heroku 對 Node.js 提供了實驗性的支援,這意味著走出去了一小步。同時,一邊推廣(Google Tech Talk),一邊持續演進(迭代 v0.2.0)

2011

一系列新手教程的出現意味著大家發現了 Node.js 的(學習)價值,之後 LinkedIn、Uber 陸續上船更是印證了這一點,也標誌著 Node.js 正式投入生產使用,算是一個重要的里程碑

Node.js 誕生 2 年後,其 Package Manager 終於正式面世,就叫 npm。最後整合到 Node.js 安裝包中,成為Node 模組管理的事實標準

Ultimately I included NPM in the Node distribution, which much made it the defacto standard.

同時,通過 Reddit 論壇、Youtube 講故事的方式與社群聯動,讓更多的思想匯聚起來

2012

重構完 libuv 之後,Node.js 核心部分已經趨於完備,創始人 Ryan Dahl 功成身退,將決策權交給 npm 的創始人 Isaac Schlueter

Node.js 發展趨於成熟的另一個標誌是生態中出現了面向企業的解決方案,例如 Hapi

hapi is a simple to use configuration-centric framework with built-in support for input validation, caching, authentication, and other essential facilities for building web and services applications.

2013

MEAN 組合實踐、Web 開發框架的更迭、CMS 的出現意味著Node.js 生態發展進入百花齊放的階段

另一方面,伴隨著在企業場景中的大規模應用,也逐漸暴露出 Node.js 自身的一些潛在問題,如 記憶體管理

2014

Node.js 又一次交棒,由一直在專案中起重要作用的 Timothy J Fontaine 接管

同年,Joyent 公司(Node.js 創始人所在的公司,擁有 Node.js 商標)提議成立顧問委員會,打算從完全開放走向自治

As the community becomes more complex, it is important that we find ways to balance the needs of all constituents and provide a platform for these organizations to come together and to provide input into the project.

這意味著話語權將從開放的開源社群轉移到正在使用 Node.js 的幾家大公司手裡(Joyent、Netflix 等):

Previously, Node.js was run via mailing lists, GitHub issues, and anyone could contribute their idea. This idea started getting some hate because it brought control away from your average, everyday contributor and moved the power to the "big shots": companies such as Walmart, Yahoo, IBM, Microsoft, Joyent, Netflix, and PayPal.

此舉招致開源社群的強烈抵觸,因而 fork 出了 IO.js,繼續以完全開��的社群驅動模式快速發展:

This repository began as a GitHub fork of joyent/node where contributions, releases, and contributorship are under an open governance model.

至此,Node.js 第一次走向分裂

2015

Q1

這場衝向 1.0 版本的競速賽以 IO.js 獲勝告終。繼而,顧問委員會中的幾大公司聯手成立了 Node.js 基金會,表態支援社群驅動的開放管理模式:

Joyent, IBM, Microsoft, PayPal, Fidelity, SAP and The Linux Foundation Join Forces to Support Node.js Community With Neutral and Open Governance, Resources for Developers

緊接著開源社群作出回應,提議和解,因為管理模式上的衝突已經消除了

Q2

Node.js 基金會成立後不久,第三任領袖 TJ Fontaine 宣佈離開,交由基金會與社群管理

It's because of this strong team, community, and the formation of the Foundation that it makes it the right time for me to step back.

緊接著,和解之後,IO.js 合入 Node.js,從分裂走向統一

另外,npm 還提供了私有模組支援,類似於 Github 私有倉庫,算是對商用的支援

Q3

IO.js 合入之後,Node.js 迎來了真正意義上的 1.0 版本,[版本帝](/articles/windowslinux 下 node 更新/#articleHeader1) 正式從混亂的 0.x 進入 4.x 時代

Q4

釋出了第一個 LTS 版本,標誌著Node.js 進入穩定釋出階段

同時,Yahoo、RisingStack 等大公司也紛紛加入基金會,共同參與 Node.js 建設。此外,還召開了第一次 Node Interactive 大會,分享 Node.js 在生產中的應用價值

2016

Q1

一個沸沸揚揚的新聞是 leftpad 事件,暴露出 npm 設計/管理上的一些問題:

This hasn't been the first time that members of the community have disagreed over a name. In a global namespace for unscoped modules, collisions are inevitable. npm has a package name dispute resolution policy for this reason. That policy encourages parties to attempt an amicable solution, and when one is impossible, articulates how we resolve the dispute.

另外,Express 被納入孵化專案(incubated project),將獲得 Node.js 基金會的技術支援:

The Node.js Foundation Incubator Program was launched last year. Projects under the Node.js Foundation Incubator Program receive assistance and governance mentorship from the Foundation's Technical Steering Committee and related working groups. The Incubator Program is intended to support the many needs of Node.js users to maintain a competitive and robust ecosystem.

同時,Google 也加入 Node.js 基金會,隊伍越來越壯大

Q2

npm 註冊使用者突破 21 萬,其中 7 萬多人釋出過 package。npm 已經成為一個相當龐大的東西,在 Node.js 生態起著不可替代的作用

Q3

npm 的變化也關乎 Node.js 的發展,像整合安裝包一樣綁定在一起。另外,第二次 Node Interactive 大會在歐洲舉行

Q4

Yarn 適時推出,算是 npm 客戶端的增強版

The product of that work is called Yarn — a fast, reliable, and secure alternative npm client.

服務端仍使用 npm registry,這無可撼動

繼首個 LTS 版本(v4.2.0)之後,v6.0 成為第二個 LTS 版本。同時,IBM、Microsoft 等巨頭開始發力,將 Node.js 推向 8.0 版本

另外,繼續瘋狂開會,第三次 Node Interactive 選在北美

2017

Q1

Node.js 的高速發展對行業傳統技術棧造成了衝擊,為了解決企業面臨的人才技能問題,Node.js 基金會推出開發者認證計劃,期望通過認證的開發者具備 Node.js 開發能力

NASA 上船標誌著*「Node.js 上天了」*……玩笑,畢竟大型企業上船已經不新奇了

Q2

Node.js v8.0 釋出,巨頭發力告一段落,最重要的應該是 N-API 支援

This API will be Application Binary Interface (ABI) stable across versions of Node.js. It is intended to insulate Addons from changes in the underlying JavaScript engine and allow modules compiled for one version to run on later versions of Node.js without recompilation.

在社群 + 基金會的開放管理模式下,基金會更換領導人已經不再是成立顧問委員會一類的大事了

Q3

特性持續迭代,並藉助最新 V8 引擎得到一波性能提升

另一件值得關注的事情是,因為 Node.js 基金會下 TSC(Technical Steering Committee,技術指導委員會)的執行力問題,Node.js 再次走向分裂(新的 fork 稱為 Ayo,還念 IO.js)

Q4

從官方報告來看,Node.js 已經已經達到相當大規模的應用

Every day there are more than 8.8 million Node instances online, that number has grown by 800,000 in the last nine months alone. Every week there are more than 3 billion downloads of npm packages. The number of Node.js contributors has grown from 1,100 contributors last year to more than 1,500 contributors today.

同時,v8.9.0 成為 8.x 的首版 LTS,進入穩定階段

另外,npm 在安全性上也邁出了一小步,支援帳號雙因子認證

2018

Q1

基金會建站搜羅 Node.js 應用案例,見 Application Showcase

Amazing apps, products and projects built with Node.js

另一方面,由於 Node.js 與 JavaScript 密不可分,乾脆合作一起開會,就叫 JS Interactive

Q2

npm 6 在安全方面做了更多的事情,對存在安全問題的 package 有了一些管控措施,如 npm audit

HTTP2 等前沿特性也在持續推進,使用者調查也沒有停下,關注 Node.js 應用趨勢

另一方面,8.x 時代落幕,進入 10.x,期望搭載 V8 引擎 v6.6

Q3

9 年後,Node.js 的創始人 Ryan Dahl 指出 Node.js 的 10 大設計失誤,包括加進來又去掉的 Promise API、安全問題、GYP 構建系統、package.json 入口欄位、node_modules 結構等等

回過頭看,npm 上大量的案例表明跨版本(從 6.x 到 10.x)的 N-API 支援確有其實踐意義

Q4

繼實驗性支援(Node.js 8.5.0 (2017-09-12))之後,正式的 ES Module 支援終於進入議程

2019

Q1

首次介紹基金會內部的工作機制,進一步公開透明。緊接著,Node.js 基金會與 JS 基金會合併,成立 OpenJS 基金會

Q2

Node.js 創始人再度出發,希望重新建立更好的 Node.js,即 deno

A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio

同時,Node.js 增強了實驗性的 ES Module 支援,包括動態引入(import())等,並伴隨著 V8 引擎版本升級以及 ES 特性支援,進入 12.x 迭代

另外,npm 經營上似乎有一些變化,出現一波人事變動,可能關乎 Node.js 的發展:

The actual concern I have is that the JavaScript package manager and language commons are in the hands of a VC-funded company, which may or may not be having financial trouble, If they're not okay, this is something the entire JavaScript language community needs to pay attention to now.

因為 Node.js 語言的發展與盈利性質的 npm 公司綁定在一起,一直以來都是個隱患

The JS package commons is in the hands of a for-profit entity. We trust npm with our shared code, but we have no way to hold npm accountable for its behavior. A trust-based system cannot function without accountability, but somebody still has to pay for the servers. How did we get here, and what should JavaScript do now?

參考資料

評論

暫無評論,快來發表你的看法吧

提交評論