I just discovered the paper The End of an Architectural Era (It’s Time for a Complete Rewrite), about re-designing database software from the ground up. It contains some unsurprising predictions — “the next decade will bring domination by shared-nothing computer systems, often called grid computing” — and some interesting ideas: Any database smaller than 1… Continue reading The Great Database Rewrite
I finally found out how to do this, from the Rails Routing shortcut by David Black. In the Rails console, do this: include ActionController::UrlWriter default_url_options[:host] = ‘whatever’ Then you can call your named route methods directly from the console.
I am happy to report that AltLaw.org‘s switch to Solr has worked very well. Solr is a RESTful search engine, built on Lucene. The setup was more complicated than just using a search library, but the rewards were worth it. Before, I was using Ferret, which I still like. It’s a great library, and Dave… Continue reading Basking in the Solr Glow
Answer: you’re using the latest version of Rails (1.2.3), which slightly changes the syntax of its SQL statements. cached_model relies on a regular expression to match that SQL statement. To fix: Dive into the source of the cached_model gem, find the file lib/cached_model.rb, and change the first line after def self.find_by_sql to this: return super… Continue reading Why Doesn’t My Rails App Use memcached with cached_model?
I decided to run AltLaw.org under a “/v1” URL prefix. It’s still beta, and the URL structure will likely change in the future. I don’t want to break 160,000 links when that day comes. Fortunately, Mongrel makes this pretty easy with the –prefix option to mongrel_rails. I added –prefix ‘/v1’ to my mongrel_rails command line.… Continue reading Get Apache Serving Static Files With Prefixed Mongrel
I’ve used Darcs as my only version-control system for a while now. When I got into Rails, I naturally wanted to use Capistrano. Unfortunately, Darcs and Capistrano don’t get along too well. Darcs’ file-based repositories don’t mesh well with Capistrano’s assumption that the repository is accessed through a server, a la Subversion. I ran into… Continue reading Darcs with Capistrano for Rails
Trying to set up Apache2 as a proxy for mongrel on my new Ruby on Rails server, following the instructions on the mongrel site. I kept getting “403 Forbidden” errors on every request. I found a comment that seemed to describe the same situation. Sure enough, editing /etc/apache2/mods-enabled/proxy.conf to change “Deny” to “Allow” fixed the… Continue reading Apache Proxy for Rails Returns 403 Forbidden
Here’s a question that’s been bugging me for a while: what’s the best way to store information that is a mixture of highly- and loosely-structured data? For example, a collection of documents like Project Posner. Certain attributes of each document like the title, date, and citation fit easily into a normalized relational database model. But… Continue reading Where Does the XML Go?