Realtime rocks

3,343 views

Published on

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
3,343
On SlideShare
0
From Embeds
0
Number of Embeds
454
Actions
Shares
0
Downloads
62
Comments
0
Likes
4
Embeds 0
No embeds

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
  • Realtime rocks

    1. 1. REALTIME ROCKS!No shit.
    2. 2. Hi! I’m Jeroen.
    3. 3. RealtimeWebsockets with node.js and socket.io
    4. 4. Websockets?
    5. 5. WebSocket is a web technologyproviding for bi-directional, full-duplex communications channelsover a single TCP connection. Full duplex realtime FTW!@mlitnWho else?
    6. 6. 1. Node.js2. Socket.io3. Code4. Demo
    7. 7. 1. Node.js2. Socket.io3. Code4. Demo
    8. 8. 1. Node.js2. Socket.io3. Code4. Demo
    9. 9. 1. Node.js2. Socket.io3. Code4. Demo
    10. 10. Node.jshttp://nodejs.org
    11. 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. 12. Node.js• Programs written in JavaScript.• Event-driven.• Asynchronous I/O• Google’s V8 JavaScript engine.• Npm.
    13. 13. Socket.iohttp://socket.io
    14. 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. 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. 16. Code Custom events,Here be dragons.
    17. 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. 18. Serverhttps://github.com/Vanbosse/websockets-demo/blob/master/js/server.js
    19. 19. Clienthttps://github.com/Vanbosse/websockets-demo/blob/master/js/client.js
    20. 20. Demohttps://github.com/Vanbosse/websockets-demo
    21. 21. Clone https://github.com/Vanbosse/websockets-demoand go play. Hosting? http://nodejs.be (Openminds)
    22. 22. Questions?
    23. 23. twitter.com/vanbossejeroen@wijs.bewww.wijs.be

    ×