SlideShare ist ein Scribd-Unternehmen logo
1 von 7
Real-time Web的運用socket.io + node.js + redis ROBIN SU robin.rsu@gmail.com
解決問題 通知訊息,在以往HTTP的限制下只可以由Browser持續的Timer來Pulling 後台的資料 造成網路來回的消耗 如何決定Pulling時間的長短 Brower/Server的處理浪費 如何決定Pulling 時間的間隔 越短:network, client-server loading heavy 越長:latency, 不可能做到real-time
Socket.io Client Side: only javascript library  Server Side: open spec, 目前原生在node.js 自動相容與”所有”Browser http://socket.io/#browser-support 優先次序 WebSocket Flash Ajax long polling
Pub/Subscribe的中介 Socket.io只有負責通訊層,還需要一個event的處理引擎, Redis, Key-value storage http://redis.io/ 提供Pub/Sub的command 快速、穩定
High-Level Architecture  Socket.io Sub Our App Program Publish
Code @node.js Node.js 0.4.12 mpn 1.0.94  express 2.4.7 socket.io 0.8.4 redis 0.6.7 Booksleeve 1.1.0.1 http://code.google.com/p/booksleeve/
summary 簡化client/server 的程式開發 降低網路流量、Server 的負擔 Real-time 的即時通知 提升使用者經驗

Weitere ähnliche Inhalte

Was ist angesagt?

Rails girls session - Web Application
Rails girls session - Web ApplicationRails girls session - Web Application
Rails girls session - Web Application
scott119
 
深入浅出NodeJS
深入浅出NodeJS深入浅出NodeJS
深入浅出NodeJS
sunzhenghua
 
Windows2003 steup vpn network
Windows2003 steup vpn networkWindows2003 steup vpn network
Windows2003 steup vpn network
expert-slove
 

Was ist angesagt? (19)

Tornado开发实践
Tornado开发实践Tornado开发实践
Tornado开发实践
 
pyspider 介绍 - pycon2014@北京
pyspider 介绍 - pycon2014@北京pyspider 介绍 - pycon2014@北京
pyspider 介绍 - pycon2014@北京
 
Async programming-2014-08-22-pub
Async programming-2014-08-22-pubAsync programming-2014-08-22-pub
Async programming-2014-08-22-pub
 
Node.js长连接开发实践
Node.js长连接开发实践Node.js长连接开发实践
Node.js长连接开发实践
 
Rails girls session - Web Application
Rails girls session - Web ApplicationRails girls session - Web Application
Rails girls session - Web Application
 
构建基于Lamp的中型网站架构
构建基于Lamp的中型网站架构构建基于Lamp的中型网站架构
构建基于Lamp的中型网站架构
 
Node Web开发实战
Node Web开发实战Node Web开发实战
Node Web开发实战
 
Maven & mongo & sring
Maven & mongo & sringMaven & mongo & sring
Maven & mongo & sring
 
基于Tornado后端系统架构暨最佳实践
基于Tornado后端系统架构暨最佳实践基于Tornado后端系统架构暨最佳实践
基于Tornado后端系统架构暨最佳实践
 
Node js实践
Node js实践Node js实践
Node js实践
 
一个 Mongodb command 的前世今生
一个 Mongodb command 的前世今生一个 Mongodb command 的前世今生
一个 Mongodb command 的前世今生
 
深入浅出NodeJS
深入浅出NodeJS深入浅出NodeJS
深入浅出NodeJS
 
Mock Server的应用与实践
Mock Server的应用与实践Mock Server的应用与实践
Mock Server的应用与实践
 
twMVC#30 | 你應該瞭解的 container-on-azure-二三事
twMVC#30 | 你應該瞭解的 container-on-azure-二三事twMVC#30 | 你應該瞭解的 container-on-azure-二三事
twMVC#30 | 你應該瞭解的 container-on-azure-二三事
 
twMVC#38 How we migrate tfs to git(using azure dev ops)
twMVC#38 How we migrate tfs to git(using azure dev ops) twMVC#38 How we migrate tfs to git(using azure dev ops)
twMVC#38 How we migrate tfs to git(using azure dev ops)
 
Windows2003 steup vpn network
Windows2003 steup vpn networkWindows2003 steup vpn network
Windows2003 steup vpn network
 
twMVC#42 Azure IoT Hub for Smart Factory
twMVC#42 Azure IoT Hub for Smart FactorytwMVC#42 Azure IoT Hub for Smart Factory
twMVC#42 Azure IoT Hub for Smart Factory
 
Html5
Html5Html5
Html5
 
Javascript加载总结
Javascript加载总结Javascript加载总结
Javascript加载总结
 

Andere mochten auch

Apache Ambari - What's New in 1.6.0
Apache Ambari - What's New in 1.6.0Apache Ambari - What's New in 1.6.0
Apache Ambari - What's New in 1.6.0
Hortonworks
 
Breastfeeding Making The Difference In
Breastfeeding Making The Difference InBreastfeeding Making The Difference In
Breastfeeding Making The Difference In
Biblioteca Virtual
 
Instructional Guide For Giving Your Baby The Best
Instructional Guide For Giving Your Baby The BestInstructional Guide For Giving Your Baby The Best
Instructional Guide For Giving Your Baby The Best
Biblioteca Virtual
 
Infant Formula Handling Education And Safety
Infant Formula   Handling Education And SafetyInfant Formula   Handling Education And Safety
Infant Formula Handling Education And Safety
Biblioteca Virtual
 
The Global Strategy On Infant And Young Child Feeding
The Global Strategy On Infant And Young Child FeedingThe Global Strategy On Infant And Young Child Feeding
The Global Strategy On Infant And Young Child Feeding
Biblioteca Virtual
 
My school (agustin)
My school (agustin)My school (agustin)
My school (agustin)
rominacheme
 
Delayed Breastfeeding Initiation Increases Risk Of Neonatal Mortality
Delayed Breastfeeding Initiation Increases Risk Of Neonatal MortalityDelayed Breastfeeding Initiation Increases Risk Of Neonatal Mortality
Delayed Breastfeeding Initiation Increases Risk Of Neonatal Mortality
Biblioteca Virtual
 
Juggling Work And Breastfeeding Effects Of Maternity Leave And Occupational C...
Juggling Work And Breastfeeding Effects Of Maternity Leave And Occupational C...Juggling Work And Breastfeeding Effects Of Maternity Leave And Occupational C...
Juggling Work And Breastfeeding Effects Of Maternity Leave And Occupational C...
Biblioteca Virtual
 
Hiv, Infant Feeding, And Maternal And Child Health
Hiv, Infant Feeding, And Maternal And Child HealthHiv, Infant Feeding, And Maternal And Child Health
Hiv, Infant Feeding, And Maternal And Child Health
Biblioteca Virtual
 

Andere mochten auch (20)

Apache Ambari - What's New in 1.6.0
Apache Ambari - What's New in 1.6.0Apache Ambari - What's New in 1.6.0
Apache Ambari - What's New in 1.6.0
 
李聖傑 最近
李聖傑   最近李聖傑   最近
李聖傑 最近
 
Sobre el Festival de poesia de Sant Cugat
Sobre el Festival de poesia de Sant CugatSobre el Festival de poesia de Sant Cugat
Sobre el Festival de poesia de Sant Cugat
 
Ganesh Series of Paintings by Henry Bismuth, Courtesy of Chisholm Gallery, LLC
Ganesh Series of Paintings by Henry Bismuth, Courtesy of Chisholm Gallery, LLCGanesh Series of Paintings by Henry Bismuth, Courtesy of Chisholm Gallery, LLC
Ganesh Series of Paintings by Henry Bismuth, Courtesy of Chisholm Gallery, LLC
 
Breastfeeding Making The Difference In
Breastfeeding Making The Difference InBreastfeeding Making The Difference In
Breastfeeding Making The Difference In
 
Instructional Guide For Giving Your Baby The Best
Instructional Guide For Giving Your Baby The BestInstructional Guide For Giving Your Baby The Best
Instructional Guide For Giving Your Baby The Best
 
Forever Flowing: The Azure legacy 1.2
Forever Flowing: The Azure legacy 1.2Forever Flowing: The Azure legacy 1.2
Forever Flowing: The Azure legacy 1.2
 
Forever Flowing: Simself Interlude
Forever Flowing: Simself InterludeForever Flowing: Simself Interlude
Forever Flowing: Simself Interlude
 
How Safe Are Infant Formulas
How Safe Are Infant FormulasHow Safe Are Infant Formulas
How Safe Are Infant Formulas
 
Présentation voyage pares amb música
Présentation voyage pares amb músicaPrésentation voyage pares amb música
Présentation voyage pares amb música
 
Infant Formula Handling Education And Safety
Infant Formula   Handling Education And SafetyInfant Formula   Handling Education And Safety
Infant Formula Handling Education And Safety
 
The Global Strategy On Infant And Young Child Feeding
The Global Strategy On Infant And Young Child FeedingThe Global Strategy On Infant And Young Child Feeding
The Global Strategy On Infant And Young Child Feeding
 
Linked In
Linked InLinked In
Linked In
 
TKAM
TKAMTKAM
TKAM
 
My school (agustin)
My school (agustin)My school (agustin)
My school (agustin)
 
Marcu Iulia
Marcu IuliaMarcu Iulia
Marcu Iulia
 
Delayed Breastfeeding Initiation Increases Risk Of Neonatal Mortality
Delayed Breastfeeding Initiation Increases Risk Of Neonatal MortalityDelayed Breastfeeding Initiation Increases Risk Of Neonatal Mortality
Delayed Breastfeeding Initiation Increases Risk Of Neonatal Mortality
 
Juggling Work And Breastfeeding Effects Of Maternity Leave And Occupational C...
Juggling Work And Breastfeeding Effects Of Maternity Leave And Occupational C...Juggling Work And Breastfeeding Effects Of Maternity Leave And Occupational C...
Juggling Work And Breastfeeding Effects Of Maternity Leave And Occupational C...
 
Hiv, Infant Feeding, And Maternal And Child Health
Hiv, Infant Feeding, And Maternal And Child HealthHiv, Infant Feeding, And Maternal And Child Health
Hiv, Infant Feeding, And Maternal And Child Health
 
Parco regionale Esperia
Parco regionale EsperiaParco regionale Esperia
Parco regionale Esperia
 

Ähnlich wie real-time Web的運用

Node js实践
Node js实践Node js实践
Node js实践
myzykj
 
客户端存储与计算
客户端存储与计算客户端存储与计算
客户端存储与计算
xiaotao ning
 
Node Web开发实战
Node Web开发实战Node Web开发实战
Node Web开发实战
fengmk2
 
WEB 安全基础
WEB 安全基础WEB 安全基础
WEB 安全基础
xki
 
高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕
ideawu
 
Re Introduce Web Development
Re Introduce Web DevelopmentRe Introduce Web Development
Re Introduce Web Development
finian lau
 
Nodejs & NAE
Nodejs & NAENodejs & NAE
Nodejs & NAE
q3boy
 
Html5 最重要的部分
Html5 最重要的部分Html5 最重要的部分
Html5 最重要的部分
Tom Fan
 
前端性能测试
前端性能测试前端性能测试
前端性能测试
tbmallf2e
 

Ähnlich wie real-time Web的運用 (20)

Real-Time Web实时信息流推送
Real-Time Web实时信息流推送Real-Time Web实时信息流推送
Real-Time Web实时信息流推送
 
Node js实践
Node js实践Node js实践
Node js实践
 
摘星
摘星摘星
摘星
 
Webrtc
WebrtcWebrtc
Webrtc
 
客户端存储与计算
客户端存储与计算客户端存储与计算
客户端存储与计算
 
前端性能优化和自动化
前端性能优化和自动化前端性能优化和自动化
前端性能优化和自动化
 
Node Web开发实战
Node Web开发实战Node Web开发实战
Node Web开发实战
 
Jetty服务器架构及调优.v2 2011-5
Jetty服务器架构及调优.v2 2011-5Jetty服务器架构及调优.v2 2011-5
Jetty服务器架构及调优.v2 2011-5
 
Beyond rails server
Beyond rails serverBeyond rails server
Beyond rails server
 
IoTDB Quick Start
IoTDB Quick StartIoTDB Quick Start
IoTDB Quick Start
 
Tech.days Taiwan AZR305
Tech.days Taiwan AZR305 Tech.days Taiwan AZR305
Tech.days Taiwan AZR305
 
利用Signalr打造即時通訊@Tech day geek
利用Signalr打造即時通訊@Tech day geek利用Signalr打造即時通訊@Tech day geek
利用Signalr打造即時通訊@Tech day geek
 
WEB 安全基础
WEB 安全基础WEB 安全基础
WEB 安全基础
 
Meteor
MeteorMeteor
Meteor
 
建立前端开发团队 (Front-end Development Environment)
建立前端开发团队 (Front-end Development Environment)建立前端开发团队 (Front-end Development Environment)
建立前端开发团队 (Front-end Development Environment)
 
高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕
 
Re Introduce Web Development
Re Introduce Web DevelopmentRe Introduce Web Development
Re Introduce Web Development
 
Nodejs & NAE
Nodejs & NAENodejs & NAE
Nodejs & NAE
 
Html5 最重要的部分
Html5 最重要的部分Html5 最重要的部分
Html5 最重要的部分
 
前端性能测试
前端性能测试前端性能测试
前端性能测试
 

real-time Web的運用