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
510
Exoplanet Safari
d6y
1
340
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
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
710
家族アルバム みてねにおけるGrafana活用術 / Grafana Meetup Japan Vol.1 LT
isaoshimizu
1
910
認知症フレンドリーテックとスタックチャン
naokiuc
0
130
LLM開発・活用の舞台裏@2024.04.25
yushin_n
3
1.1k
Azureの基本的な権限管理の勉強会
yhana
1
2k
一生覚えておきたい「システム開発=コミュニケーション」〜初めての実務案件振り返りLT〜
maimyyym
2
250
AWS学習者向けにAzureの解説スライドを作成した話
handy
3
190
実例で紹介するRAG導入時の知見と精度向上の勘所
yamahiro
5
1.5k
本当のAWS基礎
toru_kubota
1
620
On Your Data を超えていく!
hirotomotaguchi
2
750
Google Cloud Next '24でブログを10本書いた方法と勉強会を沸かせた方法
yasumuusan
0
330
Tellus の衛星データを見てみよう #mf_fukuoka
kongmingstrap
0
260
Featured
See All Featured
Building an army of robots
kneath
300
41k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
228
16k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
13
8.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
117
18k
Docker and Python
trallard
35
2.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
6
3.4k
4 Signs Your Business is Dying
shpigford
176
21k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Done Done
chrislema
178
15k
It's Worth the Effort
3n
180
27k
Designing with Data
zakiwarfel
96
4.8k
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