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.6k
Node.js 在阿里巴巴的这些年
Modern Web 2017 in TaiPei
fengmk2
August 11, 2017
Tweet
Share
Other Decks in Technology
See All in Technology
大規模言語モデル (LLM)における低精度数値表現
pfn
PRO
3
870
CloudflareとHonoを使って飲食店のレビューができるLINEアプリを作った
shinaps
2
650
Kaggleで学ぶ系列データのための深層学習モデリング
yu4u
7
1.7k
Laboratories in Science and Technology: Deep Neural Networks
keio_smilab
PRO
3
180
【リラン】AIの光と闇?失敗しないために知っておきたいAIリスクとその対応 ①政府の動き編
tkhresk
0
140
1Q86
kawaguti
PRO
2
190
「できる!」を増やすGitHub Copilot活用法 / How to use GitHub Copilot to expand your possibilities
sansan_randd
1
250
株式会社EventHub・エンジニア採用資料
eventhub
0
2.1k
【TSkaigi】2024/05/11 当日スライド
kimitashoichi
14
4.1k
AWSの生成AI入門書を執筆しました🎉
minorun365
PRO
0
160
Password cracking: past, present, future
openwall
0
310
SLOいつ決めましょう?
abnoumaru
3
860
Featured
See All Featured
Navigating Team Friction
lara
179
13k
Fireside Chat
paigeccino
22
2.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
23
1.7k
Raft: Consensus for Rubyists
vanstee
133
6.3k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
7k
Why Our Code Smells
bkeepers
PRO
331
56k
Building Applications with DynamoDB
mza
88
5.7k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
126
32k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Robots, Beer and Maslow
schacon
PRO
155
8k
Clear Off the Table
cherdarchuk
86
310k
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