After some long neglect, I finally had a reason to use the active_scaffold_sortable plugin again. Getting in to the code, I was ashamed at how broken it was. But, after about an hour of polishing and cleanup, it's good as new and ready to be used again.
Here's a screencast to show you exactly what it is:
See: activescaffold with sorted lists is fun!
Note: the urls for the repositories have been moved since this screencast was made. The new home for active scaffold repositories can be found here: http://github.com/activescaffold.
Labels: plugins rails
Ben Mabey, a stellar URUG member here, has posted some amazing content for the RSpec Story Runner and using Webrat:
If you haven't heard of the RSpec Story Runner or Webrat, and are interested in integration testing for your website, you really should be checking these articles out.
Webrat can be found over on the Webrat Git Repository
Last week, as I was about to deploy a small application, I got a case of "ughh". Well, if there is such a case, I had it. Normally, I deploy with mod_fcgid, Apache, and suexec. It's an awesome solution that's difficult to set up but easier to maintain.
Roughly, here's the steps to such a deployment:
You can imagine why I dreaded doing that for one tiny non-mission-critical application with one controller.
The Mongrel Cluster / HTTP proxy is a great solution, perhaps the most popular now. I've never been a huge fan. Why? Well... I'll tell you (he's going to tell, he's going to tell... @ 7:30)
So I heard some buzz recently about Passenger (aka mod_rails): something about rails deployment as easy as uploading your application. That sounded really good. I didn't care about benchmarks for this app, but as it turns out, passenger is about on par with "thin", and is faster than mongrel! Sweet lovin'.
After 2 minutes of going through the setup instructions and deploying my code, I was incredulous. "Watch, I'm going to start the application up, and everything will just fall apart." I was pleasantly proven wrong!
Here's a summary of the install steps for mod_rails (Passenger)
And, I was pleasantly shocked to discover that it intelligently ran the rails processes as the user I deployed the application as. It checks config/environment.rb, and runs as the owner of that file. Hot stuff! And to reboot the server, just type "touch tmp/restart" - You could reboot your app with scp, rsync, ssh, ftp, samba, magnetic needles, anything! No need to have sudo access. No pid files. No "killall". Hot hot hot!
How's stability? I've converted our mongrel and fcgid deployments over to mod_rails now. Things are running smoothly. There seems to be a bit of a lag if the app isn't in use for a while (I don't think it keeps a minimum pool available, which would be a nice feature). I had a few issues with slowness on version 1.0.1, but 1.0.2 and onward has been rock solid. Oh - 1.0.4 doesn't work on the default install of Apache server for OS X Server - use 1.0.3 instead.
| mod_rails | fcgid | Mongrel Cluster | |
|---|---|---|---|
| Speed | Great (enterprise edition rumoured to be much faster) | Great | Great |
| Memory usage | Slightly better (enterprise edition rumoured to reduce memory consumption by 33%) | Slightly better | Average |
| Reliability | Great | Great | Pretty good |
| Ease of setup | Easy | Difficult | Moderate |
| Graceful restarts? (restart app w/out dropping a single request) |
Yes | Yes | Possible (send kill -USR2 all mongrel pids) |
| App restarted on apache restart | Yes | Yes | No |
| Automatic process cycling | Yes | Yes | No |
| Process management | Allocates on demand | Allocates on demand | Fixed regardless of load |
| Ability to set minimum process count per App | No | Yes | Yes |
| Set max process count per App | No (... actually, yes!) | Yes | Yes |
March 2008 April 2008 May 2008 June 2008 July 2008 August 2008 October 2008 November 2008 February 2009 June 2009 December 2009 January 2010 February 2010 May 2010 June 2010 November 2010
Subscribe to Posts [Atom]