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
90
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
190
Go aka Golang
mariano
1
100
ElasticSearch: hacer un Google es una papa
mariano
0
68
Random tips that will save your project's life
mariano
0
40
node-db: La excusa perfecta para hablar de C++ y Node.js
mariano
0
67
Episodio VI - El retorno del freelancer
mariano
0
30
Going crazy with NodeJS and CakePHP
mariano
1
59
Other Decks in Programming
See All in Programming
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.1k
開発効率向上のためのリファクタリングの一歩目の選択肢 ~コード分割~ / JJUG CCC 2024 Fall
ryounasso
0
390
Kotlin2でdataクラスの copyメソッドを禁止する/Data class copy function to have the same visibility as constructor
eichisanden
1
160
カスタムしながら理解するGraphQL Connection
yanagii
1
1.4k
現場で役立つモデリング 超入門
masuda220
PRO
14
3k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
240
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
150
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
410
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
140
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
470
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
4
350
Java ジェネリクス入門 2024
nagise
0
650
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
The Invisible Side of Design
smashingmag
297
50k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
810
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
690
Code Review Best Practice
trishagee
64
17k
How to train your dragon (web standard)
notwaldorf
88
5.7k
How GitHub (no longer) Works
holman
310
140k
Speed Design
sergeychernyshev
24
580
KATA
mclloyd
29
13k
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