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
Disque
Search
Mariano Iglesias
May 30, 2015
Programming
0
100
Disque
Lightning talk given at New York for CakeFest 2015
Mariano Iglesias
May 30, 2015
Tweet
Share
More Decks by Mariano Iglesias
See All by Mariano Iglesias
Simple is Good, Complex is Bad
mariano
2
150
A future without frameworks
mariano
2
200
Procesando pagos: LO ESTÁS HACIENDO MAL
mariano
0
200
Go aka Golang
mariano
1
110
ElasticSearch: hacer un Google es una papa
mariano
0
74
Random tips that will save your project's life
mariano
0
52
node-db: La excusa perfecta para hablar de C++ y Node.js
mariano
0
77
Episodio VI - El retorno del freelancer
mariano
0
38
Going crazy with NodeJS and CakePHP
mariano
1
70
Other Decks in Programming
See All in Programming
Patterns of Patterns
denyspoltorak
0
1.4k
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
480
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
160
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
組織で育むオブザーバビリティ
ryota_hnk
0
170
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
400
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
990
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
280
Optimizing for Happiness
mojombo
379
71k
How to build a perfect <img>
jonoalderson
1
4.9k
The Invisible Side of Design
smashingmag
302
51k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The Spectacular Lies of Maps
axbom
PRO
1
510
How to Ace a Technical Interview
jacobian
281
24k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Transcript
Disque A job queue to win it all
#DoingItWrong
Using Redis as a queue? No longer needed
• Non-blocking server • Distributed • Replication • In memory
• Job acknolwedging • If not acknolwedged, goes back to
queue • Job retries • Job delay
#Run
$ disque /etc/disque/7711.conf $ disque /etc/disque/7712.conf $ disque -p 7711
127.0.0.1:7711> cluster meet 127.0.0.1 7712 OK 127.0.0.1:7711> HELLO 1) (integer) 1 2) "26a390eb07bba018a9ed0591b2110479f16bb19d" 3) 1) "26a390eb07bba018a9ed0591b2110479f16bb19d" 2) "127.0.0.1" 3) "7711" 4) "1" 4) 1) "9ccaa86ceaf032eeb67097d639b80315090f79d5" 2) "127.0.0.1" 3) "7712" 4) "1"
#PHP
github.com/mariano/disque-php $ composer install mariano/disque-php
$disque = new \Disque\Client([ '127.0.0.1:7111', '127.0.0.2:7112' ]); $job = new
\App\Jobs\EmailJob([ 'email' => '
[email protected]
', 'template' => 'signed_up' ]); $disque->queue('emails')->push($job); $job = new \App\Jobs\RemindActivation($user); $disque->queue('emails')->schedule($job, new \DateTime('+1 week'));
$queue = $disque->queue('emails'); while ($job = $queue->pull()) { $job->execute(); $queue->processed($job);
}
#CLIGotchas
• Memory! • Error recovery • SIGINT • supervisord