Your SlideShare is downloading. ×
Nodejs on 02/22/2012
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Nodejs on 02/22/2012

960
views

Published on

Brief introduction of node.js and WebSocket

Brief introduction of node.js and WebSocket

Published in: Technology

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
960
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Hidetomo Morimoto http://github.com/mocchidesu 2012/02/22
  • 2.
    • What is Node.js
    • Intro to WebSocket
    • Demo (“hello world”, chat, file sharing)
    • Q&A
    • Reference
  • 3.
    • Server Side JavaScript / Single Thread Event Loop model (Apache vs. Nginx)
    • Introduced 01/2009 by Ryah Dahl
    • Current version: 0.6.11
    • Written in C++ / v8 engine (JIT).
    • Non Blocking I/O (C10K issue)
  • 4.
    • http://www.aaronstannard.com/post/2011/12/14/Intro-to-NodeJS-for-NET-Developers.aspx
  • 5.
    • http://blog.hemca.com/?p=917
  • 6.
    • Pros
    • High Performance
    • Cons
    • One single failure -> disaster
    • Multi-processor/multi-core not supported
  • 7.
    • TCP based connection.
    • Bi-directional, full-duplex
    • No polliing. It’s realtime.
    • Light weight. (No HTTP header. No repeated 3-way handshake)
  • 8.
    • BEFORE WEBSOCKET
    • WEBSOCKET NETWORK
    • http://www.atmarkit.co.jp/fdotnet/chushin/introhtml5_05/introhtml5_05_01.html
  • 9.
    • Embedded iFrame
    • AJAX/XHR (Internet Explorer 5.0) Mar. 1999
    • Comet (Long Polling)
    • WebSocket <- Here !!
  • 10.
    • Hello World in Node.js
    var http = require('http'); var server = http.createServer( function (request, response) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.write('Hello World!!n'); response.end(); } ).listen(8124, “127.0.0.1”);
  • 11.
    • Online Chat in 15 minutes.
  • 12.
    • Tensoid (Sendoid impl. w/o Flash)
    • http://tensoid.pictshare.me
  • 13.
    • HTML5 rocks
    • Event Driven vs. Multi Thread
    • Future? Buzz word? A lot of existing web applications have already adapted
    • Many things you can do it.
  • 14.  
  • 15.
    • http://nodejs.org/
    • http://tools.ietf.org/html/rfc6455
    • http://socket.io
    • http://nodeknockout.com/
    • http://github.com/atsuya/tensoid
    • http://github.com/mocchidesu/sample_chat
    • Thank you.