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+
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