Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Pub_Sub
Search
株式会社Curious Vehicle
March 14, 2025
21
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pub_Sub
株式会社Curious Vehicle
March 14, 2025
Transcript
20 slides
第12回 2012/10/02 : 飯田
Pub/Sub
Index 基礎編 Pub/Sub とは Pub/Sub の実装 Pub/Sub in redis 実装編
概要 構成 実装の遷移 まとめ
基礎編
Pub/Subとは • Pub/Sub = Publisher / Subscriber • 出版購買型モデル •
非同期メッセージングパラダイムの一種 • 特徴 ◦ メッセージの送信者は受信者を特定しない ◦ 受信者は指定したトピックに関するメッセージのみを受 信する ◦ メッセージの受信者は送信者を問わない
Pub/Subとは MessageBroker Topic A Topic B Topic C Topic D
Topic Z : Subscriber(受信者) 登録 登録 登録
Pub/Subとは MessageBroker Topic A Topic B Topic C Topic D
Topic Z : Publisher(送信者) Subscriber(受信者)
Pub/Subとは MessageBroker Topic A Topic B Topic C Topic D
Topic Z : Publisher(送信者) Subscriber(受信者)
Pub/Subとは MessageBroker Topic A Topic B Topic C Topic D
Topic Z : Publisher(送信者) Subscriber(受信者)
• HedWig ◦ ZooKeeper ◦ BookKeeper https://cwiki.apache.org/confluence/display/BOOKKEEPER/HedWig • redis ◦
KVS http://redis.io/topics/pubsub Pub/Sub の実装 • PubSubHubbub ◦ Google http://code.google.com/p/pubsubhubbub/
Pub/Sub in redis in @pubsub group 1. PUBLISH channel messge
2. SUBSCRIBE channel 3. UNSUBSCRIBE [channel [channel ...]] 4. PSUBSCRIBE pattern 5. PUNBSUBSCRIBE [pattern [pattern ...]]
実装編
概要 ▪ 第一弾:アクセスカウンター ▪ なぜアクセスカウンターか? ▪ リアルタイム解析 ▪ 時間軸とデータ保持
構成 Real Time core Pub/Sub Client Pub/Sub Server user access
subscribe access publish processing message display
構成 Real Time core Pub/Sub Client Pub/Sub Server user access
subscribe access publish processing message display S4 redis node websocket
実装の遷移 Access Counter Widget chat / advertise Monitor Manager
実装の遷移 Access Counter Widget chat / advertise Monitor Manager Site
Manager Client Dashboard
redis node websocket S4 実装の遷移 user access subscribe publish processing
message display access 次世代 S4 ZooKeeper
まとめ
まとめ 1. リアルタイムアクションに必須 2. 非同期処理に最適 3. 容易にやるならば redis
More Decks by 株式会社Curious Vehicle
See All by 株式会社Curious Vehicle
AI Agent Harness 入門
curicle
0
18
クネビンフレームワークで考える最初の一歩
curicle
0
9
AIガバナンス
curicle
0
12
PQCが変える暗号の世界
curicle
0
64
最近流行ってるClaudeについて
curicle
0
22
ElasticsearchのHA構成について
curicle
0
34
機械学習で絶対音感になりたかった
curicle
0
23
BQにおけるSQLアンチパターンとslot消費削減策
curicle
0
45
VibeKanbanについて
curicle
0
22
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
350
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
4
1.3k
Marketing to machines
jonoalderson
1
6k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.5k
Optimising Largest Contentful Paint
csswizardry
37
4k
[SF Ruby Conf 2025] Rails X
palkan
3
1.6k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Become a Pro
speakerdeck
PRO
31
6.4k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
650
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The Art of Programming - Codeland 2020
erikaheidi
57
15k