Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Node.js 在阿里巴巴的这些年
Search
fengmk2
August 11, 2017
Technology
2
1.7k
Node.js 在阿里巴巴的这些年
Modern Web 2017 in TaiPei
fengmk2
August 11, 2017
Tweet
Share
Other Decks in Technology
See All in Technology
NOT A HOTEL SOFTWARE DECK (2025/11/06)
notahotel
0
3k
SREのキャリアから経営に近づく - Enterprise Risk Managementを基に -
shonansurvivors
1
730
今のコンピュータ、AI にも Web にも 向いていないので 作り直そう!!
piacerex
0
630
LLM APIを2年間本番運用して苦労した話
ivry_presentationmaterials
10
7.8k
アノテーション作業書作成のGood Practice
cierpa0905
PRO
1
400
Spec Driven Development入門/spec_driven_development_for_learners
hanhan1978
1
630
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
0
430
Kotlinで型安全にバイテンポラルデータを扱いたい! ReladomoラッパーをAIと実装してみた話
itohiro73
3
260
20251102 WordCamp Kansai 2025
chiilog
1
540
datadog-incident-management-intro
tetsuya28
0
120
書籍『実践 Apache Iceberg』の歩き方
ishikawa_satoru
0
470
AIエージェントを導入する [ 社内ナレッジ活用編 ] / Implement AI agents
glidenote
1
210
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Making Projects Easy
brettharned
120
6.4k
Faster Mobile Websites
deanohume
310
31k
For a Future-Friendly Web
brad_frost
180
10k
Balancing Empowerment & Direction
lara
5
710
Leading Effective Engineering Teams in the AI Era
addyosmani
8
720
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Automating Front-end Workflow
addyosmani
1371
200k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Transcript
Node.js 在阿⾥里里巴巴的這些年年
真名:袁鋒,在阿⾥里里巴巴我叫「蘇千」。 ⽬目前就職于螞蟻⾦金金服,從事 Node.js 相關研發⼯工作。 2010年年開始接觸 Node.js CNode 社區創始成員 參參與舉辦過滬JS、京JS、杭JS GitHub:
@fengmk2 我是誰?
0 初⾒見見 Node.js
Node’s goal is to provide an easy way to build
scalable network programs @ryandahl http://t.cn/R95TZdJ
Node’s goal is to provide an EASY way to build
scalable network programs
經典的 Hello World
單線程 ⾮非阻塞 I/O 事件驅動 Node.js 的特性
⾮非常適合 IO 密集型 應⽤用場景
第⼀一個對外 Node.js 應⽤用
1「⽣生存」
⼈人才市場上招聘不不到 Node.js ⼯工程師 怎麼辦?
2011年年 Node.js 這個技術 還是太新鮮了了!
從現有技術⼈人才轉化 Python、Ruby、 PHP、Java、.Net …
主動創造 招聘環境 招聘機會 為未來來儲備⼈人才
CNode 技術社群 ⼩小型分享 NodeParty 沪JS、京JS、杭JS
http://www.ituring.com.cn/article/744
2011年年4⽉月16⽇日,第⼀一屆 NodeParty
None
2017年年的今天,Node.js 職位如⾬雨後春筍
2 發展
阻礙 Node.js 發展的 技術瓶頸 在哪裡?
None
融⼊入阿⾥里里的 Java ⽣生態 Node.js 中間件
HSF,Notify,Diamond,EagleEye, ConfigServer,VipServer,MetaQ,Tair 等等都有對應的 Node.js 中間件實現 圖來來⾃自 http://jm.taobao.org/about/
Node.js 與 Java 如何「通信」?
Java Hessian Serialization
Object Serialization Stream Protocol
Object Serialization Stream Protocol
hessian.js java.io 分別實現這兩種 序列列化協議
跨語⾔言通信 建議直接使⽤用 Protocol Buffers
None
否則 你需要閱讀 ⾮非常多 Java 源代碼
技術瓶頸 解決了了 越來來越多 node app express、koa 抉擇
https://github.com/cnpm/cnpmjs.org/blob/master/servers/registry.js#L18
統⼀一的 約定⼀一致的 基礎 Web 應⽤用框架 egg
egg 應⽤用⽬目錄錄約定 ⾃自動加載 避免 `app.use(xxx)` 適應⼈人員交替
+-----------------------------------+--------+ | app1, app2, app3 | | +-----------------------------------+ | |
chair | begg | @ali/nut | ... | | +-----------------------------------+ plugin | | @ali/egg | | +-----------------------------------+ | | Egg.js | | +-----------------------------------+--------| | egg-core | +--------------------------------------------| | Koa | +--------------------------------------------+ 基於 egg 的框架、應⽤用、插件之間的關係
來來⾃自 egg 團隊對外分享的「美圖」 Koa Egg 基於上層框架開發框的應⽤用 社區⽣生態 團隊架構師 ⼀一線開發者 Node.js
Plugin 插件⽣生態 適合特定團隊業務場景的上層框架 Framework 螞蟻 Chair UC Nut aliyun-egg … Specification ⼀一套規範和約定 Tool ⼯工具鏈
Why koa?
簡單、簡單、簡單 再⾒見見 callback hell 適應趨勢 async/await
None
None
Why not express?
中間件模型 koa ⽐比 express 簡單、直觀
None
Compress 中間件源代碼對⽐比 koa 72⾏行行 express 277⾏行行 4X
我就是喜歡 express 你有什什麼建議?
同樣建議基於統⼀一規範和約定來來做事情 Express Your Egg 基於上層框架開發框的應⽤用 社區⽣生態 團隊架構師 ⼀一線開發者 Node.js Plugin
插件⽣生態 適合特定團隊業務場景的上層框架 Framework F1 F2 F3 … Specification ⼀一套規範和約定 Tool ⼯工具鏈
越來來越多 私有的 npm 模組, 該如何管理理?
None
tnpm 阿⾥里里巴巴⾃自研的 私有 npm registry
100% npm 接⼝口兼容 10000+私有模組 適配現有企業⽤用⼾戶體系
tnpm => cnpm
None
解決中國開發者 使⽤用 npm ⻱龜速問題
中國 npm 鏡像 cnpmjs.org 實時同步的網絡部署⽅方案 npmjs.com 訂閱實時更更新 觸發同步任務 定時同步輔助 拉取更更新數數據
None
alinode
None
解決 CPU 性能問題 解決內存洩漏漏問題
⼀一鍵在線 CPU Profile 分析
快速定位內存洩漏漏,提供可視化排查⼯工具
Node.js Contributors => CTC
3 更更多的應⽤用場景
統⼀一渲染服務
None
BFF,Backend for Frontend
4 未來來之路路
ServerLess: Function Compute (Lambda)
https://yq.aliyun.com/articles/79648
https://yq.aliyun.com/articles/79648
Node.js 驅動 ffmpeg 去處理理視頻 https://nodejs.org/en/blog/uncategorized/an-easy-way-to-build-scalable-network-programs/
Node.js 驅動 f(x) 去完成⼀一件事情
None