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
Pub_Sub
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
株式会社Curious Vehicle
March 14, 2025
0
7
Pub_Sub
株式会社Curious Vehicle
March 14, 2025
Tweet
Share
More Decks by 株式会社Curious Vehicle
See All by 株式会社Curious Vehicle
ElasticsearchのHA構成について
curicle
0
11
機械学習で絶対音感になりたかった
curicle
0
11
BQにおけるSQLアンチパターンとslot消費削減策
curicle
0
15
VibeKanbanについて
curicle
0
10
"バーチャル宮本さん"を作ってみた
curicle
0
8
"バーチャル宮本さん” 本番デプロイ編
curicle
0
14
最近課金しているAIサービスについて
curicle
0
15
音声認識について
curicle
0
12
ファクトリメソッドパターンについて
curicle
0
9
Featured
See All Featured
Speed Design
sergeychernyshev
33
1.6k
Producing Creativity
orderedlist
PRO
348
40k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
150
Between Models and Reality
mayunak
2
230
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Building Adaptive Systems
keathley
44
3k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
480
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Building Applications with DynamoDB
mza
96
7k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.1k
AI: The stuff that nobody shows you
jnunemaker
PRO
3
400
Transcript
第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