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
プロダクトという一杯を作る - プロダクトチームが味の責任を持つまでの煮込み奮闘記
hiliteeternal
0
460
物語を動かす行動"量" #エンジニアニメ
konifar
14
5.1k
Vibe coding コードレビュー
kinopeee
0
450
WebAssemblyインタプリタを書く ~Component Modelを添えて~
ruccho
1
830
可変性を制する設計: 構造と振る舞いから考える概念モデリングとその実装
a_suenami
10
1.8k
대규모 트래픽을 처리하는 프론트 개발자의 전략
maryang
0
120
DynamoDBは怖くない!〜テーブル設計の勘所とテスト戦略〜
hyamazaki
1
200
iOS開発スターターキットの作り方
akidon0000
0
250
State of CSS 2025
benjaminkott
1
100
Understanding Ruby Grammar Through Conflicts
yui_knk
1
110
なぜ今、Terraformの本を書いたのか? - 著者陣に聞く!『Terraformではじめる実践IaC』登壇資料
fufuhu
4
610
Android 15以上でPDFのテキスト検索を爆速開発!
tonionagauzzi
0
200
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
2.8k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Music & Morning Musume
bryan
46
6.7k
How to Ace a Technical Interview
jacobian
279
23k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Making Projects Easy
brettharned
117
6.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
Writing Fast Ruby
sferik
628
62k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
RailsConf 2023
tenderlove
30
1.2k
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