Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

yay

  • Loading branch information...
commit 50544432f4ee1003c90d6fe1a1b11c7a222ba3b7 0 parents
@defunkt authored
1  .gitignore
@@ -0,0 +1 @@
+.DS_Store
BIN  resque/1_overview/octocat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 resque/1_overview/overview.md
@@ -0,0 +1,62 @@
+!SLIDE
+
+# ¡Resque!
+
+!SLIDE center
+
+# GitHub's Background Processing Library
+
+![Octocat](octocat.png)
+
+!SLIDE bullets incremental
+
+# ¡Resque!
+
+* Redis-backed
+* parent / child fork model
+* god / monit friendly
+* Sinatra web UI
+
+!SLIDE bullets incremental
+
+# Why Redis?
+
+* Atomic push and pop
+* O(1) push and pop
+* High visibility
+* Modify existing queue in place
+
+!SLIDE bullets incremental
+
+# parent / child forking
+
+* Parent starts & loads environment
+* Parent grabs a job
+* Parent forks
+* Child processes job
+* Child exits
+* Repeat!
+
+!SLIDE bullets incremental
+
+# parent / child forking
+
+* Child can die, parent lives on
+* Parent is free to listen and respond to signals
+* Parent can kill unruly children
+* Parent can kill long running children
+
+!SLIDE bullets incremental
+
+# god / monit friendly
+
+* Parent responds promptly to signals
+* Can gracefully or forcefully shut down
+* Advertises runtime in procline
+* `resque: Forked 2739 at 1264118796`
+
+!SLIDE center
+
+# Sinatra web UI
+
+![web-ui](web-ui.png)
BIN  resque/1_overview/web-ui.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 resque/2_queues/queues.md
@@ -0,0 +1,27 @@
+!SLIDE bullets incremental
+
+# Queues
+
+* Supports multiple queues
+* Determine priority
+* Determine locality
+* (or both)
+
+!SLIDE ruby
+
+# Priority
+
+## `$ QUEUES=high,low rake resque:work`
+
+!SLIDE ruby
+
+# Locality
+
+## `$ QUEUES=file_serve rake resque:work`
+
+!SLIDE ruby
+
+# Consume all queues
+
+## `$ QUEUES=* rake resque:work`
+
53 resque/3_queueing/queueing.md
@@ -0,0 +1,53 @@
+!SLIDE bullets incremental
+
+# Jobs
+
+* Normal Ruby classes or modules
+* Must respond to `perform`
+* Any arguments are passed to `perform`
+* `@queue` class ivar determines queue
+
+!SLIDE ruby
+
+ @@@ ruby
+ class Archive
+ @queue = :file_serve
+
+ def self.perform(repo_id, branch = nil)
+ repo = Repository.find(repo_id)
+ repo.create_archive(branch || "master")
+ end
+ end
+
+!SLIDE ruby
+
+ @@@ ruby
+ Resque.enqueue(Archive, @repo.id, branch)
+
+!SLIDE ruby
+
+ @@@ ruby
+ Resque::Job.create(:file_serve,
+ Archive,
+ @repo.id,
+ branch)
+
+!SLIDE
+
+# Persistence
+
+## Jobs are stored as JSON
+
+!SLIDE javascript
+
+ @@@ javascript
+ {
+ "class": "Archive",
+ "args": [ 44, "masterbrew" ]
+ }
+
+!SLIDE
+
+# Persistence
+
+## Only objects that can be serialized to JSON can be queued as args
25 resque/4_uses/uses.md
@@ -0,0 +1,25 @@
+!SLIDE bullets incremental
+
+# Things to Queue
+
+* Warming caches
+* Counting disk usage
+* Building tarballs
+* Firing web hooks
+
+!SLIDE bullets incremental
+
+# More Things to Queue
+
+* Creating events in the db
+* Building graphs
+* Deleting users (and their associated data)
+* Updating our search index
+
+!SLIDE bullets incremental
+
+# Even More Things to Queue
+
+* Sending Emails
+* Data integrity checks
+* Friendship graph assemblage
BIN  resque/5_plugins/octocat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 resque/5_plugins/plugins.md
@@ -0,0 +1,31 @@
+!SLIDE bullets incremental
+
+# Plugins
+
+* Resque featured locked until 2.0
+* Focusing on stability and fault tolerance
+* Plugins are how to get more functionality
+
+!SLIDE
+
+# quirkey/resque-status
+
+## Provides simple trackable jobs.
+
+![octocat](octocat.png)
+
+!SLIDE
+
+# zapnap/resque_mailer
+
+## Send asynchronous email with ActionMailer.
+
+![octocat](octocat.png)
+
+!SLIDE
+
+# bvandenbos/resque-scheduler
+
+## A light-weight job scheduling system.
+
+![octocat](octocat.png)
7 resque/6_get_resque/get_resque.md
@@ -0,0 +1,7 @@
+!SLIDE
+
+# ¡Resque!
+
+## http://bit.ly/resque
+## http://bit.ly/resque-post
+## git clone git://github.com/defunkt/resque
6 resque/7_fin/fin.md
@@ -0,0 +1,6 @@
+!SLIDE
+
+# Thanks!
+
+### ( Created using Showoff )
+### ( schacon/showoff @ github )
BIN  resque/7_fin/octocat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3  showoff.json
@@ -0,0 +1,3 @@
+[
+ {"section":"resque"}
+]
Please sign in to comment.
Something went wrong with that request. Please try again.