Real-time web.The real-time web is a set of technologies and practices thatenable users to receive information as soon as it is published by itsauthors, rather than requiring that they or their software check asource 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?• 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ﬁnish, such as ﬁle access, network communication, and networkoperations, are requested and put aside until the results are readyto be returned ia a callback function.
Why Javscript? • It’s FAST! (V8) • Lots of commercial support. • Microsoft vs. Google vs. Mozilla
Socket.IOMaking real-time communication easy.• Supported Communication Transports • WebSocket • Adobe Flash Socket • Ajax Long Polling • Ajax multi-part streaming • Forever iframe • JSONP Polling
Socket.IOSupported 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+