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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
51
Voice to guide "difficult" recycling queries
d6y
0
66
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
「ストレッチゾーンに挑戦し続ける」ことって難しくないですか? メンバーの持続的成長を支えるEMの環境設計
sansantech
PRO
1
320
型を書かないRuby開発への挑戦
riseshia
0
190
Agentic Codingの実践とチームで導入するための工夫
lycorptech_jp
PRO
0
410
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.1k
Introduction to Bill One Development Engineer
sansan33
PRO
0
380
Webアクセシビリティ技術と実装の実際
tomokusaba
0
210
問い合わせ自動化の技術的挑戦
recruitengineers
PRO
2
150
管理者向けGitHub Enterpriseの運用Tips紹介: 人にもAIにも優しいプラットフォームづくり
yuriemori
0
110
OpenClawで回す組織運営
jacopen
2
450
Devinを導入したら予想外の人たちに好評だった
tomuro
0
880
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
72k
AI Agentにおける評価指標とAgent GPA
tsho
1
300
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Site-Speed That Sticks
csswizardry
13
1.1k
Statistics for Hackers
jakevdp
799
230k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
WCS-LA-2024
lcolladotor
0
470
Leo the Paperboy
mayatellez
4
1.5k
Test your architecture with Archunit
thirion
1
2.2k
The Invisible Side of Design
smashingmag
302
51k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
87
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.8k
Optimising Largest Contentful Paint
csswizardry
37
3.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