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
54
Voice to guide "difficult" recycling queries
d6y
0
69
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
Phase01_AI座学_基礎
overflowinc
0
1.2k
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
13k
Windows ファイル共有(SMB)を再確認する
murachiakira
PRO
0
210
新規事業×QAの挑戦:不確実性を乗りこなす!フェーズごとに求められるQAの役割変革
hacomono
PRO
0
140
AWSの資格って役に立つの?
tk3fftk
2
370
LINEヤフーにおけるAIOpsの現在地
lycorptech_jp
PRO
4
1.5k
SLI/SLO 導入で 避けるべきこと3選
yagikota
0
140
ABEMAのバグバウンティの取り組み
kurochan
1
150
めちゃくちゃ開発するQAエンジニアになって感じたメリットとこれからの課題感
ryuhei0000yamamoto
0
220
ソフトバンク流!プラットフォームエンジニアリング実現へのアプローチ
sbtechnight
1
230
スケールアップ企業でQA組織が機能し続けるための組織設計と仕組み〜ボトムアップとトップダウンを両輪としたアプローチ〜
tarappo
3
290
AWS CDK「読めるけど書けない」を脱却するファーストステップ
smt7174
3
210
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
450
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Un-Boring Meetings
codingconduct
0
230
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Crafting Experiences
bethany
1
92
Prompt Engineering for Job Search
mfonobong
0
210
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
The SEO Collaboration Effect
kristinabergwall1
0
400
Test your architecture with Archunit
thirion
1
2.2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
310
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