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
41
Voice to guide "difficult" recycling queries
d6y
0
52
Brighton Java: Day in the life...
d6y
0
220
Day in the Life of a Functional Programmer
d6y
0
620
Exoplanet Safari
d6y
1
430
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
AI時代の知識創造 ─GeminiとSECIモデルで読み解く “暗黙知”と創造の境界線
nyagasan
0
150
20250719_JAWS_kobe
takuyay0ne
1
170
PdM業務における使い分け
shinshiro
0
650
Webの技術とガジェットで那須の子ども達にワクワクを! / IoTLT_20250720
you
PRO
0
130
Semantic Machine Intelligence for Vision, Language, and Actions
keio_smilab
PRO
2
410
Tiptapで実現する堅牢で柔軟なエディター開発
kirik
1
140
Power Automate のパフォーマンス改善レシピ / Power Automate Performance Improvement Recipes
karamem0
0
250
怖くない!GritQLでBiomeプラグインを作ろうよ
pal4de
1
130
Microsoft Learn MCP/Fabric データエージェント/Fabric MCP/Copilot Studio-簡単・便利なAIエージェント作ってみた
reireireijinjin6
1
110
With Devin -AIの自律とメンバーの自立
kotanin0
2
570
LLM開発を支えるエヌビディアの生成AIエコシステム
acceleratedmu3n
0
290
ファインディにおける Dataform ブランチ戦略
hiracky16
0
200
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
51
8.6k
Site-Speed That Sticks
csswizardry
10
720
Designing Experiences People Love
moore
142
24k
Statistics for Hackers
jakevdp
799
220k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
The Language of Interfaces
destraynor
158
25k
RailsConf 2023
tenderlove
30
1.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Art, The Web, and Tiny UX
lynnandtonic
301
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Bash Introduction
62gerente
613
210k
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