Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Distributed Comet with Lift and Amazon SNS
Richard Dallaway
October 06, 2012
Technology
0
120
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
20
Voice to guide "difficult" recycling queries
d6y
0
27
Brighton Java: Day in the life...
d6y
0
75
Day in the Life of a Functional Programmer
d6y
0
400
Exoplanet Safari
d6y
1
250
Types Working For You
d6y
1
2.4k
Towards Browser and Server Utopia with Scala.js: an example using CRDTs
d6y
0
6.5k
Code Review Gems
d6y
1
1.7k
Woot for Lift
d6y
2
2.9k
Other Decks in Technology
See All in Technology
JDK Flight Recorder入門
chiroito
1
510
History of the ML system in KARTE
kargo113
1
650
Power AutomateでのAdaptive Cards-基本編
miyakemito
1
320
ひとりでも安定して 組織を変える活動を続けていくための ストレスマネジメント
pastelinc
0
860
UWBを使ってみた
norioikedo
0
420
ラブグラフ紹介資料 〜プロダクト解体新書〜 / Lovegraph Product Deck
lovegraph
0
260
Security Hub のマルチアカウント 管理・運用をサーバレスでやってみる
ch6noota
0
840
Build 2022で発表されたWindowsアプリ開発のあれこれ振り返ろう
hatsunea
1
380
Custom GitHub Actions by Java
kazamori
0
290
Persistence in Serverless Applications - ServerlessDays NYC
marcduiker
0
240
モブに早く慣れたい人のためのガイド / A Guide to Getting Started Quickly with Mob Programming
cybozuinsideout
PRO
2
1.8k
Scrum Fest Osaka 2022 フルリモート下でのチームビルディング
moritamasami
2
1.2k
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
261
37k
The Art of Programming - Codeland 2020
erikaheidi
32
11k
Clear Off the Table
cherdarchuk
79
280k
Debugging Ruby Performance
tmm1
65
10k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
19
1.4k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
11
4.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
15
36k
Intergalactic Javascript Robots from Outer Space
tanoku
261
25k
A Philosophy of Restraint
colly
192
15k
The Invisible Side of Design
smashingmag
290
48k
Agile that works and the tools we love
rasmusluckow
319
19k
Fantastic passwords and where to find them - at NoRuKo
philnash
27
1.5k
Transcript
Distributed Comet with Lift and Amazon SNS Richard Dallaway @d6y
Jono Ferguson @jonoabroad Richard@UnderscoreConsulting.com
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