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
150
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
34
Voice to guide "difficult" recycling queries
d6y
0
48
Brighton Java: Day in the life...
d6y
0
200
Day in the Life of a Functional Programmer
d6y
0
590
Exoplanet Safari
d6y
1
400
Types Working For You
d6y
1
2.6k
Towards Browser and Server Utopia with Scala.js: an example using CRDTs
d6y
0
7.6k
Code Review Gems
d6y
1
1.9k
Woot for Lift
d6y
2
3.1k
Other Decks in Technology
See All in Technology
管理者しか知らないOutlookの裏側のAIを覗く#AzureTravelers
hirotomotaguchi
2
350
インフラをつくるとはどういうことなのか、 あるいはPlatform Engineeringについて
nwiizo
5
2.6k
AndroidXR 開発ツールごとの できることできないこと
donabe3
0
130
一度 Expo の採用を断念したけど、 再度 Expo の導入を検討している話
ichiki1023
1
160
開発スピードは上がっている…品質はどうする? スピードと品質を両立させるためのプロダクト開発の進め方とは #DevSumi #DevSumiB / Agile And Quality
nihonbuson
2
2.8k
【Developers Summit 2025】プロダクトエンジニアから学ぶ、 ユーザーにより高い価値を届ける技術
niwatakeru
2
1.4k
クラウドサービス事業者におけるOSS
tagomoris
1
480
飲食店予約台帳を支えるインタラクティブ UI 設計と実装
siropaca
7
1.7k
The Future of SEO: The Impact of AI on Search
badams
0
190
転生CISOサバイバル・ガイド / CISO Career Transition Survival Guide
kanny
3
970
ホワイトボードチャレンジ 説明&実行資料
ichimichi
0
130
OpenID Connect for Identity Assurance の概要と翻訳版のご紹介 / 20250219-BizDay17-OIDC4IDA-Intro
oidfj
0
270
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Statistics for Hackers
jakevdp
797
220k
Navigating Team Friction
lara
183
15k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Done Done
chrislema
182
16k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Optimizing for Happiness
mojombo
376
70k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
A designer walks into a library…
pauljervisheath
205
24k
Designing for humans not robots
tammielis
250
25k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
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