Archive for March, 2009

On the Cloud

Unless you’re a geek from another planet, you’ve been hearing the buzz about cloud computing for the past year. Amazon has been one of the major thought leaders in this space with their EC2. Combined with their other web services, Amazon provides about the most complete cloud implementation. There is only one problem…. price.

A small EC2 instance would run about $73 a month. Yes, you can go cheaper if you turn it off, but how many people actively turn off their websites? It can get cheaper if you reserve capacity, but the $325 up front cost is a bit too steep for me.

I’ve been looking at cloud solutions for a development playground for a while. After taking a look around, I quickly discovered that quality hosting of Java applications is pretty difficult to find, especially given my requirements. I want a host that is running Java 6, Tomcat 6, MySQL 5 and allows me to do what I want with the instance. Shared hosting is obviously not the solution, so I looked at “Virtural Private Servers (VPS)” as an option.

Even VPS has been a pricey option. GoDaddy wants around $45/month for a virtual Linux server with 512MB of RAM. I tried one for a bit, but it wasn’t cost effective for a playground environment. I had about given up hope until I stumbled upon Mosso.

Mosso is Rackspace’s new entry into the cloud computing space. They are trying to get a foothold against Amazon in a pretty simple way, trash them on price. For an equivalent size cloud server, Mosso costs about the same as Amazon. But unlike Amazon, Mosso scales down to smaller instances. For about $22/month, you can get a Linux cloud server with 512MB of RAM that you can do what you want with.

I signed up for one of Mosso’s cloud server accounts last week to use for Java. 512MB of RAM is plenty for what i want to do. You can pick what Linux distro and version you want to use, and I was pleasantly surprised to see they had the latest and greatest (Ubuntu 8.10/Fedora Core 10). They are obviously targeting this at alpha-geeks.

One big difference with Amazon is that Mosso does not offer Windows. They provide you with a very naked (read secure) base Linux install to start with. You have to be competent with Linux (ssh, bash, shell commands) to even have a chance with Mosso. I’m pretty comfortable with Linux, but there are still some things I had to consult some friends on. In the end, I setup exactly what I wanted: Ubuntu 8.10, JDK 1.6.0_13, Tomcat 6.0.18 and MySQL 5. I’m using the instance to run some Java sample applications I’m working on and will use it as the backend for a Facebook application I’m going to play with.

The only downside I’ve found with Mosso is that it is pretty immature compared to Amazon, especially in the area of documentation. You can see the Rackspace guys are working on it, but there are still a lot of holes. I was pretty frustrated setting up iptables for a firewall because the documentation says “look at this sample” but there was no sample attached. Fortunately, Google and a friend saved me. The documentation for setting up email has the same holes.

Once I got past the documentation issues, Mosso has proven to be a winner. This is going to put a lot of pricing pressure on Amazon and the others in this space. You’d have to be an idiot to pay GoDaddy twice as much for the same thing. I’m willing to bet you’ll see about everyone hit $20/month for a usable cloud server before too long. Amazon will definitely have to drop their price.

On a side note, here is a good sample of an iptables rules file you can use with Ubuntu on a Mosso cloud server. Just be sure to change 10001 to whatever port you want to use for SSH:

*filter
 
# Allow loopback adapter
-A INPUT -i lo -p all -j ACCEPT
-A INPUT -i ! lo -d 127.0.0.0/8 -j REJECT
 
#  Accepts all established inbound connections
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
 
#  Allows all outbound traffic
-A OUTPUT -j ACCEPT
 
# Allow SSH (very important - set to right port)
-A INPUT -p tcp -m tcp --dport 10001 -j ACCEPT 
 
# Allow 80 and 443 (web traffic)
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT 
 
# Allow ping
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
 
# Reject all other inbound - default deny unless explicitly allowed policy
-A INPUT -p all -j DROP
-A FORWARD -p all -j DROP
 
COMMIT

Changing Tide

I’ve been checking out some of the stats on my blog this week. Its coming up on a year that I’ve been blogging, which means I’ve easily beaten the averages. One of the interesting tidbits has been the browser report. As you can see below, my guests have a clear browser preference:

Browser Report

The list goes on for another 20 lines into the “long tail”, but I stopped at Opera, which is about the end of the line for mainstream browsers. It is amazing how clearly Firefox dominates as the browser of choice for geeks.

It is stats like this that should have Microsoft very worried. What is cool in Geekland eventually makes it to mainstream. We could easily see a future where Internet Explorer is the exception rather than the rule.

Listen Up, Google

Dear Google, I use you on a massive scale every day, usually for finding technical information. One feature that that you must implement is the ability for me to define a list of sites (with wildcards) that I do not want to ever show up in a search result (assuming I’m signed in). The various bullshit sites that show up for products are annoying enough (can you say bizrate.com), but what really, really irritates me now is a site called expert-exchange.com.

This site earns my enmity for being jackasses of the year. If I’m researching a technical issue, this site should not show up, period. They tempt you with a question, which causes the search match, and then expect you to pay to see the “expert” responses.

So Google, please, please allow me to configure my account so worthless sites like this never show up in my results. And while you’re at it, change your page rank algorithm to push these asshats down into the oblivion.

March: Digital Frontiers

My charity for March is one of my old favorites, the Electronic Frontier Foundation. I usually renew every year with them, and since there weren’t any other charities that really stood out to me, I kept things simple and renewed for this year.

Every geek should be a support of the EFF. They fight the legal battles on the digital frontier that will have a huge impact on American cyber culture down the road. From blogger’s rights, to copyright law, to illegal wiretapping by the NSA, the EFF is there for us. So my hundred dollars for March goes to them, and I even get a cool T-shirt as a bonus :-)

ASP.NET MVC 1.0

I’m not sure why Microsoft is being so quiet about it, but they have apparently released the ASP.NET MVC 1.0 final. Kudos to Caleb for tipping me off via a random tweet.

I went fishing all over yesterday and didn’t find any big release announcements. I expected Scott Guthrie to have something on his blog, but nothing yet. The MSDN site finally had a release announcement this morning.

This is fantastic news for .NET web developers. This finally gives ASP.NET a production-ready web MVC framework distributed by Microsoft. This framework is the future of ASP.NET.

No Suprise

I didn’t have to wait long to prove out my first prediction for 2009. Big Blue is apparently in talks to buy Sun.

I have pretty mixed feelings about this. It means Java would be safe, but it would also be dead. IBM is a technology dinosaur, usually running several years behind the pack in the Java space. This would mean the end of innovation at the JVM level and the chances for a Java 7 any time this decade probably go down to zero.

IBM might also try to start monetizing the JVM. While it would be an incredibly stupid thing to do, never underestimate the stupidity of IBM.

The only bright spot will be what gets built on top of the JVM. The JDK 1.6.0_12 is a high-performance, stable beast of a platform. Things like Groovy and other JVM-based dynamic languages are the future of Java, so at least they’ll have a stable core to build on.

Getting Groovy

As we get more into our project at Orange Leap, we’re starting to see a lot of instances where a dynamic language would make our life easier. On all of our entity classes, we associate a map of custom fields. The custom fields are so that clients can customize the entities without us having to change the code each time. The custom field definitions go beyond basic key-value pairs and can include references to other custom fields. For example, spouse is a custom field that relates two entities and is bidirectional. If you open either entity, you’ll see the other in the spouse custom field.

A dynamic language would come into play in that we could access all the attributes of an entity in a consistent way, preferably through dot notation. Since we’re already running on top of Java 6, Groovy came to mind as the best candidate for a dynamic language.

I’ve never really played with Groovy before. I mostly played with Ruby and Rails, which really opened my eyes to the power of a good dynamic language. Some of the developers on my team wanted to get into Groovy while I was at Countrywide, but I kept us out of it for fear of ending up with an unmaintainable monster if one of the experts left. (this is actually the primary motivator in 99% of all enterprise technology decisions — the bus factor)

So this week I finally jumped in with both feet and I have to say I like what I found. Everything cool I liked about Ruby and .NET 3.5 was in Groovy. Metaprogramming, check. Mixins and Closures, check. Full access to all the JVM goodness, check. The recently released Groovy 1.6 even goes beyond Ruby and .NET 3.5.  For example, if you tag a class with the annotation @Singleton, it turns it automagically into a singleton.

@Singleton
class Friend {
    def name
}
f = Friend.instance
f.name = "Tim"
print "Hello, $f.name"

If you try and call new on the Friend class, you get an error that you can’t instantiate a Singleton. All this handled with a simple annotation. For an excellent overview of all the coolness in Groovy 1.6, check out this article on InfoQ.

So I’m going to keep working my way through Programming Groovy and am eager to start applying what I learn. And best of all, my favorite IDE has the industry’s best support for both Groovy and Grails.

Idiots of the Week

Has anyone else noticed a lot of companies coming down with a case of the stupids recently? It could be the economy is stressing people out and they’re commiting more errors, or, more likely, businesses are doing anything they can to boost revenue, including screwing their clients.

My first example is Time magazine. I’ve been a subscriber for years and signed up for their auto-renewal so that I quit getting nags to resubscribe every year. This year was a bit different. Here are the guts of my Paypal receipt:

time-renewal

So the description says $29.95 for a year (56 issues), but they charged me $41.15. Needless to say, I was a bit unhappy. This seems too dumb to be intentional, but who knows anymore. After complaining to customer service, I should be seeing a refund.

The other idiots I’ve had to deal are GoDaddy. I’ve had a love-hate relationship with them for a couple years, but haven’t been annoyed enough to move my domains and sites elsewhere. They might have finally reached the tipping point this week.

I let a domain name expire that I wasn’t using, yet I still got billed for some crap that I didn’t order orignally that they decided to hang off the initial order (“Business Listing”). GoDaddy has a pretty unethical habbit of hiding stuff on your orders as freedies that they’ll ding you for later.

For example, last year they tried to bill be for an SSL certificate renewal. Apparently, my hosting account came with a “free certificate” that I never even claimed or used. They tried to charge me $20 for renewing the unused certificate. After I called and complained, they refunded my money after realizing they never even issued an initial certificate, so kind of hard to bill me for a renewal.

So this week it was the same story again. Trying to bill me for stuff I didn’t order/want. I’m going looking for a better hosting provider and someplace to move my domain registration where they actually respect their customers.

Both of these cases are especially remarkable given the sorry economic conditions. Smart companies should be bending over backwards trying to keep their customers, not screw them over.

Rotten Apple

What the hell is wrong with Apple? They introduced new iMacs today and completely missed the boat. All them, including the top-of-the-line $2,000+ model, are still on Core 2 Duo chips. Not a quad core to be seen in the bunch. Given you can buy a loaded Dell Studio XPS with Intel’s next generation i7 quad core CPU for $1,400 that completely blows away any of the iMacs , I have a hard time understanding who they want to sell to.

I got over my Apple infatuation last year when it became clear that they wanted to become an even worse monopoly than Microsoft ever was, and were just missing the market share. None of their computers are particularly innovative, and if I want the *nix feel, I’ll just load up Linux. They could have used the new product release to at least show they were competitive, but instead chose to underwhelm. You would have to be insane to buy one of these “new” iMacs when there is so much better hardware to be had for less money.