Top Banner
HOW TO GET YOUR SANITY BACK WITH SOCKET.IO
17
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: How to get your sanity back with socket.io

HOW TO GET YOUR SANITY BACK WITH SOCKET.IO

Page 2: How to get your sanity back with socket.io

YO!I am Danielius Visockas

Page 3: How to get your sanity back with socket.io

I had to build a chat

Page 4: How to get your sanity back with socket.io

Realtime was a problemAt least for me

Page 5: How to get your sanity back with socket.io

Because I’m a ruby developer.

Page 6: How to get your sanity back with socket.io

Problem?

✘ Polling✘ Long polling✘ Very long polling✘ Web Sockets✘ SSE✘ Just use some service

Page 7: How to get your sanity back with socket.io

No

Page 8: How to get your sanity back with socket.io

socket.iowith node.js to the rescue

Page 9: How to get your sanity back with socket.io

Socket.io abstracts realtime like jQuery does for Ajax

Page 10: How to get your sanity back with socket.io

Supported transports

✘ Web Socket✘ Adobe Flash Sockets✘ Long polling✘ Multipart streaming✘ JSONP Polling✘ Forever iframe

Page 11: How to get your sanity back with socket.io

Supported browsers

✘ IE 5.5+✘ Safari 3+✘ Chrome 4+✘ Firefox 3+✘ Opera 10+✘ iSafari✘ Android WebKit✘ WebOs Webkit

Page 12: How to get your sanity back with socket.io

It has friends

Page 13: How to get your sanity back with socket.io

redisRuby server node &

socket.ioPGsql

Page 14: How to get your sanity back with socket.io

Redis PostgreSQL

Page 15: How to get your sanity back with socket.io

Client code

Page 16: How to get your sanity back with socket.io

Caveats

✘ Security

✘ Adds complexity

Page 17: How to get your sanity back with socket.io

Thank youAny questions?You can find me at @dvisockas

For more info visit http://socket.io