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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Richard Dallaway
October 06, 2012
Technology
0
170
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
51
Voice to guide "difficult" recycling queries
d6y
0
64
Brighton Java: Day in the life...
d6y
0
240
Day in the Life of a Functional Programmer
d6y
0
640
Exoplanet Safari
d6y
1
460
Types Working For You
d6y
1
2.7k
Towards Browser and Server Utopia with Scala.js: an example using CRDTs
d6y
0
7.7k
Code Review Gems
d6y
1
2k
Woot for Lift
d6y
2
3.3k
Other Decks in Technology
See All in Technology
旅先で iPad + Neovim で iOS 開発・執筆した話
zozotech
PRO
0
100
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
550
Greatest Disaster Hits in Web Performance
guaca
0
290
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.6k
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
240
登壇駆動学習のすすめ — CfPのネタの見つけ方と書くときに意識していること
bicstone
3
130
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
260
20260204_Midosuji_Tech
takuyay0ne
1
160
配列に見る bash と zsh の違い
kazzpapa3
3
170
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
480
Claude Code for NOT Programming
kawaguti
PRO
1
100
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
380
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
150
Crafting Experiences
bethany
1
50
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
120
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Visualization
eitanlees
150
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
The agentic SEO stack - context over prompts
schlessera
0
650
Practical Orchestrator
shlominoach
191
11k
Unsuck your backbone
ammeep
671
58k
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