Aggregating to Sun's Community Page
You have to give it to Sun. When a Sun employee leaves, their old blog remains on Sun's blogging site. The employee can't post anymore, but their content is still there. Sometimes, that content ends up higher on the Google searches than an employee's new blog. This is a good indication of how Sun tries to treat it's alumni and former employees.
Another cool thing is that they allow former employees to submit their blogs to their Sun Alumni Blogs Aggregation page. I used to aggregate there, but I disappeared for some reasons. So I applied again, and I'm back up there. That will make one more way that you will be able to find my content. There's a few former employees being aggregated there too. Looks like I'll be in pretty good company.
My Ghost Has More Presence Than I Do
I must confess... I search for "Frederic Jean" on Google at least once a week. I do realize that this is fairly narcissistic. I just can't help it. I was quite proud when this blog showed up as the #1 result for a few days. (It has slipped over to the second page since then...).
Funny thing is that my first blog consistently shows up as the #1 search result. I haven't touched it in almost a year now. Of course, having a sun.com URL has a big impact on the Google Rank of the blog. It's certainly helping raise the Google rank of this blog. Still, it is quite strange that it shows up there quite consistently. Maybe I need to post here more often...
You Know It's Spring...
When you take that first bite of chicken fresh off the grill...
Blog Migration Aftermath
Here's the results of the blog move from my point of view:
- I used to receive at least one problem report from FeedBurner a day. Nothing since the move. There was one problem report on the morning after the move, but it was move related.
- Learned a few things about Apache HTTPD, Mongrel and Pound. Enjoyed the puns attached to having a pack of mongrels at the pound.
- Enjoyed how Typo's architecture made it easier to migrate than I feared.
The most important lesson for me is the importance of having some control over your infrastructure. Shared hosting is a fine start. I still use it to host my pictures and my email. The price of shared hosting is a loss of control over your applications. You can't be trusted to have root access since you may impact other customer's applications. You can't have access to some utilities that help you troubleshoot your problems because you may expose someone else's application's internals.
The nice thing with using a VPS hosting provider such as Slicehost is that you do gain most of that control back. You still have to share the server's resources with the other users on the system, but you do have full root access in you slice. You can reinstall the OS, install the latest and greatest release of the software and manage what gets exposed to the internet and what remains internal. The console and the option of reinstalling the software is right there in the management console.
Tweaking My Blog Config
I really don't expect to get too much traffic on my blog. FeedBurner tells me that I do have a few subscribers, and a handful of visitors a day. My pride does suffer a little because my wife's blog gets more traffic than I do. She does have a much better voice than I do when it comes to blogging. She also says that my content is, well, boring.
Still, I wanted to play a bit with using a pack of mongrels to run typo and to have Apache's httpd serve the static content directly. Application servers are great at generating content based on Ruby on Rails views or a Java Server Page. They don't do as well when it comes down to serving static files from the file system. Apache httpd allows you to configure aliases for different URIs. Thankfully, there were a few well defined URIs that are used to request static content. All I needed to do to offload the static file serving to httpd was to add the following line to my configuration file:
AliasMatch ^/(images|files|stylesheets|javascripts)/ "/home/fjean/sites/typo/public/$1/"
This will help keep the mongrels focus on generating the dynamic content rather than serving static files. Another advantage is that httpd handles the If-Modified headers correctly. As a result, the browsers can ask for a file only if it was modified after a certain time. If the server responds with a 304 response code, the browser knows to use the cached copy of the file. This does save on bandwidth.
I still had a single instance of mongrel running the blog at that point. A single mongrel should be sufficient with my current traffic. I still wanted more though. There was a slight problem though. Apache httpd 2.0.54 (which is installed by default on Ubuntu Dapper) doesn't have the proxy_balancer module. I did try to get it to compile and run on the server earlier without success. I did have another option. Pound is a software based load balancer that is able to balance traffic across multiple mongrel instances. I installed it by running "aptitude install pound". I then had pound installed.
The next step was to configure Typo to run on a pack of mongrels. I was in luck since I used the typo gem to install Typo. I used the following command to configure typo:
typo config ~/sites/typo bind-address=localhost port-number=4532 web-server=mongrel_cluster threads=3
(You should really stop Typo first btw...). I was then able to start the pack by issuing the "typo start ~/sites/typo" command. I did tell Typo to bind the mongrels to the localhost address. The reason is that I didn't want the mongrel processes exposed to the internet. There is really no point unless something is wrong and I need to troubleshoot the pack.
The next step was to configure Pound. The configuration file is found under /etc/pound/pound.cfg. I configured pound to bind to localhost:8888 and to forward content to the pack of mongrels. The important configuration bits are:
ListenHTTP 127.0.0.1,8888
##
UrlGroup ".*"
BackEnd 127.0.0.1,4532,1
BackEnd 127.0.0.1,4533,1
BackEnd 127.0.0.1,4534,1
EndGroup
Here again, there was no point in exposing Pound to the internet. Apache httpd will simply proxy traffic to Pound, which will then distribute it. I then had to enable pound by editing /etc/default/pound and set startup to 1. This was a signal to pound that it was configured. I started it by running /etc/init.d/pound start. The last configuration change was in the apache configuration file. I changed the proxying RewriteRule to send traffic to Pound rather than the first mongrel:
RewriteRule ^/(.*)$ http://localhost:8888/$1 [P,QSA,L]
I then restarted Apache and had a fully functional Typo installation that delegates serving static files to Apache httpd and is run by a pack of mongrels in a pound.
Now, if only I could do this with the servers at work...
Getting Apache, Mongrel and FeedBurner to Play Nice
I moved my blog from Textdrive to a Slicehost slice on Sunday. For the most part, the migration went well. Once I had Typo up and running on the slice, I just had to copy my theme, a few resource files and use a dump of the database to rebuild the content.
I had a little more trouble getting Apache to proxy requests to Mongrel and redirect all feed requests to FeedBurner (except for FeedBurner's of course...). I finally got mod_rewrite and mod_proxy to cooperate.
The first thing to remember is that the normal proxy approach will prevent the rewrite rules from working. Instead of using ProxyPass statements, I had to use RewriteRule. You'll need to enable the proxy, proxy_http and rewrite modules. Next, you'll need the following rules:
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !FeedBurner
RewriteRule ^/xml/(atom|rss|rss20)/feed.xml$ http://feeds.feedburner.com/fredjean/outofmymind [R=301,L]
RewriteRule ^/(.*)$ http://localhost:3000/$1 [P]
The Proxy blocks enables the proxy module. The rewrite module will not be able to proxy the request to Mongrel if it is not set.
The RewriteCond line determines whether the user agent identifies itself as being something else than FeedBurner. If it is, the client is redirected to the FeedBurner URL. This allows FeedBurner to pass through and retrieve the feed. The redirect here is marked as being permanent (301 is the permanent redirect HTTP response code). We also tell RewriteRule to stop processing the rules at that point.
The last line proxies the request to Mongrel so it can be handled. Mongrel in turns runs the Typo blog engine. Once Typo is done, the response travels back through Mongrel, apache and makes its way back to the client.
New Digs
Last weekend, TransZap moved from our old offices near Denver's Civic center to our new location at 1999 Broadway. The new offices are definitively a step up from the previous ones (which were actually pretty decent to start with). The new offices are located into a very nice office tower located at the northern edge of downtown. Yet, we are still really close to the 16th street mall. This move generated a lot of excitement at TransZap, and it went very well with only a few minor issues.
The new building is in the middle of a major renovation. The common areas will be completely redecorated. There's going to be a cafe and a workout area on the second floor. I intend to avoid the first and use the second. I can certainly use the exercise. A few other nice amenities are that a light rail line stops next to the building and that there's a Wahoo's Fish Tacos restaurant within a few blocks.
One of the result of the move is that every one has their own office, each with a window. It's a big improvement from working in the hallway. I have a pretty decent view out of the window. On a good day, the brown cloud isn't too bad and I can almost see the King Suppers near my house. If I twist just right, I can even see the Flat Irons.
Mollie and I now carpool to work. Mollie is now starting a little later than she used to. She gets to sleep a little more, I don't have to wake up any earlier. Carpooling allows us to ride the HOV lane into downtown, which allows us to avoid the I-25 parking lot. I do get to the office a little earlier than I used to, but it also means that I can leave earlier than I used to. At the end of the day, we both meet at her parking garage and ride out.

