SlideShare uma empresa Scribd logo
1 de 22
Building for the real-
time web with Node.js
         Timothy Strimple
       tstrimple@gmail.com
            @tstrimple
What is the real-time web?
Real-time web.
The real-time web is a set of technologies and practices that
enable users to receive information as soon as it is published by its
authors, rather than requiring that they or their software check a
source periodically for updates.
Examples of real-time websites
• Twitter
• Facebook
• Google real-time analytics
• Monitter.com
• http://kaazing.me/
• http://demo.kaazing.com/forex/
What is node.js?
 • Node + Javascript
 • Node is the cross platformframework
   provides the non-blocking
                              layer which
   which is the core of node.js.
  • Filesystem access
  • Networking
  • DNS
  • Etc...
What is node?
• Node is designed to be massively scalable.
• Jason Hoffman (CTO & Founder Joyent):
  Goal is one CPU (core) and < 1 GB ram
  hosting10GB/s, 1 million end points
Similar platforms
 • Similar to other event driven frameworks.
  • Python: Twisted
  • C: LibEvent
  • Ruby: EventMachine
 • Unlike these other frameworks, Node.js is
   not burdened by existing blocking libraries.
Non-blocking.
In node, non blocking means that any activity taking a long time to
finish, such as file access, network communication, and network
operations, are requested and put aside until the results are ready
to be returned ia a callback function.
Why Javscript?
 • It’s FAST! (V8)
 • Lots of commercial support.
  • Microsoft vs. Google vs. Mozilla
Why Javscript?
• It flattens your stack
 • You have to use javascript anyway
• First class functions!
 • Makes event driven programming very
     easy.
Socket.IO
Making real-time communication easy.
• Supported Communication Transports
 • WebSocket
 • Adobe Flash Socket
 • Ajax Long Polling
 • Ajax multi-part streaming
 • Forever iframe
 • JSONP Polling
Socket.IO
Supported Browsers

• Desktop                   • Mobile
 • Internet Explorer 5.5+    • iPhone Safari
 • Safari 3+                 • iPad Safari
 • Google Chrome 4+          • Android WebKit
 • Firefox 3+                • WebOs WebKit
 • Opera 10.61+
Lets see some code!
When to use node?
• Web APIs
 • Json EVERYWHERE!
• Streaming data
 • Real time encoding of data as it is being
    uploaded
• Soft real-time applications
 • Versus Hard or Firm real-time
When not to use node?
 • Simple CRUD web applications
 • CPU heavy applications
Contact Information
    tstrimple@gmail.com
         @tstrimple

Mais conteúdo relacionado

Mais procurados

Mocloudos - Feather-weight Cloud OS developed within
14 man-days
Mocloudos - Feather-weight Cloud OS developed within
14 man-daysMocloudos - Feather-weight Cloud OS developed within
14 man-days
Mocloudos - Feather-weight Cloud OS developed within
14 man-days
Masaki Muranaka
 
The Web Becomes Graceful
The Web Becomes GracefulThe Web Becomes Graceful
The Web Becomes Graceful
colorhook
 
Webconf nodejs-production-architecture
Webconf nodejs-production-architectureWebconf nodejs-production-architecture
Webconf nodejs-production-architecture
Ben Lin
 

Mais procurados (19)

Mocloudos - Feather-weight Cloud OS developed within
14 man-days
Mocloudos - Feather-weight Cloud OS developed within
14 man-daysMocloudos - Feather-weight Cloud OS developed within
14 man-days
Mocloudos - Feather-weight Cloud OS developed within
14 man-days
 
npm + browserify
npm + browserifynpm + browserify
npm + browserify
 
Welcome to ClojureScript
Welcome to ClojureScriptWelcome to ClojureScript
Welcome to ClojureScript
 
Hello npm
Hello npmHello npm
Hello npm
 
Gashuku Presen
Gashuku PresenGashuku Presen
Gashuku Presen
 
Building a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDBBuilding a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDB
 
Nodejs web,db,hosting
Nodejs web,db,hostingNodejs web,db,hosting
Nodejs web,db,hosting
 
Future of NodeJS
Future of NodeJSFuture of NodeJS
Future of NodeJS
 
Modernizing Your WordPress Workflow with Grunt & Bower
Modernizing Your WordPress Workflow with Grunt & BowerModernizing Your WordPress Workflow with Grunt & Bower
Modernizing Your WordPress Workflow with Grunt & Bower
 
JavaScript Engine and WebAssembly
JavaScript Engine and WebAssemblyJavaScript Engine and WebAssembly
JavaScript Engine and WebAssembly
 
The Web Becomes Graceful
The Web Becomes GracefulThe Web Becomes Graceful
The Web Becomes Graceful
 
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
 
Webconf nodejs-production-architecture
Webconf nodejs-production-architectureWebconf nodejs-production-architecture
Webconf nodejs-production-architecture
 
CloudFoundry@home
CloudFoundry@homeCloudFoundry@home
CloudFoundry@home
 
Clojure web dev history
Clojure web dev historyClojure web dev history
Clojure web dev history
 
Introduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentIntroduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme development
 
Herramientas front
Herramientas frontHerramientas front
Herramientas front
 
GruntJS + Wordpress
GruntJS + WordpressGruntJS + Wordpress
GruntJS + Wordpress
 
Web assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail SorokovskyWeb assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail Sorokovsky
 

Semelhante a Node

Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for Engineers
Brian LeRoux
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NET
Yaniv Uriel
 

Semelhante a Node (20)

Social Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and DominoSocial Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and Domino
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
 
20120802 timisoara
20120802 timisoara20120802 timisoara
20120802 timisoara
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development
 
Offience's Node showcase
Offience's Node showcaseOffience's Node showcase
Offience's Node showcase
 
After the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEANAfter the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEAN
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Real time web
Real time webReal time web
Real time web
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for Engineers
 
Using Javascript in today's world
Using Javascript in today's worldUsing Javascript in today's world
Using Javascript in today's world
 
Node.js
Node.jsNode.js
Node.js
 
18_Node.js.ppt
18_Node.js.ppt18_Node.js.ppt
18_Node.js.ppt
 
Developing Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapDeveloping Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGap
 
.NET7.pptx
.NET7.pptx.NET7.pptx
.NET7.pptx
 
Node.js for beginner
Node.js for beginnerNode.js for beginner
Node.js for beginner
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NET
 
18_Node.js.ppt
18_Node.js.ppt18_Node.js.ppt
18_Node.js.ppt
 
Top 10 frameworks of node js
Top 10 frameworks of node jsTop 10 frameworks of node js
Top 10 frameworks of node js
 

Último

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Último (20)

Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 

Node

  • 1. Building for the real- time web with Node.js Timothy Strimple tstrimple@gmail.com @tstrimple
  • 2. What is the real-time web?
  • 3. Real-time web. The real-time web is a set of technologies and practices that enable users to receive information as soon as it is published by its authors, rather than requiring that they or their software check a source periodically for updates.
  • 4. Examples of real-time websites • Twitter • Facebook • Google real-time analytics • Monitter.com • http://kaazing.me/ • http://demo.kaazing.com/forex/
  • 5. What is node.js? • Node + Javascript • Node is the cross platformframework provides the non-blocking layer which which is the core of node.js. • Filesystem access • Networking • DNS • Etc...
  • 6. What is node? • Node is designed to be massively scalable. • Jason Hoffman (CTO & Founder Joyent): Goal is one CPU (core) and < 1 GB ram hosting10GB/s, 1 million end points
  • 7. Similar platforms • Similar to other event driven frameworks. • Python: Twisted • C: LibEvent • Ruby: EventMachine • Unlike these other frameworks, Node.js is not burdened by existing blocking libraries.
  • 8. Non-blocking. In node, non blocking means that any activity taking a long time to finish, such as file access, network communication, and network operations, are requested and put aside until the results are ready to be returned ia a callback function.
  • 9. Why Javscript? • It’s FAST! (V8) • Lots of commercial support. • Microsoft vs. Google vs. Mozilla
  • 10.
  • 11. Why Javscript? • It flattens your stack • You have to use javascript anyway • First class functions! • Makes event driven programming very easy.
  • 12. Socket.IO Making real-time communication easy. • Supported Communication Transports • WebSocket • Adobe Flash Socket • Ajax Long Polling • Ajax multi-part streaming • Forever iframe • JSONP Polling
  • 13. Socket.IO Supported Browsers • Desktop • Mobile • Internet Explorer 5.5+ • iPhone Safari • Safari 3+ • iPad Safari • Google Chrome 4+ • Android WebKit • Firefox 3+ • WebOs WebKit • Opera 10.61+
  • 14. Lets see some code!
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. When to use node? • Web APIs • Json EVERYWHERE! • Streaming data • Real time encoding of data as it is being uploaded • Soft real-time applications • Versus Hard or Firm real-time
  • 21. When not to use node? • Simple CRUD web applications • CPU heavy applications
  • 22. Contact Information tstrimple@gmail.com @tstrimple

Notas do Editor

  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