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
91
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
190
Procesando pagos: LO ESTÁS HACIENDO MAL
mariano
0
200
Go aka Golang
mariano
1
100
ElasticSearch: hacer un Google es una papa
mariano
0
71
Random tips that will save your project's life
mariano
0
43
node-db: La excusa perfecta para hablar de C++ y Node.js
mariano
0
75
Episodio VI - El retorno del freelancer
mariano
0
33
Going crazy with NodeJS and CakePHP
mariano
1
64
Other Decks in Programming
See All in Programming
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
540
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
150
Java on Azure で LangGraph!
kohei3110
0
170
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
240
Result型で“失敗”を型にするPHPコードの書き方
kajitack
4
380
WindowInsetsだってテストしたい
ryunen344
1
190
A2A プロトコルを試してみる
azukiazusa1
2
1.1k
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
120
ニーリーにおけるプロダクトエンジニア
nealle
0
490
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
1
400
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
850
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
380
Featured
See All Featured
Fireside Chat
paigeccino
37
3.5k
Being A Developer After 40
akosma
90
590k
How GitHub (no longer) Works
holman
314
140k
Typedesign – Prime Four
hannesfritz
42
2.7k
Speed Design
sergeychernyshev
32
1k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Why You Should Never Use an ORM
jnunemaker
PRO
57
9.4k
Navigating Team Friction
lara
187
15k
Into the Great Unknown - MozCon
thekraken
39
1.9k
How to train your dragon (web standard)
notwaldorf
93
6.1k
How to Ace a Technical Interview
jacobian
277
23k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
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