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
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.6k
New Cache Hierarchy for Container Images and OCI Artifacts in Kubernetes Clusters using Containerd / KubeCon + CloudNativeCon Japan
pfn
PRO
0
140
医療業界に特化した音声認識モデル構築のためのアノテーションの実態
thickstem
0
530
マルチテナント+マルチプロダクト SaaS への AI Agent の組み込み方
kworkdev
PRO
2
280
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
17k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
38k
基調講演: 生成AIを活用したアプリケーションの開発手法とは?
asei
1
120
IAMのマニアックな話 2025を執筆して、 見えてきたAWSアカウント管理の現在
nrinetcom
PRO
3
400
AIコーディング新時代を生き残るための試行錯誤 / AI Coding Survival Guide
tomohisa
9
12k
Go Connectへの想い
chiroruxx
0
160
Autonomous Database サービス・アップデート (FY25)
oracle4engineer
PRO
2
750
Cloud Native Scalability for Internal Developer Platforms
hhiroshell
2
380
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
Statistics for Hackers
jakevdp
799
220k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.9k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Rails Girls Zürich Keynote
gr2m
94
14k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
910
Into the Great Unknown - MozCon
thekraken
39
1.8k
Code Reviewing Like a Champion
maltzj
524
40k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
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