Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Socket.io for Haskell folks
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ting-Yen Lai
December 08, 2013
Programming
1.1k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Socket.io for Haskell folks
Ting-Yen Lai
December 08, 2013
Transcript
66 slides
Socket.IO for Haskell Folks
None
None
None
Real-time Applications
Regular HTTP
Polling
Long-Polling
EventSource
WebSocket
WebSocket
“TCP for the web”
PROS Bi-directional + Full-duplex ! Lower overhead ! Port 80
CONS Not widely supported ! Still a draft*
Socket.IO
asdf
“The cross-browser cross-device WebSocket”
Browser Support IE 5.5+ Safari 2+ Google Chrome 4+ Firefox
3+ Opera 10.61+
Transport Support WebSocket Flash Socket AJAX long polling AJAX multipart
Forever iframe JSONP Polling
socket.emit(‘news’, ‘hey!’); ! ! ! Server
socket.on(‘news’, function (data) { console.log(data); // hey! }); ! Client
socket.emit(‘news’, ‘hey!’); ! socket.on(‘ping’, function () { socket.emit(‘pong’); }); Server
socket.on(‘news’, function (data) { console.log(data); // hey! }); ! socket.emit(‘ping’);
Client
Originated from Node.js
Now also available in many other languages Erlang Java Lua
Python Perl Go C++ C Objective-C Haxe Ruby PHP
Except for Haskell
None
socketio-0.1.0
None
socket.emit(‘news’, ‘hey!’); ! socket.on(‘ping’, function () { socket.emit(‘pong’); });
emit “news” [“hey!”] ! on “ping” $ emit “pong” []
Transport Support WebSocket (80%) Flash Socket AJAX long polling AJAX
multipart Forever iframe JSONP Polling
Difficulties
Transport Support ಠ~ಠ
Transport Support WebSocket Flash Socket AJAX long polling AJAX multipart
Forever iframe JSONP Polling
Transport Support WebSocket Flash Socket AJAX long polling AJAX multipart
Forever iframe JSONP Polling
“Premature optimization is the root of all evil”
Monad Transformers ಠ~ಠ
None
None
! KEEP CALM AND JUST USE IT
None
Iteratee I/O ಠ~ಠ
None
None
None
None
String/Text/ByteString ಠ~ಠ
None
{-# LANGUAGE OverloadedStrings #-}
Open Source Community ಠ~ಠ
None
None
Originated from Node.js
Cabal Hell ಠ~ಠ
> cabal uninstall cabal: unrecognised command: uninstall (try --help)
None
cabal-dev?
LIVE DEMO
None
http://banacorn.org:3000
None
TODO
cabal-dev?
banacorn/socket.io-haskell ! ! ! ALL CONTRIBUTIONS ARE WELCOME!
THANKS! Questions?
More Decks by Ting-Yen Lai
See All by Ting-Yen Lai
Fuck FINAL
banacorn
0
210
Other Decks in Programming
See All in Programming
Crash Auto Pipelines
veronikapj
1
430
SODA - FACT BOOK(JP)
sodainc
1
40k
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
270
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
780
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
150
[DroidKnights 2026] Workflow AX 적용기 — 자동 정책 정리부터 E2E까지
dayeon
0
110
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
180
小さなアプリを作って公開するまで
onozaty
0
200
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
930
SODA - FACT BOOK(EN)
sodainc
1
260
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
BBQ
matthewcrist
90
10k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
610
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Technical Leadership for Architectural Decision Making
baasie
4
650