Working on a custom CMS, I was tasked to add a feature that allowed users to mark pages as secure. This allowed them to take sensitive data, and then turn around and email it plain text. Go figure.

My logic was simple.

  • Allow the users to specify which pages are un/secure
  • When visiting a page:
    1. If the page is secure, and they’re not in a secure page redirect to https
    2. Else if the page is not secure and they’re at a secure page redirect to http (Don’t want any unnecessary encryption)
    3. Otherwise we’re dandy

Well to develop this, I placed Pound a really neat little load balancer, infront of a single Mongrel server, and created a self signed certificate. So far so good.

Then I spent the next few hours trying to figure out why my code was redirecting to the correct url, but the browser stayed in a tailspin.

First I thought maybe an obscure bug in Rails (I was using a pretty old version of the framework). Tests showed otherwise, and so did a sample dummy project using 1.2.3.

Then I suspected some crazy caching in firefox. Other browsers reproduced the same effect.

Finally, throwing up my hands I decided to just configure Apache to sit infront of a single Mongrel server. Works just fine.

I hope I can narrow down exactly what the issue is with Pound and Mongrel that doesn’t allow Rails to redirect to the same url (except a change in the protocol), but as swamped as I am at work, that’s a lofty goal.

I’m willing to bet that this behavior is only prominent when Pound sits directly infront of Mongrel(s), and not when Pound is infront of other servers like Apache, Lighttpd, Nginx, etc (which in turn sit infront of the Mongrel(s)). And I’m doubtful that there are many production deployments consisting of just Pound and Mongrel, but man it makes debugging a pain in the ass.

MySQL and OSX

July 25th, 2007

I have some weird logic in determining what I compile and what I install via ports

Examples of things I typically compile by hand:
  • Apache
  • Ruby
  • PHP
  • SVN
  • SQLite3
Examples of things I typically install via a Package or Ports
  • MySQL
  • PNG, JPEG, TIFF libraries
  • Other low level libraries

I noticed when I installed MySQL 5.0.45 from the package distribution I had some problems compiling against other libraries. It turns out that mysql will install itself in /usr/local/mysql/, and it’s libraries in /usr/local/mysql/lib which is typical.

However I noticed I had problems compiling a lot of software that depended upon MySQL because they looked for those libraries in /usr/local/mysql/lib/mysql.

Two solutions:

1. Hunt down the config to specify /usr/local/mysql/lib instead of /usr/local/mysql/lib/mysql

OR

2. Just create the mysql directory in /usr/local/mysql/lib and inside that directory:

  sudo ln -s ../*

The lazy in me chose #2

Our Newest Hire

July 19th, 2007

Aaron and I have been talking a lot the past couple weeks about the overwhelming about of work we have at Elevator Up. It really is a good thing, and I’m not complaining at all. Busy startups are longer lived startups.

We’re still keeping our eye out for good design work, but we noticed our greatest need was in production as well as alleviating Aaron with some of his non-code stresses.

So everyone, give welcome to Janson Hartliep, our newest hire. I feel like he’s going to be a great fit for team and hopefully soon he can help me crank out some of our longest running projects like Eventable.

New House

July 19th, 2007

I’ve been rather quiet the past few weeks due to Brittany and I buying our first house. After 3 years of renting, we felt we were finally stable enough to make a commitment with our own home.

We purchased our brand new house in Howard City, MI. Everyone I talk to gives me this pained “I’m sorry about your commute” look, and no one seems to believe me that, it’s really not that bad.

Sure gas prices are a pain in the ass, but it’s actually nice to have an hour to sit and stew over what I need to do that day, or what I did that afternoon.

I’m rather lucky since we live only 5 minutes from the interstate, so it’s pretty much smooth sailing. But with the number of Orange Barrels I pass everyday, it feels like this month all of Michigan road construction decided to focus on Grand Rapids.

Hopefully soon I’ll post some pictures of our new home, and the area.