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
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
71
Random tips that will save your project's life
mariano
0
44
node-db: La excusa perfecta para hablar de C++ y Node.js
mariano
0
76
Episodio VI - El retorno del freelancer
mariano
0
33
Going crazy with NodeJS and CakePHP
mariano
1
65
Other Decks in Programming
See All in Programming
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.7k
Kiroで始めるAI-DLC
kaonash
2
580
print("Hello, World")
eddie
1
520
FindyにおけるTakumi活用と脆弱性管理のこれから
rvirus0817
0
480
Swift Updates - Learn Languages 2025
koher
2
470
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
200
🔨 小さなビルドシステムを作る
momeemt
3
670
Cache Me If You Can
ryunen344
1
610
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
470
rage against annotate_predecessor
junk0612
0
160
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
290
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
380
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
920
How to train your dragon (web standard)
notwaldorf
96
6.2k
Typedesign – Prime Four
hannesfritz
42
2.8k
4 Signs Your Business is Dying
shpigford
184
22k
GraphQLの誤解/rethinking-graphql
sonatard
72
11k
A designer walks into a library…
pauljervisheath
207
24k
Producing Creativity
orderedlist
PRO
347
40k
Writing Fast Ruby
sferik
628
62k
It's Worth the Effort
3n
187
28k
Designing Experiences People Love
moore
142
24k
Balancing Empowerment & Direction
lara
3
620
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.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