This blog is now running in the cloud. That’s not very special in itself; lots of other blogs and web sites run on cloud servers. It’s running on Debian Linux; that’s not very special either. But this blog is built with Nu and Objective-C.
I’ve been working for a while to get Nu running in the cloud, and although the iPhone has been a distraction, it’s also been a motivation. Running Nu cloud services means that I can take some of the same components that I use in my iPhone apps and use them in my cloud services as well. That means less to learn, less to write, and less to maintain. It also means that some of the same advantages of Objective-C on the iPhone can be available on my servers – without the excessive cost and lack of flexibility of running on Xserves.
The software serving this blog is a complete rewrite of its predecessor, which was also written in Nu but used Core Data and a few other Apple proprietary components. Now everything in my stack is open source, and that’s a big relief! No more opaque components, and no more single-vendor lock-in.The main components are
- Nu, my Lisp built on Objective-C
- Nunja, a libevent-based http server
- NuCURL, an Objective-C wrapper that allows libcurl to be called from Nu.
- NuJSON, a Nu-oriented revision of SBJSON
- NuPostgreSQL, an Objective-C wrapper that allows Nu code to call the PostgreSQL C API (I’m using PostgreSQL for all blog data storage).
Most of these components are open source (soon probably all of them will be) and available from my github account.
Working together, Jeff Buck and I have gotten all of these components running on Debian 5 (aka Lenny), and this blog server is running on a Rackspace Cloud Server (which is costing me a full 1.5 cents per hour).
What’s the point?
There are plenty of other blogging tools available already, but there’s more to sharing on the internet than just posts and comments. Locations, links, pictures, and twitter status posts are a few examples. I’ll be working over the next few months to integrate more of these and other items into my blog. Running in the Rackspace cloud means that the work on this will scale.
One of the first integrations is a login system that uses OAuth and Twitter. Visitors can now log in with their Twitter ids to post comments and access special personalized features. I’m using Twitter’s “read only” authorization (you’ll see this confirmed on the signin screen), so that you don’t have to worry about me writing anything spammy to your Twitter stream. Please try it!