SlideShare a Scribd company logo
1 of 73
栋 : F2E@taobao
weibo @zhenn
What is NodeCombo
键词
键词
    NodeJS
键词
    NodeJS

   态资    务
键词
    NodeJS

   态资    务

    Combo
键词
    NodeJS

   态资    务

    Combo

   CDN 务
态资   务
态资     务

  URL       务
node读   输       户
req


res
Node实现




         Node实现
Combo
Combo
   户       http请
   务   读   请
Push   户   CSS JS
Combo
   户                         http请
   务       读                 请
Push       户            CSS JS
       户                         a.tbcdn.cn
               ??1.js,2.js
                                    1.js
                                    2.js
                1.js+2.js
                                    …
Usage




 1.Js   应   2.Js   应
Usage




        Node实现
Usage




        Node实现
Usage


        证   应push   户




            Node实现
Usage


        证   应push   户




            Node实现
Usage


        证   应push        户

                    JS   CSS
               赖               证请
               combo顺          输
                    应结




            Node实现
CDN 务




http://a.tbcdn.cn/apps/lottery/??1.js,2.js
CDN 务
                       发环
  户
                    a.tbcdn.cn
      ??1.js,2.js

                       1.js




http://a.tbcdn.cn/apps/lottery/??1.js,2.js
CDN 务
                       发环                       产环
  户
                    a.tbcdn.cn               a.tbcdn.cn
      ??1.js,2.js                pull 2.js
                                                1.Js
                       1.js                     2.Js
                                                ...




http://a.tbcdn.cn/apps/lottery/??1.js,2.js
CDN 务
                       发环                       产环
  户
                    a.tbcdn.cn               a.tbcdn.cn
      ??1.js,2.js                pull 2.js
                                                1.Js
                       1.js                     2.Js
                                 push 2.js      ...




http://a.tbcdn.cn/apps/lottery/??1.js,2.js
CDN 务
                       发环                       产环
  户
                    a.tbcdn.cn               a.tbcdn.cn
      ??1.js,2.js                pull 2.js
                                                1.Js
                       1.js                     2.Js
       1.js+2.js                 push 2.js      ...




http://a.tbcdn.cn/apps/lottery/??1.js,2.js
Why Node , not Apache?
Apache feature

       稳

       载    发语   php/python

       简单

 ...
Combo base on
 Apache & Php
apache
apache




     过apache rewrite   检测url

   combo规则      发给cb.php处
cb.php
cb.php
cb.php




远
Node优
Node优
   local   IO
Node优
   local    IO

   remote
Node优
    local         IO

    remote

 Local & remote        IO
Sync & async
sync mode               async mode
       req1                        req1
                                 req2

                                 res1
        res1
                        结   时间     res2

      req2
               节   时间

       res2
                                        结   时间




 timeline                   timeline
Perfect?
发   构
apache

PHP
Apache
Apache



  80     吗
Apache



  80        吗



       NO
How do it?
块http-proxy
块http-proxy
npm install http-proxy
块http-proxy
      npm install http-proxy

                  务    监   80


  绑   发               apache    务

监 8080 Node监   8081
SSI   务
简单   实现
简单   实现




读 shtml         码   include
     动态读
         编码   gbk

 Node       GB编码

 继续     …
Iconv   归   吗
Iconv   归   吗


gbk           UTF8
显   HTML 远远

    GB编码 JS   CSS
iconv-lite
iconv-lite

             Unicode
GBK   节       string
iconv-lite

             Unicode
GBK   节       string       GBK   节
                       码
缓


缓   图
Node 码实现
扩      jst

a.tbcdn.cn/t.jst?id=donghan&pwd=hello1234
扩      jst

a.tbcdn.cn/t.jst?id=donghan&pwd=hello1234




                          get   post
值
简单    拟
实现
 jst 码 动态eval执 时         传   temp处   获

URL     Query对    对     对应jst 码

query        get post
实现
                        Data     query   执   时
                                   query对
 jst 码 动态eval执 时         传     temp处    获

URL     Query对    对     对应jst 码

query        get post
Node 务   稳
bash hack
项
https://github.com/zhenn/
NodeCombo
Q & Possibly A

More Related Content

What's hot

独爽不如众乐
独爽不如众乐独爽不如众乐
独爽不如众乐Zheng Biao
 
模糊也是一種美 - 從 BlurHash 探討前後端上傳圖片架構
模糊也是一種美 - 從 BlurHash 探討前後端上傳圖片架構模糊也是一種美 - 從 BlurHash 探討前後端上傳圖片架構
模糊也是一種美 - 從 BlurHash 探討前後端上傳圖片架構Mu Chun Wang
 
Java线上应用问题排查方法和工具(空望)
Java线上应用问题排查方法和工具(空望)Java线上应用问题排查方法和工具(空望)
Java线上应用问题排查方法和工具(空望)ykdsg
 
并发编程交流
并发编程交流并发编程交流
并发编程交流bluedavy lin
 
Java7 fork join framework and closures
Java7 fork join framework and closuresJava7 fork join framework and closures
Java7 fork join framework and closureswang hongjiang
 
軟體人甘苦談
軟體人甘苦談軟體人甘苦談
軟體人甘苦談Fred Chien
 
Android C Library: Bionic 成長計畫
Android C Library: Bionic 成長計畫Android C Library: Bionic 成長計畫
Android C Library: Bionic 成長計畫Kito Cheng
 
JVM内容管理和垃圾回收
JVM内容管理和垃圾回收JVM内容管理和垃圾回收
JVM内容管理和垃圾回收Tony Deng
 
用最潮的 Java script 盡情開發 kde qt 程式
用最潮的 Java script 盡情開發 kde qt 程式用最潮的 Java script 盡情開發 kde qt 程式
用最潮的 Java script 盡情開發 kde qt 程式Fred Chien
 
不一樣的Web server... coServ
不一樣的Web server... coServ不一樣的Web server... coServ
不一樣的Web server... coServBen Lue
 
The comet technology on Jetty
The comet technology on Jetty The comet technology on Jetty
The comet technology on Jetty wavefly
 
Effective linux.3.(diagnosis)
Effective linux.3.(diagnosis)Effective linux.3.(diagnosis)
Effective linux.3.(diagnosis)wang hongjiang
 
Exodus重构和向apollo迁移
Exodus重构和向apollo迁移Exodus重构和向apollo迁移
Exodus重构和向apollo迁移wang hongjiang
 
Nodejs introduce - using Socket.io
Nodejs introduce - using Socket.ioNodejs introduce - using Socket.io
Nodejs introduce - using Socket.ioCaesar Chi
 

What's hot (19)

Jvm内存管理基础
Jvm内存管理基础Jvm内存管理基础
Jvm内存管理基础
 
独爽不如众乐
独爽不如众乐独爽不如众乐
独爽不如众乐
 
模糊也是一種美 - 從 BlurHash 探討前後端上傳圖片架構
模糊也是一種美 - 從 BlurHash 探討前後端上傳圖片架構模糊也是一種美 - 從 BlurHash 探討前後端上傳圖片架構
模糊也是一種美 - 從 BlurHash 探討前後端上傳圖片架構
 
Java线上应用问题排查方法和工具(空望)
Java线上应用问题排查方法和工具(空望)Java线上应用问题排查方法和工具(空望)
Java线上应用问题排查方法和工具(空望)
 
并发编程交流
并发编程交流并发编程交流
并发编程交流
 
Java7 fork join framework and closures
Java7 fork join framework and closuresJava7 fork join framework and closures
Java7 fork join framework and closures
 
Ali-tomcat
Ali-tomcatAli-tomcat
Ali-tomcat
 
Exodus2 大局观
Exodus2 大局观Exodus2 大局观
Exodus2 大局观
 
軟體人甘苦談
軟體人甘苦談軟體人甘苦談
軟體人甘苦談
 
Android C Library: Bionic 成長計畫
Android C Library: Bionic 成長計畫Android C Library: Bionic 成長計畫
Android C Library: Bionic 成長計畫
 
JVM内容管理和垃圾回收
JVM内容管理和垃圾回收JVM内容管理和垃圾回收
JVM内容管理和垃圾回收
 
用最潮的 Java script 盡情開發 kde qt 程式
用最潮的 Java script 盡情開發 kde qt 程式用最潮的 Java script 盡情開發 kde qt 程式
用最潮的 Java script 盡情開發 kde qt 程式
 
All about NodeJS
All about NodeJSAll about NodeJS
All about NodeJS
 
不一樣的Web server... coServ
不一樣的Web server... coServ不一樣的Web server... coServ
不一樣的Web server... coServ
 
The comet technology on Jetty
The comet technology on Jetty The comet technology on Jetty
The comet technology on Jetty
 
Effective linux.3.(diagnosis)
Effective linux.3.(diagnosis)Effective linux.3.(diagnosis)
Effective linux.3.(diagnosis)
 
Exodus重构和向apollo迁移
Exodus重构和向apollo迁移Exodus重构和向apollo迁移
Exodus重构和向apollo迁移
 
Nodejs introduce - using Socket.io
Nodejs introduce - using Socket.ioNodejs introduce - using Socket.io
Nodejs introduce - using Socket.io
 
Aswan&hump
Aswan&humpAswan&hump
Aswan&hump
 

Viewers also liked

Aspergillosis Patient Support Meeting March 2011 - Jane Mabey Gilsenan
Aspergillosis Patient Support Meeting March 2011 - Jane Mabey GilsenanAspergillosis Patient Support Meeting March 2011 - Jane Mabey Gilsenan
Aspergillosis Patient Support Meeting March 2011 - Jane Mabey GilsenanGraham Atherton
 
How Organizational Chaos Destroys Improvement Initiatives & What to Do to Pre...
How Organizational Chaos Destroys Improvement Initiatives & What to Do to Pre...How Organizational Chaos Destroys Improvement Initiatives & What to Do to Pre...
How Organizational Chaos Destroys Improvement Initiatives & What to Do to Pre...TKMG, Inc.
 
Academic writing II
Academic writing IIAcademic writing II
Academic writing IIHelen Fallon
 
Saudi u.s. oil analysis
Saudi u.s. oil analysisSaudi u.s. oil analysis
Saudi u.s. oil analysisGale Pooley
 
Presentazione 22.12.10 definitivo
Presentazione 22.12.10 definitivoPresentazione 22.12.10 definitivo
Presentazione 22.12.10 definitivoValerio Lanconelli
 
Mau menikmati hidup ? Begini caranyaaaa ... !!
Mau menikmati hidup ? Begini caranyaaaa ... !!Mau menikmati hidup ? Begini caranyaaaa ... !!
Mau menikmati hidup ? Begini caranyaaaa ... !!Bintang Fajar
 
101 lecture 22 behavioral economics
101 lecture 22 behavioral economics101 lecture 22 behavioral economics
101 lecture 22 behavioral economicsGale Pooley
 
Maintaining or Improving your health status in CPA (Khaled Al-shair)
Maintaining or Improving your health status in CPA (Khaled Al-shair)Maintaining or Improving your health status in CPA (Khaled Al-shair)
Maintaining or Improving your health status in CPA (Khaled Al-shair)Graham Atherton
 
Lecture 12 unemployment
Lecture 12 unemploymentLecture 12 unemployment
Lecture 12 unemploymentGale Pooley
 
KOREA - Jeju Island, love land
KOREA - Jeju Island, love landKOREA - Jeju Island, love land
KOREA - Jeju Island, love landUmberto Pacheco
 
101 lecture 18 factors of production
101 lecture 18 factors of production101 lecture 18 factors of production
101 lecture 18 factors of productionGale Pooley
 

Viewers also liked (20)

Aspergillosis Patient Support Meeting March 2011 - Jane Mabey Gilsenan
Aspergillosis Patient Support Meeting March 2011 - Jane Mabey GilsenanAspergillosis Patient Support Meeting March 2011 - Jane Mabey Gilsenan
Aspergillosis Patient Support Meeting March 2011 - Jane Mabey Gilsenan
 
374 5
374 5374 5
374 5
 
How Organizational Chaos Destroys Improvement Initiatives & What to Do to Pre...
How Organizational Chaos Destroys Improvement Initiatives & What to Do to Pre...How Organizational Chaos Destroys Improvement Initiatives & What to Do to Pre...
How Organizational Chaos Destroys Improvement Initiatives & What to Do to Pre...
 
Text 1-113
Text 1-113Text 1-113
Text 1-113
 
Academic writing II
Academic writing IIAcademic writing II
Academic writing II
 
CARNAVAL EN MORALEJA
CARNAVAL EN MORALEJACARNAVAL EN MORALEJA
CARNAVAL EN MORALEJA
 
Fotos únicas !
Fotos únicas !Fotos únicas !
Fotos únicas !
 
Saudi u.s. oil analysis
Saudi u.s. oil analysisSaudi u.s. oil analysis
Saudi u.s. oil analysis
 
Salas de ópera
Salas de óperaSalas de ópera
Salas de ópera
 
Presentazione 22.12.10 definitivo
Presentazione 22.12.10 definitivoPresentazione 22.12.10 definitivo
Presentazione 22.12.10 definitivo
 
310 lecture 9
310 lecture 9310 lecture 9
310 lecture 9
 
Mau menikmati hidup ? Begini caranyaaaa ... !!
Mau menikmati hidup ? Begini caranyaaaa ... !!Mau menikmati hidup ? Begini caranyaaaa ... !!
Mau menikmati hidup ? Begini caranyaaaa ... !!
 
101 lecture 22 behavioral economics
101 lecture 22 behavioral economics101 lecture 22 behavioral economics
101 lecture 22 behavioral economics
 
Maintaining or Improving your health status in CPA (Khaled Al-shair)
Maintaining or Improving your health status in CPA (Khaled Al-shair)Maintaining or Improving your health status in CPA (Khaled Al-shair)
Maintaining or Improving your health status in CPA (Khaled Al-shair)
 
Aco
AcoAco
Aco
 
Lecture 12 unemployment
Lecture 12 unemploymentLecture 12 unemployment
Lecture 12 unemployment
 
Why we do fh
Why we do fhWhy we do fh
Why we do fh
 
AR Browsers
AR BrowsersAR Browsers
AR Browsers
 
KOREA - Jeju Island, love land
KOREA - Jeju Island, love landKOREA - Jeju Island, love land
KOREA - Jeju Island, love land
 
101 lecture 18 factors of production
101 lecture 18 factors of production101 lecture 18 factors of production
101 lecture 18 factors of production
 

Similar to Node combo

建立前端开发团队 (Front-end Development Environment)
建立前端开发团队 (Front-end Development Environment)建立前端开发团队 (Front-end Development Environment)
建立前端开发团队 (Front-end Development Environment)Joseph Chiang
 
Node.js 進攻桌面開發
Node.js 進攻桌面開發Node.js 進攻桌面開發
Node.js 進攻桌面開發Fred Chien
 
人人网开发一站式体验
人人网开发一站式体验人人网开发一站式体验
人人网开发一站式体验zhen chen
 
使用NodeJS构建静态资源管理系统
使用NodeJS构建静态资源管理系统使用NodeJS构建静态资源管理系统
使用NodeJS构建静态资源管理系统Frank Xu
 
Full stack-development with node js
Full stack-development with node jsFull stack-development with node js
Full stack-development with node jsXuefeng Zhang
 
猴子也能懂的Node.js
猴子也能懂的Node.js猴子也能懂的Node.js
猴子也能懂的Node.jsHopenglishRD
 
Node Web开发实战
Node Web开发实战Node Web开发实战
Node Web开发实战fengmk2
 
Node Web开发实战
Node Web开发实战Node Web开发实战
Node Web开发实战fengmk2
 
面向开发的前端性能优化
面向开发的前端性能优化面向开发的前端性能优化
面向开发的前端性能优化li qiang
 
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure National Cheng Kung University
 
Huangjing renren
Huangjing renrenHuangjing renren
Huangjing renrend0nn9n
 
Beyond rails server
Beyond rails serverBeyond rails server
Beyond rails serverMichael Chen
 
单页面开发遇到的一些问题
单页面开发遇到的一些问题单页面开发遇到的一些问题
单页面开发遇到的一些问题Zhi Zhong
 
互联网创业服务器运维工具集
互联网创业服务器运维工具集互联网创业服务器运维工具集
互联网创业服务器运维工具集zhen chen
 
务实技术讲座系列
务实技术讲座系列务实技术讲座系列
务实技术讲座系列webhostingguy
 
分享平台构建之旅
分享平台构建之旅分享平台构建之旅
分享平台构建之旅tblanlan
 
Thinking in React by Deot
Thinking in React by Deot Thinking in React by Deot
Thinking in React by Deot 荣德 周
 
PHP and Zend Internal I - 体系结构及生命周期
PHP and Zend Internal I - 体系结构及生命周期PHP and Zend Internal I - 体系结构及生命周期
PHP and Zend Internal I - 体系结构及生命周期ericzhangcn
 
Lamp高性能设计
Lamp高性能设计Lamp高性能设计
Lamp高性能设计锐 张
 
D2_Node在淘宝的应用实践
D2_Node在淘宝的应用实践D2_Node在淘宝的应用实践
D2_Node在淘宝的应用实践Jackson Tian
 

Similar to Node combo (20)

建立前端开发团队 (Front-end Development Environment)
建立前端开发团队 (Front-end Development Environment)建立前端开发团队 (Front-end Development Environment)
建立前端开发团队 (Front-end Development Environment)
 
Node.js 進攻桌面開發
Node.js 進攻桌面開發Node.js 進攻桌面開發
Node.js 進攻桌面開發
 
人人网开发一站式体验
人人网开发一站式体验人人网开发一站式体验
人人网开发一站式体验
 
使用NodeJS构建静态资源管理系统
使用NodeJS构建静态资源管理系统使用NodeJS构建静态资源管理系统
使用NodeJS构建静态资源管理系统
 
Full stack-development with node js
Full stack-development with node jsFull stack-development with node js
Full stack-development with node js
 
猴子也能懂的Node.js
猴子也能懂的Node.js猴子也能懂的Node.js
猴子也能懂的Node.js
 
Node Web开发实战
Node Web开发实战Node Web开发实战
Node Web开发实战
 
Node Web开发实战
Node Web开发实战Node Web开发实战
Node Web开发实战
 
面向开发的前端性能优化
面向开发的前端性能优化面向开发的前端性能优化
面向开发的前端性能优化
 
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
 
Huangjing renren
Huangjing renrenHuangjing renren
Huangjing renren
 
Beyond rails server
Beyond rails serverBeyond rails server
Beyond rails server
 
单页面开发遇到的一些问题
单页面开发遇到的一些问题单页面开发遇到的一些问题
单页面开发遇到的一些问题
 
互联网创业服务器运维工具集
互联网创业服务器运维工具集互联网创业服务器运维工具集
互联网创业服务器运维工具集
 
务实技术讲座系列
务实技术讲座系列务实技术讲座系列
务实技术讲座系列
 
分享平台构建之旅
分享平台构建之旅分享平台构建之旅
分享平台构建之旅
 
Thinking in React by Deot
Thinking in React by Deot Thinking in React by Deot
Thinking in React by Deot
 
PHP and Zend Internal I - 体系结构及生命周期
PHP and Zend Internal I - 体系结构及生命周期PHP and Zend Internal I - 体系结构及生命周期
PHP and Zend Internal I - 体系结构及生命周期
 
Lamp高性能设计
Lamp高性能设计Lamp高性能设计
Lamp高性能设计
 
D2_Node在淘宝的应用实践
D2_Node在淘宝的应用实践D2_Node在淘宝的应用实践
D2_Node在淘宝的应用实践
 

Node combo

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n