Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

SwitchTower is a utility that can execute commands in parallel on
multiple servers. It allows you to define tasks, which can include
commands that are executed on the servers. You can also define roles
for your servers, and then specify that certain tasks apply only to
certain roles. It was developed primarily to ease the pain of
deploying Rails applications to multiple machines, but can be used
for a great deal more than that.
SwitchTower 0.10.0 fixes several longstanding issues and adds some
nice new functionality. I anticipate one (or at most two) more
releases before 1.0.
Project: http://rubyforge.org/projects/switchtower
Manual: http://manuals.rubyonrails.com/read/book/17
Installation is simple:
gem install --include-dependencies switchtower
You can get the whole scoop on what's new in the change log (http://
rubyforge.org/frs/shownotes.php?release_id=3930) or in the
announcement at either http://weblog.rubyonrails.com/articles/
2006/01/02/switchtower-0-10-0 or http://jamis.jamisbuck.org/articles/
2006/01/02/switchtower-0-10-0.
- Jamis

I have a question that may seem dumb, but I can't seem to answer it. I
understand that the situation I describe is only the "default" setup,
and that Switchtower is exceedingly customizable. My question asks "why
is this the default?"
Situation:
Assume I have a version controlled app that I am deploying with
Switchtower.
Every time I deploy, Switchtower creates a new directory (named based on
the date/time of deployment, and redirects the symlink to point to the
newest folder.
Question:
Why does ST create a new folder, instead of simply storing the files in
one place and overwriting them each time?
In the absence on version control, the ST model makes perfect sense.
However, it seems to be that version control makes this model
unnecessary. By simply logging each deployment, the advantages of this
model (such as diff_since_last_deploy) are easily obtainable through
version control.
I am certainly open to the idea that I am missing something vital. I'm
not saying that the ST model is wrong, I'm saying I don't understand
it. I very much hope to be enlightened.
Thank you everyone, I look forward to ..... some enlightenment.
Mike

Hello Mike,
2006/1/3, Mike Harris <GENIE@prodigy.net>:
> Thank you everyone, I look forward to ..... some enlightenment.
I am by no means an expert on SwitchTower (haven't even deployed
once), but I know why it's doing it this way.
If you update the directory from which the application is currently
being served, clients (browsers) might get an inconsistent view of the
system. Views are live - even in production mode. Since ST creates a
new folder everytime, and updates a symlink as the last step of making
the current application live, then the change happens atomically.
Hope that helps !

In addition to providing a consistent view to the users during an
update, it
also allows for rollback of that update if something goes wrong before
the
site is switched over to the new code.
And it does this across however many production machines you may have.