• Moved to Rimuhosting

    If you're seeing this, that means the new DNS settings have finally resolved and you're being served by a plain old Mongrel server instance on my Rimuhosting VPS. It's so much faster than before.

    Server spy extension showing my site running on Mongrel


    Before you start lecturing me on running just Mongrel, let me just say that now isn't right time to get a proper setup - I'll get it done over the weekend. There're so many choices (combinations of Apache, lighttpd, pound, pen, mongrel, mongrel_cluster), I think I'm due for some reading before making a choice.

    If you see any bugs, let me know! Of course, any deployment-related advice will be appreciated.

  • Moving to Rimuhosting VPS

    After being plagued with performance issues running Typo (the blog software on which this blog currently runs) on Dreamhost, I decided it was time to give in and get a VPS once again. I was previously with Linode.com (they have a great control panel where you can drop in the distro you want - still have screenshots somewhere for an unpublished post), and then JVDS (good hosting, usually quick replies to my support tickets, but slow to push out a VPS control panel they've been promising), running Gentoo on both VPSs. Right now, I'm on a shared hosting plan with Dreamhost.

    Well, Dreamhost has been good to me - I got so many referral credits from them that they paid for my subscription many times over after I posted about their $0.77/month offer. Unfortunately, Typo seems to be quite a monster (compared to Wordpress), and database access is purportedly (and observably) slow on Dreamhost. Still, Dreamhost is a great host for shared hosting, I'm sticking with them for delivering more static content. A VPS just makes sense now that I've been tinkering more with Ruby on Rails, plus which geek wouldn't admit it just feels more right to be in full control of your server (well, it's root on a virtual machine, but still root).

    This time around, I chose Rimuhosting, a New Zealand-based hosting company (servers are US-based, of course), and here's why (I did some research once again on WebHostingTalk and asked some people their experiences with their webhosts):

    Pros:

    • Fairly affordable prices - I got their cheapest MiroVPS1 plan, which goes for $19.95/month and get 30GB of transfer and 96MB of RAM (which could be a problem, but upgrading seems easy enough anyway from what they say on their site). Comparing to several other VPS hosts like unixshell, Tektonic.net, ServerAxis, their plans are somewhat mid-range.
    • Their reputation is great. Yup, I've heard and read only good things about them, something that's quite hard to find in the world of web hosting. We use them at work to setup servers sometimes too.
    • Seems to be run by competent people - they have a bliki (blog + wiki) with some nice posts. The one that really caught my eye is the one on their Ruby on Rails hosting stack. Not that I'd use it since I'm on Ubuntu, but it shows that the folks at Rimuhosting are up-to-date.
    • They run Xen, which Deepak, among others, tells me is the most efficient server virtualization software. Yeah, whatever, score one for statistics (and lies).
    • Support is reasonably fast - got replies to my pre-sales queries reasonably fast (more than a few hours, but it wasn't during working hours anyway). Of course, I'll have to see how it goes now that I'm a real customer.
    • A simple web-based control panel where I can reboot the VPS. It's no Virtuozzo Power Panels, but it's enough. JVDS didn't have one and it started to get old sending support tickets to do a reboot.
      Screenshot of Rimuhosting VPS control panel


    Cons:

    • They don't support Gentoo, my Linux distro of choice. Only RHEL, Ubuntu, Debian and Fedora Core are supported. I went with Ubuntu, not having much experience with it (excluding a brief affair with Debian). I was wary of this at first, but my fears of bungling around with an unfamiliar distro have vanished after I saw how easy it is to install stuff with apt-get, and things are not placed in weird places in the filesystem hierarchy. I think I could get used to it, this "not compiling everything that moves" idea ;).
    • ServerAxis supports Gentoo, and offers much better "value for money", except that their lowest priced plan is much higher ($30). But you get 512MB RAM, 200GB RAM, and 5 IP addresses... Too bad I'd rather pay out of my PayPal funds.

    Well, less blogging, more server migration. Actually the application installs are mostly done. I've never had apt-get play so nice back when I was experimenting with Debian - just
    apt-get install [package] and things are installed quite cleanly (keyword: "cleanly"). I think this may grow on me (yeah yeah laugh and point at the Ubuntu noob) - perhaps you don't need to compile everything (gasp, I said it!).

  • Rails 1.1.5 (security patch)

    For anyone who cares or who runs a production site on Rails, DHH just announced the release of Rails 1.1.5 with an undisclosed security patch. Time to

    gem install rails

    and update your config/environment.rb to use the Rails 1.1.5

    # Specifies gem version of Rails to use when
    # vendor/rails is not present
    RAILS_GEM_VERSION = '1.1.5'
  • Easy introspection in Ruby

    Just some notes on reflection and introspection in Ruby

    
    someString = 'http://google.com'
    
    # Print the object's class, methods, superclass and
    # ancestors (mixins and superclasses),
    p someString.class
    p someString.methods
    p someString.class.superclass
    p someString.class.ancestors
    
    # Print the methods of the String class.
    p String.private_instance_methods(false)
    p String.public_instance_methods(false)
    
    # Pass true to recurse into parent classes.
    p String.public_instance_methods(true)
    
    
    # Calling instance methods with send().
    "Random text".send(:length) # 11
    -23.send(:succ) # 22
    
    # Using Method objects and call().
    length_method = "Random text".method(:length)
    length_method.call # 11
    
    # Another way, using eval().
    length_method = %q{"Random text".length}
    eval length_method
    

    Check out Distributed Ruby (DRb): it's a very neat, non-fancy way of exposing object methods as remote services.

  • From Wordpress 2 to Typo 4

    It was a slow day so I decided to cross one thing off my to-do list, and that's getting Typo installed and migrating from WordPress. I've been looking at getting Typo installed for awhile ever since I saw (and liked) its AJAX-y comments form, plus Typo 4 being just released did help.

    The install went straightforward enough, though I didn't get to try out the new installer gem. I didn't bother because I'm on a Dreamhost shared hosting account, though installing the gem without root privileges seems like it should work. I simply followed this guide to getting Typo 4 running on Dreamhost. Ran into some trouble running the Wordpress import script (found in /db/converters/wordpress2.rb), but Google turned up the solution (basically a patch to the Articles model that tries to send pings when importing posts). This should already be fixed in Typo SVN, but it's not in release 4.0.

    Anyhow, Typo seems spiffy, though I am still getting the occasional "Application Error", but that's most likely a Dreamhost thing. Liking the near-minimalist theme as well - I'm already missing the green clover though heh.

    Things I'm already liking:

    • Sidebar modules that you can add to your blog - for example, getting the del.icio.us links I have at the side to show is just a matter of dragging the del.icio.us sidebar item to the "Active" list and pointing it to my del.icio.us feed. There're sidebar items for Flickr, tags, 43things, Amazon, and even the categories and archives are sidebar items.
      Screenshot of Typo 4's sidebar items administration


    • A Blacklist section where you can enter blacklisted words and regexes! Take that texas holdem poker!
    • Live preview of your posts as you type - can get a little sluggish though.
    • The ability to search and delete all comments - Wordpress was missing that and running SQL statements in phpmyadmin stopped being fun.
    • The nice Scribbish theme that comes with the Typo package.

    Things that I don't like:

    • Linking to uploaded files was confusing. I like the whole "Attachments" idea, but I didn't know how to link to them until I browsed to the Resources section and copied the link to the image I just uploaded (by saving the post I was making - there wasn't a way to upload an attachment while writing the post).
      Screenshot of Typo Attachments feature


      I'm probably doing things the wrong way though, seeing as this is way too obtuse. Would be nice to see improvements (such as, upload file as you write your post, click on uploaded file to include into post, all on the same page with AJAX).

    • Um, nothing further!

    Need to use it more to decide whether I'll like this or not.

subscribe via RSS