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
100
0
Share
Disque
Lightning talk given at New York for CakeFest 2015
Mariano Iglesias
May 30, 2015
More Decks by Mariano Iglesias
See All by Mariano Iglesias
Simple is Good, Complex is Bad
mariano
2
160
A future without frameworks
mariano
2
210
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
75
Random tips that will save your project's life
mariano
0
55
node-db: La excusa perfecta para hablar de C++ y Node.js
mariano
0
80
Episodio VI - El retorno del freelancer
mariano
0
40
Going crazy with NodeJS and CakePHP
mariano
1
71
Other Decks in Programming
See All in Programming
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
200
Server-Side Kotlin LT大会 vol.18 [Kotlin-lspの最新情報と Neovimのlsp設定例]
yasunori0418
1
120
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
2.9k
의존성 주입과 모듈화
fornewid
0
130
TiDBのアーキテクチャから学ぶ分散システム入門 〜MySQL互換のNewSQLは何を解決するのか〜 / tidb-architecture-study
dznbk
1
160
セグメントとターゲットを意識するプロポーザルの書き方 〜採択の鍵は、誰に刺すかを見極めるマーケティング戦略にある〜
m3m0r7
PRO
0
500
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
760
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
1
160
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.5k
実践CRDT
tamadeveloper
0
470
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
250
JAWS-UG横浜 #100 祝・第100回スペシャルAWS は VPC レスの時代へ
maroon1st
0
110
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
270
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Odyssey Design
rkendrick25
PRO
2
570
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
370
The Limits of Empathy - UXLibs8
cassininazir
1
290
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
4 Signs Your Business is Dying
shpigford
187
22k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
330
The Language of Interfaces
destraynor
162
26k
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