Archive

Archive for the ‘Technology’ Category

Anatomy of Project 365

February 10th, 2010

With the recent launch of my Project 365 website, I thought some people might be interested in what technology went into creating it.

Server-side

  • Rackspace Cloud Servers – This was my first use of Rackspace, and I’m actually quite happy with the service. The price is very reasonable, and the customer service is some of the best I have worked with.
  • Rackspace Cloud Files – While in many regards I like Amazon S3 better, I chose Cloud Files because of the free bandwidth to my server and for the deep integration with the Limelight CDN network. Each photo that is viewed from Project 365 is served through that CDN, and this ensures the fastest and most reliable experience possible.
  • Debian 5.0 (Sarge) – Ubuntu is the new superstar in the Linux world, and I think it’s a great operating for a novice user looking for a stable desktop. For a production server, however, I’m a firm believer in Debian. Releases are slow and deliberate, and I can be certain that every piece of software has been tested.
  • PostgreSQL – I’m not certain why so many people use MySQL. PostgreSQL has a ton more features, and its future isn’t tied to a corporation with a history of killing good products. This was my first experience with PostgreSQL, and I’m very happy with that choice so far.
  • nginx – Apache is the 800-pound gorilla in the web server world, but it was simply overkill for what I needed with this site. I opted to go with the light-weight nginx, which is the only web server that Wordpress.com found to be usable for their workloads.
  • Phusion Passenger – Combined with Ruby Enterprise Edition, this is simply the fastest, most memory-efficient method of running a production Ruby on Rails server. Recent support of nginx made the choice a no-brainer.
  • Ruby Enterprise Edition – On average this reduces memory usage by 33%. Consider me sold.
  • Rails 2.3 – I happen to like Python better than Ruby, but there is simply no competition between Django and Rails. Rails is the perfect implementation of the MVC design paradigm. When it came time to design this site, Rails was the clear choice.

Development-side

  • TextMate – TextMate is by no means the perfect Ruby editor, but I use it for basically everything. Bundles are great, and it provides me with a consistent experience across any programming or markup language that I’m using.
  • git – I admit that I am by no means a revision control expert. This is a crowded space, and with no prior experience I made this choice based on technical merits alone. I believe that the distributed nature of it is perfect for the chance that I have to work with another developer, and its speed is incredible.
  • GitHub – I use GitHub primarily as the primary location to store my code. When I am done with my local changes, I upload them there. When it is time to load a new version of the site on a server, it pulls it from there. This also provides me with a remote backup of my code in case something happens to my laptop. It is easily worth the monthly fee.
  • GitX – GitX is still early-stage software, and it lacks a lot of features. For what I’m doing, though, it’s still nice to have a native OS X program to set up my commits. I still have to dip into the command line to do any heavy lifting, though.
  • capistrano – To be honest I don’t really even like capistrano. It’s extremely buggy software, and I’m considering writing a functional alternative. For the time being, though, it is what I use to deploy my code to my server.
  • SQLite – It’s lightweight, public-domain, and file-based. In other words, its the perfect database to use on a development machine.
  • Photoshop CS4 – Like everyone else, I use Photoshop to edit images. Right now the site design is very spartan (read: bad). In the future, I’m going to make a proper logo as well as a decent design. This site, however, was primarily designed for my usage, so this isn’t a priority.

Internals

  • restful_authentication – One of the de facto authentication solutions for Rails, it provided a nice base for me to build my authentication system upon. It needs some patches for common tasks, and a lot of functionality has to be added in order to get a fully-featured authentication system.
  • attachment_fu – This handles all photo uploads. It’s actually a really nice plugin that I use with very few patches. It comes with Cloud Files integration, and with only a little extra work it is near perfect.
  • cloudfiles – I’ve written about my issues with this gem in the past, but despite a few annoyances it’s really solid. I’m actually quite impressed with Rackspace for taking the initiative to release this. Most companies would just release an API and leave the process of building wrappers to the community.
  • image_science – RMagic would be overkill for this site. All I need is something to resize images for previews and thumbnails. image_science is perfect for this task, and it sports a small memory footprint.
  • facebooker – Right now the Facebook integration is pretty minimal. Login is the main goal through Facebook Connect, but there are also places to post to Facebook (for example after uploading a new photo). JavaScript is the main way to communicate to Facebook, so I don’t actually use this plugin very much. It is used, though, so I felt that it should be included in the list.
  • will_paginate – This pretty much speaks for its self. I use this on the index pages in order to only show a certain number of photos per page. This is a basic feature that should be included in Rails, but for now the only way to do it is through a plugin.

Technology ,

Using Rackspace Servicenet with Rails

January 18th, 2010

One of the reasons that I use Rackspace Cloud Files and Cloud Servers is that the data transferred between the two is free. As such, it struck me as odd when I discovered the network interface which handles such communication hadn’t been used on my server. Upon some further digging, it was in fact clear that I had been charged for all of my data between the two.

The trick is that a different host name must be connected to for the requests to be processed over the internal network (and hence for free). Luckily, the ‘cloudfiles’ Ruby gem has a poorly documented way to do this. All you have to do is set an environmental variable named “RACKSPACE_SERVICENET”.

I accomplished this by adding the following code to the end of my production environmental configuration file:

# Enable Rackspace Servicenet usage

# Uses eth1 to send free traffic to Cloud Files

ENV['RACKSPACE_SERVICENET'] = "true"

Technology , , ,

2010 Will Be the Year of Location

January 11th, 2010

Foursquare and Gowalla will be this year’s Twitter.

This will occur for a number of reasons:

  1. Twitter’s wide-spread adoption has people used to the idea of real-time updates. Privacy is dead. With the advent of Twitter, people realized that the inane details of their lives will be posted and distributed in real-time and that nobody can control what is spread. At this point, I’m not going to argue whether that is a good thing or a bad thing, but there is no denying that it is true. The natural extension of this idea is that it will soon be public knowledge where you are located at any point in time. Twitter has dabbled with this idea, but I do not expect them to package it in as seamless experience as Foursquare and Gowalla deliver.
  2. Smartphones are now ubiquitous. Five years ago only business executives had phones which could be used to check e-mail. The Blackberry was the end all and be all of the smartphone in America. Today there are new players in the game, and the market is growing at an extraordinary rate. After the failure of the Newton, Apple is back in the mobile business. Google threw its hat in the game by releasing the Android operating system and, more recently, the Nexus One phone. Smartphones are everywhere, and many of them are location-enabled.
  3. An increasing number of phones support geolocation and internet access. In the past, even many smartphones did not have GPS functionality. That was reserved for the absolute highest-end devices. Today every iPhone comes with built-in a GPS, forcing every serious competitor to include one as well. Combined with a mature SDK, location data become easy to access by applications such as these. With the widespread adoption of mobile internet access, this can be uploaded to a centralized service to be displayed.

The timing could not be better for these companies. These services have already experienced phenomenal growth. Foursquare has recently announced that it is going global, allowing users to post from any city. They no doubt realize that they are incredibly positioned in an emerging market, and they want to dominate this space. They are getting ready to release a new iPhone client, and their Android client is one of the most popular applications on the platform. They are also developing a Blackberry client application in order to cover the majority of location-enabled smartphones. Gowalla is taking a more niche approach by only having an iPhone client.

Like with Twitter, this isn’t about the money. Foursquare and Gowalla have not and can not charge for use. That would be suicide in every way. Make no mistake: the winner will be determined by number of users, not how well those users are monetized. Later I’ll post more about how I think these businesses can monetize their services while still gaining users and attention.

Technology , , , ,

My first iPhone application released

November 5th, 2009

Large-IconMy first application, Zippy, has been approved by Apple and is available on the App Store!

It’s a simple location-based application that uses your current location to look up your zip code. It can also search based on a provided city and state.

It was a really interesting experience developing this. I had never used Objective-C before, and this was my first application on the OS X platform. It was also my first project using the git version control system. I learned a ton, and maybe one day I will post about some of my more interesting discoveries.

Now, I’m hard at work on Zippy V1.5, which will have an expanded feature set as well as a few fairly major bug fixes. The two main things I’m planning to include in this release are maps and city and state information in addition to the zip code.

I’m also working on a few other projects that I will have news on soon. This includes another iPhone app (this time for musicians) and a web service (for businesses).

Technology , ,

Find inactive computers in Active Directory

July 14th, 2009

This has been a particularly troublesome problem today, and I thought I’d help others out by sharing the fix that I found.

Active Directory can easily get littered with unused computers in large organizations, and before today, I didn’t know how to find and remove them.

On computers with the Server 2003 Support Tools installed, you can use dsquery to find inactive computers. For example to find computers that have been inactive for 13 weeks, you can use “dsquery computer -inactive 13 -limit 0″

That list can be used to automatically delete them from AD using “dsquery computer -inactive 13 -limit 0 | dsrm”

Technology , ,

Mention in This Week in Startups

May 23rd, 2009

I got a shout out in Jason Calacanis’s new podcast, This Week in Startups.
It’s a cool show with interactive Twitter features. If you’re interested in startups or business, it’s a must watch.

Technology