Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Full-Stack-Development with 
NodeJS 
携程Mobile/Online 应用场景分析
Agenda 
• Recall: n-Layer Code Structure & Org Structure 
• What’s NodeJS 
• Who are applying NodeJS 
• Why considering No...
n-Layer Distilled – Tech Stack 
e-Commerce System (frontend + backend) 
FrontEnd BackEnd 
JobWS Svc Proxies 
SOA/Asmx/WCF/...
Code Arch to Org Arch – Ctrip Samples 
• Ctrip Flight Dev Team 
– Frontend  Presentation + Application 
– Backend  API (...
Code Arch to Org Arch – Int’l Flight Team 
航空公司SNS 无线APP Online 分销Offline 
搜索查询 
资源共享平台API 
GDS Amadeus Sabre Galileo 中航信 ...
Agenda 
• Recall: n-Layer Code Structure & Org Structure 
• What’s NodeJS 
• Who are applying NodeJS 
• Why considering No...
What’s NodeJS 
• 2009.5 Ryan Dahl 发布于GitHub,总排名#3 
• 基于Google V8 引擎的Web & Socket Server 
• 使用Javascript 编写服务端代码,前后通吃 
• Si...
Who are applying NodeJS (国外) 
• LinkedIn 
– 2012.10 将所有移动应用服务从Ruby on Rails 迁到NodeJS 
• Groupon 
– 2013.10 将所有应用从Ruby on R...
Who are applying NodeJS (国内) 
• 淘宝 
– 淘宝指数、数据魔方、时光机 
– CNodeJS 社区 
• 网易 
– 2012.11 在GitHub 发布pomelo 框架 
– 移动推送、Web 推送采用pom...
携程最新进展: 
1、框架已构建Ctrip NPM Repository 
2、Clog via edge, SOA via Node native 
3、门票v5.8 H5/Hybrid 接入NodeJS
Agenda 
• Recall: n-Layer Code Structure & Org Structure 
• What’s NodeJS 
• Who are applying NodeJS 
• Why considering No...
Why considering NodeJS for Ctrip 
• 高性能,可减少服务器(non-blocking IO, IOCP on Windows) 
• 开发效率高,减少集成(Same Javascript + Less Inte...
Frontend & Backend – Tech Stack
Risk & Issue & Countermeasure 
• 思想理念的转变 Controller from C# to JS 
• 团队分工的转变 Frontend Full-Stack-Engineer 
and Full-Stac...
请收藏两个Mail Groups: 
1、技术支持:RDkjts 
2、产品建议: KJCP
Demo #1 – ql.io for service composing 
& tailoring
Demo #2 – Send log via Clog .NET client
Demo #3 – Send log via SOA 2.0 client
Demo #4 – Visit .NET Service via SOAP
Demo #5 – One rule set via nools run 
@ both node-side and browser-side
Demo #6 – One js via browserify run @ 
both node-side and browser-side
Q & A
Próxima SlideShare
Cargando en…5
×

Full stack-development with node js

3.805 visualizaciones

Publicado el

Recall: n-Layer Code Structure & Org Structure
What’s NodeJS
Who are applying NodeJS
Why considering NodeJS for Ctrip
Risks & Issues
Demo & QA

Publicado en: Internet

Full stack-development with node js

  1. 1. Full-Stack-Development with NodeJS 携程Mobile/Online 应用场景分析
  2. 2. Agenda • Recall: n-Layer Code Structure & Org Structure • What’s NodeJS • Who are applying NodeJS • Why considering NodeJS for Ctrip • Risks & Issues • Demo & QA
  3. 3. n-Layer Distilled – Tech Stack e-Commerce System (frontend + backend) FrontEnd BackEnd JobWS Svc Proxies SOA/Asmx/WCF/ Servlet/RESTful Svc Technology Center Controllers, Svc Proxies Presentation Layer Application Layer Domain Layer Infrastructure Layer HTML/JS Aspx/Servlet Ascx/Taglib/JSF DAL Fx/Svc, Data Access Layer, etc. ADO.NET, JDBC, ORM, etc. Framework, Utils, etc. Utils OOD & DDD WinSvc
  4. 4. Code Arch to Org Arch – Ctrip Samples • Ctrip Flight Dev Team – Frontend  Presentation + Application – Backend  API (SOA) + Domain + Data • Ctrip Hotel Dev Team – Data Dev Team  DB/SQL/Repl/DAL • Ctrip Fx Dev Team – Frontend  Presentation + Application – Backend  API (RESTful) + Domain + Data
  5. 5. Code Arch to Org Arch – Int’l Flight Team 航空公司SNS 无线APP Online 分销Offline 搜索查询 资源共享平台API GDS Amadeus Sabre Galileo 中航信 Presentation Layer (View) Application Layer (Controller) Domain Layer (API) Infrastructure Layer (internal) Infrastructure Layer (external) Frontend Dev Team Backend Dev Team
  6. 6. Agenda • Recall: n-Layer Code Structure & Org Structure • What’s NodeJS • Who are applying NodeJS • Why considering NodeJS for Ctrip • Risks & Issues • Demo
  7. 7. What’s NodeJS • 2009.5 Ryan Dahl 发布于GitHub,总排名#3 • 基于Google V8 引擎的Web & Socket Server • 使用Javascript 编写服务端代码,前后通吃 • Single Thread, Event Driven, Non-blocking IO • Light-weight, Scale-out, Cluster-enabled • 接近70,000 NPM (Node Packaged Modules) • 成熟的社区,热情贡献者,Full-Stack 呼声
  8. 8. Who are applying NodeJS (国外) • LinkedIn – 2012.10 将所有移动应用服务从Ruby on Rails 迁到NodeJS • Groupon – 2013.10 将所有应用从Ruby on Rails 迁到NodeJS • eBay – 2012.3 在GitHub 发布ql.io 框架,可认为是Service Aggregator – 2013.5 发布第一个线上NodeJS 项目 • PayPal – 2012.4 使用NodeJS 在6 周内完成支付系统重写 – 2013.1 在GitHub 发布Kraken 框架,两年内将大规模使用 • Walmart  2014 年底电商平台全上NodeJS • Google, Yahoo, Netflix, AWS, Azure, etc.
  9. 9. Who are applying NodeJS (国内) • 淘宝 – 淘宝指数、数据魔方、时光机 – CNodeJS 社区 • 网易 – 2012.11 在GitHub 发布pomelo 框架 – 移动推送、Web 推送采用pomelo 框架构建 • 腾讯推送、百度推送、搜狐推送、新浪微博DB Proxy • 去哪儿、点点、花瓣、雪球、小米手机销售、etc. • 携程 DVF RESTful API、Real-Time Crawler (Open House)
  10. 10. 携程最新进展: 1、框架已构建Ctrip NPM Repository 2、Clog via edge, SOA via Node native 3、门票v5.8 H5/Hybrid 接入NodeJS
  11. 11. Agenda • Recall: n-Layer Code Structure & Org Structure • What’s NodeJS • Who are applying NodeJS • Why considering NodeJS for Ctrip • Risks & Issues & Countermeasure • Demo
  12. 12. Why considering NodeJS for Ctrip • 高性能,可减少服务器(non-blocking IO, IOCP on Windows) • 开发效率高,减少集成(Same Javascript + Less Integration) • 易于修改和维护(由管道连接小模块构成) • DRY Principle:View & Controller 共用一套验证逻辑 • Frontend == View + Controller,Controller 是短板 • Controller == Model (SOA 1.0/2.0) Composing & Tailoring • 适合IO-intensive 场景,不适合CPU-intensive 场景 • 机票、酒店已做前后端分离,可在前端团队尝试 • 强烈建议看这篇文章:淘宝基于NodeJS 全栈开发
  13. 13. Frontend & Backend – Tech Stack
  14. 14. Risk & Issue & Countermeasure • 思想理念的转变 Controller from C# to JS • 团队分工的转变 Frontend Full-Stack-Engineer and Full-Stack-Development • 同步开发模式 异步开发模式+ 严格异常处理 • 框架支持 Clog、SOA 已验证没问题,可稳定运 行(demo),Cfx 需扩展,但不动核心,CI 原生支持 • 运维支持 NodeJS module for Zabbix • 其它SOA 支持 NodeJS module for SOAP/REST • NodeJS & NPM  框架& 系统研发(C/C++/Driver支持)
  15. 15. 请收藏两个Mail Groups: 1、技术支持:RDkjts 2、产品建议: KJCP
  16. 16. Demo #1 – ql.io for service composing & tailoring
  17. 17. Demo #2 – Send log via Clog .NET client
  18. 18. Demo #3 – Send log via SOA 2.0 client
  19. 19. Demo #4 – Visit .NET Service via SOAP
  20. 20. Demo #5 – One rule set via nools run @ both node-side and browser-side
  21. 21. Demo #6 – One js via browserify run @ both node-side and browser-side
  22. 22. Q & A

×