Archive for the ‘Business’ Category

Why Doesn’t Google Offer Dedicated Virtual Hosting?

Posted 11 Jul 2009 — by admin
Category Business

AppEngine is nice, but it’s a little limiting. No cron jobs, filesystem use nor customization with third party libraries, software, databases, languages, etc. You can’t deploy PHP, Ruby and or your ‘other’ favorite web development tools.
You can only use their tweaked versions of Python and now Java. It is free, but if you actually want to run an app on it and need more bandwidth, you purchase it from them. Why not do the same w/ dedicated virtual hosting?

Beggars can be choosers these days. Dedicated virtual hosting is so cheap I’m a little surprised that Google isn’t on this trend. Amazon can do it at scale and there are numerous, smaller providers out there like http://slicehost.com, that I can’t imagine the tech would be beyond them and/or they can’t see profit from it. It’s not their core business, but would be inline with their larger mission of expanding the web.

All these reasons point to a better AppEngine product from Google!

When the cloud is a good idea

Posted 07 Apr 2009 — by admin
Category Business

A buddy of mine is a talented, but paranoid System Administrator for a small web company. He refuses to see the truth and the beauty in the wonderful world made possible by cloud computing services like Amazon’s EC2. Amazon is not the only game in town. There are other, and in my opinion more flexible, providers out there such as http://slicehost.com, http://joyent.com and http://rackspace.com.

cloud1

His main critique involves a lack of control over the physical disks, vague terms of service, in some cases  poor technical documentation and implementations that don’t replicate everything that you get when managing your own server. An example of this is when your server instance fails in the cloud and your data is not persisted, at least not with Amazon. This is no doubt a limitation and a serious one at that.

All these services offer a near identical product with price points at a small difference in dollars. You find on average, $70 a month for 1 Gig of RAM with 30 Gigs of hard drive space. Rackspace has the best offer with Mosso at $43 a month for 40 gigs of hard drive space and 1 gig RAM. You can get server instances as small as 256 Megs of RAM for about $10 a month. These costs don’t include bandwidth, but unless you’re doing a lot of traffic this won’t cost much. A full T1 will run you ~$350 a month with Mosso. As more and more players hop into the game, I wouldn’t be surprised to see prices go down even further.

Management of your server is simple with a nice web interface for rebuilding, rebooting, DNS configuration and scheduling backups. You can choose from the most popular operating systems such as Ubuntu, CentOS and even Windows, get full root access and can upgrade/downgrade at any time at a prorated cost. It’s wonderful and beautiful!

Just because something is easy doesn’t necessarily make it a good idea. But that doesn’t prove the opposite is true either. Just because something is easy doesn’t make it a bad idea. So why is using the ‘cloud’ a good idea, and more importantly, when is using the ‘cloud’ a good idea?

I watched a great presentation made by Mr. Bezos, Amazon’s CEO, in which he related the IT infrastructure at Amazon to the American electricity grid of the early 20th century. Bezos envisions a world where developers can just ‘plug’ in to an infrastructure that delivers everything you could possibly want from a dedicated hosting solution at a fraction of the cost. An infrastructure that maximizes power and efficiency and makes it easier to administrate your ’server’, not more complicated.

Amazon and the rest of the lot can do this because they deliver a service that a lot of people use in a similar way and can scale costs accordingly. Amazon in particular, with the infrastructure requirements for their flagship product, Amazon.com, gives them expert industry knowledge and a massive operating budget. Smaller hosting companies have taken advantage of open source technologies like the Xen Virtualization, to deliver scalable dedicated virtual boxes.

Bezo’s has a beautiful analogy. It does have its limits. Computing is not the same thing as electricity. Appliances for the household consume electricity in the exact same way. Applications for the web, however, do not consume compute power the same way.

Where cloud computing offers a lot is for the lone developer, small team or startup in the proof-of-concept stage. For those who understand software but not hardware. Where the investment of time and resources adds a burden that subtracts from the development of their product(s). And when the product(s) they deliver have nothing to do with the means they choose to deliver them. The developer or small team just require something that is secure, consistent and reliable.

I won’t argue that the cloud will ever be more secure, consistent and reliable than choosing to do it yourself, if you decide to do it right. Maintaining 100% control over the physical disks and having direct access to the physical collocation is more secure, consistent and reliable without a doubt. However, the caveat is that because you’ve decided to do it yourself you have to do it right! If you don’t do it right you’ll most likely have a setup that is neither secure, consistent and is very, very unreliable. So this asks the question how does one do it right and how much does it cost to do it right?

The cost can vary but it does involve hiring a System Administrator for 50 – 100 K a year and spending over 10 K on equipment and collocation facility hosting.

If you’re that lone developer, small team or startup in the proof-of-concept stage, you may or may not be able to afford these costs. You can of course contract out and the cost would be lower. But I’m comparing the cost of a setup that has someone fully dedicated to it. I’m also assuming that the developers, who know software, will be able to lean and manage the server remotely and thus my argument involves eliminating the formal role of System Admin. Because you no longer need to worry about the physical limitations of your setup, involving hard drive failures, new OS installs on new machine, UPS, basic redundancy and the rule of 3, developers can wear two hats.

How can the cloud be as consistent, secure and reliable? The answer is that Amazon and other cloud providers are hiring engineers who make six figures. Not just one or two, but tens or hundreds or even tens of hundreds, more than you can afford to hire. It make sense that they will have the resources, knowledge and experience to deliver a product that is consistent, secure and reliable.

Bugs and such are inevitable, after all humans are still doing the work. However, the bug risk isn’t eliminated just because you bring it in house. In fact, odds are that the risk is higher!  Who would you put your money on, 1 or 2 guys at a small company or the combined knowledge from all the engineers at Amazon.com? Now, that is an extreme comparison and of course there exists a middle ground. If you happen to find a great admin who does quality work and understands business goals etc, his consultation might be worth the price. However, if you’re not so lucky, a product from the cloud might be less risky than the infrastructure you invest in – the IT fort some employee constructs for job security!

You get what you pay for without a doubt. It’s just that in the cloud it’s not just you paying and therefore you get more for your dollar.

paypal ipn simulator

Posted 22 Mar 2009 — by admin
Category Business

If you use the Paypal sandbox you’ll notice that there is an IPN Simulator test tool. You must be logged to use it. This tool lets you test an IPN handler script for your application. If your script is not correct and you try to send a test IPN transaction the simulator will spit out a misleading error message. It will report

IPN delivery failed. Unable to connect to the specified URL. Please verify the URL and try again.

What this actually means is that your server was contacted and your script failed! If you’re using the wrong URL then this error message will apply, however. If you are using the right URL but you have a handler script that fails or is not right in some fashion, it seems logical to report the details of the failure! At the very least, it would be nice to hear

Indeed this URL address is correct, we said hello, but you refused our ‘handshake’. How rude! Link to more info…

When I first tried out the simulator I assumed that the problem was with my DNS. I was testing against a subdomain that didn’t have a cname set up. I wasn’t too sure though if this was the problem. I could visit the URL I specified in my web browser and ping my domain, etc. I eventually got it working after checking some log files. I had to parse my apache logs to fnd that the IPN parameters were indeed posted to my server. This led me to the error in my code.

I’m not blaming Paypal 100%. The error was ultimately on my end. Nonetheless, Paypal did not aid in my troubleshooting endeavor. Instead they exacerbated the problem with an error message that made some assumptions about how I was using their tool. The first being that I understood the IPN protocol. The second, that I understood the way the IPN simulator is meant to work and the protocol under which it operates. Not my error because there is no documentation for the test tool.

Having to parse log files was a needless step in this otherwise simple remote request. Another issue that confounded the problem were the Paypal forums. Some people seemed to think that the IPN simulator was not even operational. Could this be because of misleading error messages?

In my opinion the Paypal documentation is thorough, however, very poorly organized. It seems also that a lot of the Paypal core docs are available in multiple/too many places. I’ve seen the IPN documentation in at least 3 or 4 different areas on the site. Each page adds more information or has a slightly different verbiage to explain the same problem.  Not to mention, there are way too many PDFs available for download! PDFs are great, but the content, organization and display is different from same documentation online.

At any rate, here is a quick Rails controller that will at least get your IPN simulated transactions to return success!

require 'uri'
require 'net/http'
require 'net/https'
class PaymentsController < ApplicationController
  #skip this check b/c post comes in from paypal
  protect_from_forgery :except => [:ipn]
  def ipn
    begin
      if request.post?

      #you need to post back to paypal the name/value string
      #in the same order received w/added cmd=_notify-validate
      from_pp = request.raw_post
      data = from_pp + "&cmd=_notify-validate"
      url = URI.parse 'https://sandbox.paypal.com/cgi-bin/webscr'
      http = Net:HTTP.new url.host, url.port
      http.use_ssl = true

     response, data = http.post url.path, data, {
        'Content-Type' => 'application/x-www-for-urlencoded' }
      end
     rescue Exception => e
     logger.info("Error: paypal transaction #{e.message}")
    end
  end
end