Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Disque
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Mariano Iglesias
May 30, 2015
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Disque
Lightning talk given at New York for CakeFest 2015
Mariano Iglesias
May 30, 2015
Transcript
13 slides
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
More Decks by Mariano Iglesias
See All by Mariano Iglesias
Simple is Good, Complex is Bad
mariano
2
170
A future without frameworks
mariano
2
220
Procesando pagos: LO ESTÁS HACIENDO MAL
mariano
0
210
Go aka Golang
mariano
1
120
ElasticSearch: hacer un Google es una papa
mariano
0
82
Random tips that will save your project's life
mariano
0
59
node-db: La excusa perfecta para hablar de C++ y Node.js
mariano
0
91
Episodio VI - El retorno del freelancer
mariano
0
48
Going crazy with NodeJS and CakePHP
mariano
1
84
Other Decks in Programming
See All in Programming
眠らない開発チームの作り方
biwakonbu
0
100
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
240
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
180
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
17
9.5k
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
150
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
180
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
610
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
Going Full Circle with Virtual Graphs and Relational Databases
michaelsimons
1
110
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
800
AppFunctionsの内部実装を紐解く
hiroaki404
0
120
Distance field of Julia set
kinakomoti321
0
330
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5.2k
The Invisible Side of Design
smashingmag
301
52k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Heart Work Chapter 1 - Part 1
lfama
PRO
11
37k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
670
Designing Experiences People Love
moore
143
24k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
580
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Fireside Chat
paigeccino
43
4.1k