17
HOW TO GET YOUR SANITY BACK WITH SOCKET.IO

How to get your sanity back with socket.io

Embed Size (px)

Citation preview

HOW TO GET YOUR SANITY BACK WITH SOCKET.IO

YO!I am Danielius Visockas

I had to build a chat

Realtime was a problemAt least for me

Because I’m a ruby developer.

Problem?

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

No

socket.iowith node.js to the rescue

Socket.io abstracts realtime like jQuery does for Ajax

Supported transports

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

Supported browsers

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

It has friends

redisRuby server node &

socket.ioPGsql

Redis PostgreSQL

Client code

Caveats

✘ Security

✘ Adds complexity

Thank youAny questions?You can find me at @dvisockas

For more info visit http://socket.io