Your SlideShare is downloading. ×

Realtime rocks

2,979

Published on

Realtime with Node.js and Socket.io

Realtime with Node.js and Socket.io

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,979
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
60
Comments
0
Likes
4
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
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. REALTIME ROCKS!No shit.
    • 2. Hi! I’m Jeroen.
    • 3. RealtimeWebsockets with node.js and socket.io
    • 4. Websockets?
    • 5. WebSocket is a web technologyproviding for bi-directional, full-duplex communications channelsover a single TCP connection. Full duplex realtime FTW!@mlitnWho else?
    • 6. 1. Node.js2. Socket.io3. Code4. Demo
    • 7. 1. Node.js2. Socket.io3. Code4. Demo
    • 8. 1. Node.js2. Socket.io3. Code4. Demo
    • 9. 1. Node.js2. Socket.io3. Code4. Demo
    • 10. Node.jshttp://nodejs.org
    • 11. Node.js uses an event-driven, non-blocking I/O model that makes itlightweight and efficient, perfectfor data-intensive real-timeapplications that run across Serverside JavaScript. Memory efficiency. No deadlocks.Node.js Event=driven.http://nodejs.org/
    • 12. Node.js• Programs written in JavaScript.• Event-driven.• Asynchronous I/O• Google’s V8 JavaScript engine.• Npm.
    • 13. Socket.iohttp://socket.io
    • 14. Socket.IO aims to make realtimeapps possible in every browser andmobile device, blurring thedifferences between the differenttransport mechanisms. Its care- Browser support. Feed them flash haters. And again... JavaScript!Socket.iohttp://socket.io/
    • 15. Browser support:Socket.io WebSocket, Flash, AJAX long polling, AJAX multipart streaming, Forever iFrame, JSONP Polling.• Browser support.• Programs written in JavaScript.• Included in npm.• WebSocket/Flash/AJAX/Forever/ JSONP.
    • 16. Code Custom events,Here be dragons.
    • 17. Setup• Download and install node.js • http://nodejs.org/#download• Install socket.io • npm install socket.io• Run server JavaScript. • node js/server.js
    • 18. Serverhttps://github.com/Vanbosse/websockets-demo/blob/master/js/server.js
    • 19. Clienthttps://github.com/Vanbosse/websockets-demo/blob/master/js/client.js
    • 20. Demohttps://github.com/Vanbosse/websockets-demo
    • 21. Clone https://github.com/Vanbosse/websockets-demoand go play. Hosting? http://nodejs.be (Openminds)
    • 22. Questions?
    • 23. twitter.com/vanbossejeroen@wijs.bewww.wijs.be

    ×