github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

dsturnbull / rackjour

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 32
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Distribute your rack apps across the network automatically with bonjour — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Revert "hurrr dead end". 
dsturnbull (author)
Thu Nov 19 13:29:40 -0800 2009
commit  9913b0f2bb0b089de1aabe2df4db77057df598a4
tree    5c5fd14ca967cd129387f553c06580761f6368a2
parent  4806ec2cb88f295378282f9f584edb53ad4122b9
rackjour /
name age
history
message
file .gitignore Loading commit data...
file Gemfile
file README
file Rakefile
directory features/
directory lib/
file rackjour.gemspec
directory spec/
README
Installation
+------------
| gem install rackjour

Usage
+-----
| in your config.ru, use Rackjour::Master
| 
| on your app servers, run 'rackjour' (takes -d for daemon mode)
| 
| rackjour will distribute your app to each host running rackjour,
| and run each rack app in your rackup config on the least loaded host
| 

Example
+-------
| in rackjour/spec/fixtures/example_app/
| $ rackup
| 
| in another terminal
| $ rackjour
| 

Details
+-------
| 09:09 <dav> so basically... you run 'rackjour' on some host, and it advertises itself as a rackjour worker, via
|             bonjour
| 09:09 <dav> when you run a rack app that uses Rackjour::Master, it starts a thread that looks for these rackjour
|             workers
| 09:10 <dav> when it does, it tars itself and sends itself to the other host, and then runs each rack app on there
| 09:10 <julio> ok... so instead of deploying to multiple hosts
| 09:10 <julio> you use that
| 09:10 <dav> yes
| 09:10 <dav> when a request comes in to the rack app, when it gets to Rackjour::Master#call, it looks at @servers for
|             valid hosts and sends the request there
| 09:10 <dav> by "sends the request there" i mean
| 09:10 <julio> yeah, sends the environment
| 09:10 <julio> parsed by rack
| 09:11 <dav> it iterates over all rack apps configured, calling each one in turn
| 09:11 <dav> in the example, it's "use Rackjour::Master; use Pokey; use Geokit; run Example"
| 09:11 <dav> so Rackjour::Master#send: @servers.random.call(Example, @servers.random.call(Geokit,
|             @servers.random.call(Pokey, env)))
| 09:11 <dav> basically
| 09:12 <dav> it's not actually hardcoded like that
| 09:12 <julio> so theres 2 things its doing there
| 09:12 <julio> 1) its sparing me from having to deploy because its copying my app
| 09:12 <julio> 2) it distributes requests
| 09:12 <julio> ?
| 09:12 <dav> yeah you just run rackup
| 09:12 <dav> and it deploys
| 09:12 <dav> and load balances
| 09:12 <dav> although the load balancing is not actually in the code yet
| 09:12 <dav> it's really just @servers.first.call
| 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server