Slide from my talk "Full-duplex cloud app with WebSocket" at pragma conference 2013(http://pragmamark.org/eventi/pragma-conference-2013/#speakers_hook) about how to create iOS app that communicate in full-duplex way with the cloud (using WebSocket and socket.io)
Full-duplex cloud app
through an API,
we are functioning
with cloud app”
“Mobile is not Diﬀerent” https://vimeo.com/61044805
Document vs. Stream
Built around request/response
paradigm of HTTP
Instantly update your content as things happens
What we are going to build
Hey, what about old
good BSD socket?
“No App is an island”
Not suitable for web applications
Wouldn’t be nice to have an
event-based layer of abstraction?
Independent TCP-based protocol that enables
bidirectional, message-oriented streaming of text
and binary data between client and server.
[JS/Node.js] Socket.io (http://socket.io)
[Python] Tornado (http://
[Ruby] em-websocket (https://
[Objective-C] RockemSockem (https://
Comprehensive of realtime web technologies: https://github.com/leggetter/realtime-web-technologies-guide/blob/master/guide.md
Socket.io > WebSocket
Abstract the transport mechanism
By sending a heartbeat at a predetermined
interval the client informs the server
that it's still there.
Partitioning of the connected clients.
Show us some code!
Chat / Messaging
Stream of event/news
Photo by Héctor García (http://www.ﬂickr.com/photos/torek/7109339349/)