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
160
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
42
Voice to guide "difficult" recycling queries
d6y
0
56
Brighton Java: Day in the life...
d6y
0
220
Day in the Life of a Functional Programmer
d6y
0
620
Exoplanet Safari
d6y
1
440
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
1.9k
Woot for Lift
d6y
2
3.2k
Other Decks in Technology
See All in Technology
能登半島災害現場エンジニアクロストーク 【JAWS FESTA 2025 in 金沢】
ditccsugii
0
830
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
8.8k
新規事業におけるGORM+SQLx併用アーキテクチャ
hacomono
PRO
0
280
このままAIが発展するだけでAGI達成可能な理由
frievea
0
100
20251010_HCCJP_AdaptiveCloudUpdates
sdosamut
0
130
コンテキストエンジニアリング入門〜AI Coding Agent作りで学ぶ文脈設計〜
kworkdev
PRO
1
1.2k
AIツールでどこまでデザインを忠実に実装できるのか
oikon48
6
3.4k
今この時代に技術とどう向き合うべきか
gree_tech
PRO
1
1.6k
OAuthからOIDCへ ― 認可の仕組みが認証に拡張されるまで
yamatai1212
0
120
[Keynote] What do you need to know about DevEx in 2025
salaboy
0
170
Node.js 2025: What's new and what's next
ruyadorno
0
330
OCI Network Firewall 概要
oracle4engineer
PRO
2
7.9k
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Become a Pro
speakerdeck
PRO
29
5.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Practical Orchestrator
shlominoach
190
11k
The Cult of Friendly URLs
andyhume
79
6.6k
Leading Effective Engineering Teams in the AI Era
addyosmani
6
430
Documentation Writing (for coders)
carmenintech
75
5.1k
A better future with KSS
kneath
239
18k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Why Our Code Smells
bkeepers
PRO
340
57k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
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