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
72
Random tips that will save your project's life
mariano
0
45
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
私はどうやって技術力を上げたのか
yusukebe
43
17k
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
1
770
Railsだからできる 例外業務に禍根を残さない 設定設計パターン
ei_ei_eiichi
0
240
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
3.1k
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
920
私達はmodernize packageに夢を見るか feat. go/analysis, go/ast / Go Conference 2025
kaorumuta
2
490
Чего вы не знали о строках в Python – Василий Рябов, PythoNN
sobolevn
0
160
NetworkXとGNNで学ぶグラフデータ分析入門〜複雑な関係性を解き明かすPythonの力〜
mhrtech
3
1k
Back to the Future: Let me tell you about the ACP protocol
terhechte
0
130
Web フロントエンドエンジニアに開かれる AI Agent プロダクト開発 - Vercel AI SDK を観察して AI Agent と仲良くなろう! #FEC余熱NIGHT
izumin5210
3
390
Reduxモダナイズ 〜コードのモダン化を通して、将来のライブラリ移行に備える〜
pvcresin
2
680
Local Peer-to-Peer APIはどのように使われていくのか?
hal_spidernight
2
450
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
20k
The Invisible Side of Design
smashingmag
301
51k
Mobile First: as difficult as doing things right
swwweet
224
10k
The Cult of Friendly URLs
andyhume
79
6.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Producing Creativity
orderedlist
PRO
347
40k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Code Reviewing Like a Champion
maltzj
525
40k
Music & Morning Musume
bryan
46
6.8k
KATA
mclloyd
32
15k
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