Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Distributed Comet with Lift and Amazon SNS
Search
Richard Dallaway
October 06, 2012
Technology
0
160
Distributed Comet with Lift and Amazon SNS
Description of using Amazon SNS to distribute comet messages around a cluster of Liftweb machines.
Richard Dallaway
October 06, 2012
Tweet
Share
More Decks by Richard Dallaway
See All by Richard Dallaway
AI Roadmap
d6y
0
41
Voice to guide "difficult" recycling queries
d6y
0
52
Brighton Java: Day in the life...
d6y
0
220
Day in the Life of a Functional Programmer
d6y
0
610
Exoplanet Safari
d6y
1
420
Types Working For You
d6y
1
2.6k
Towards Browser and Server Utopia with Scala.js: an example using CRDTs
d6y
0
7.7k
Code Review Gems
d6y
1
1.9k
Woot for Lift
d6y
2
3.2k
Other Decks in Technology
See All in Technology
VS CodeとGitHub Copilotで爆速開発!アップデートの波に乗るおさらい会 / Rapid Development with VS Code and GitHub Copilot: Catch the Latest Wave
yamachu
2
150
DatabricksにOLTPデータベース『Lakebase』がやってきた!
inoutk
0
120
怖くない!はじめてのClaude Code
shinya337
0
410
マネジメントって難しい、けどおもしろい / Management is tough, but fun! #em_findy
ar_tama
7
1.1k
Coinbase™®️ USA Contact Numbers: Complete 2025 Support Guide
officialcoinbasehelpcenter
0
410
CDKTFについてざっくり理解する!!~CloudFormationからCDKTFへ変換するツールも作ってみた~
masakiokuda
1
170
いつの間にか入れ替わってる!?新しいAWS Security Hubとは?
cmusudakeisuke
0
130
ビギナーであり続ける/beginning
ikuodanaka
3
770
関数型プログラミングで 「脳がバグる」を乗り越える
manabeai
2
200
ゼロからはじめる採用広報
yutadayo
3
970
fukabori.fm 出張版: 売上高617億円と高稼働率を陰で支えた社内ツール開発のあれこれ話 / 20250704 Yoshimasa Iwase & Tomoo Morikawa
shift_evolve
PRO
2
8k
【LT会登壇資料】TROCCO新コネクタ「スマレジ」を活用した直営店データの分析
kazari0425
1
110
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Facilitating Awesome Meetings
lara
54
6.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
820
Practical Orchestrator
shlominoach
189
11k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
6
310
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Building Applications with DynamoDB
mza
95
6.5k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Rails Girls Zürich Keynote
gr2m
95
14k
Transcript
Distributed Comet with Lift and Amazon SNS Richard Dallaway @d6y
Jono Ferguson @jonoabroad
[email protected]
You have multiple users chatting to your server, real-time using
comet. server1:8080 "Hi" "Hi" Load balancer for http://myapp:80 Easy. All is good in the world.
You add another server. server1:8080 "Hi" "Hi" Load balancer for
http://myapp:80 server2:8081 "yo!" "yo!" How does the "Hi" message get to the "yo" users too?
Here's how...
During boot, each server registers with a Simple Notification Service
topic... server1:8080 Load balancer for http://myapp:80 server2:8081 AWS SNS: topic = "chat" Register me to "chat" R server1:/8080/ confirmed! C
When someone chats, the message goes to SNS first.... server1:8080
"Hi" Load balancer for http://myapp:80 server2:8081 AWS SNS: topic = "chat" "Hi"
SNS distributes it back to all registered servers (that's what
SNS does).... server1:8080 Load balancer for http://myapp:80 server2:8081 AWS SNS: topic = "chat" "Hi"
Finally, each server can push back to all connected clients.
server1:8080 Load balancer for http://myapp:80 server2:8081 AWS SNS: topic = "chat" "Hi" "Hi" "Hi" "Hi"
Huzzah.
Servers are identical. (no special per-instance configuration)
Servers don't have to know about each other. (and SNS
is cheap, fast & reliable)
Doesn't have to be SNS. Anything with a publish/subscribe model
can do this (e.g., RabbitMQ)
https://github.com/SpiralArm/liftmodules-aws-sns