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
140
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
27
Voice to guide "difficult" recycling queries
d6y
0
34
Brighton Java: Day in the life...
d6y
0
140
Day in the Life of a Functional Programmer
d6y
0
500
Exoplanet Safari
d6y
1
330
Types Working For You
d6y
1
2.5k
Towards Browser and Server Utopia with Scala.js: an example using CRDTs
d6y
0
7.1k
Code Review Gems
d6y
1
1.8k
Woot for Lift
d6y
2
3k
Other Decks in Technology
See All in Technology
Algyan イベント振り返り
linyixian
0
180
次世代Web認証「パスキー」 / mo-zatsudan-passkey
nkzn
22
13k
キャラクター制御のためのプロンプト術 for LINE Bot
uezo
0
510
CSSDAY 2024
kevinshallvari
0
180
Discord とビルダー&チャットボットの使い方 / How to use Discord and Builder & Chatbots
ks91
PRO
0
130
Janus
bkuhlmann
0
480
PHPカンファレンス小田原2024
ysknsid25
2
660
DevOpsDays History and my DevOps story
kawaguti
PRO
7
1.3k
アプリがつくるNOT A HOTELブランド
hokuts
0
450
「手動オペレーションに定評がある」と言われた私が心がけていること / phpcon_odawara2024
blue_goheimochi
1
310
検証を通して見えてきたTiDBの性能特性
lycorptech_jp
PRO
5
2.3k
〜小さく始めて大きく育てる〜データ分析基盤の開発から活用まで
kniino
0
1.9k
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
Creatively Recalculating Your Daily Design Routine
revolveconf
209
11k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Scaling GitHub
holman
457
140k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
75
41k
Building Effective Engineering Teams - LeadDev
addyosmani
26
1.8k
A better future with KSS
kneath
230
16k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Fashionably flexible responsive web design (full day workshop)
malarkey
397
65k
BBQ
matthewcrist
79
8.7k
How to Ace a Technical Interview
jacobian
272
22k
We Have a Design System, Now What?
morganepeng
42
6.7k
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