The BASIC Cloud Framework API

Last night, I spent the evening with a bunch of PHP developers in DC. This informal gathering in the DC-PHP community is a regular occurrence known as the DC PHP Beverage Subgroup – Virginia Chapter. There is also a DC-chapter that meets once a month as well. These two informal gatherings are for the sole purpose of getting together, enjoying some food and cold beverages and generally just talking about anything and everything. It complements the official DC PHP meeting which is generally a technical presentation directly related to PHP.

So last night, we were yukking it up about how PHP has re-invoked the GOTOoperator, a programming mechanism that, we thought, died with the BASIC programming language of yore. Coding in BASIC was very procedural and not very rich in its abilities.

10 PRINT "Hello World!"
20 GOTO 10

One of our number suggested that PHP, since they regressed so badly with the GOTO operator inclusion, should also adopt line numbers in code as well. :) This conversation devolved into all the clich√© buzzwords of our time and eventually, it was suggested that what we really need is a “BASIC Cloud Framework API”.

Putting aside BASIC, which is not really practical or desirable, the concept of a Cloud-based Framework API, whatever it actually is, is not all that undesirable. If you think about it, we already have a Cloud-based API for APIs (yes, I realize this is very meta) with the super-cool Gnip which we covered last year when they launched. Social services channel their data through Gnip and Gnip provides a single API layer for data access. And it’s built in the cloud.

Similarly, up until a few years ago, Javascript was painful to write because developers had to write code for all the browsers and all their nuances. That was before Javascript libraries — or APIs, if you will — like Prototype or jQuery came along providing the developer with a single layer of javascript programming that would work seamlessly on all browsers.
The concept of single layer APIs is not a new one. Why can’t we have an API for cloud-services as well?

Think about this. Right now, anyone wanting to build an application has three options. They can build out a server cluster or farm that physically scales and, by proxy, ends up costing a lot as physical hardware costs a lot. A second option would involve a virtual cluster made up of virtual machines. You still need hardware, but each server souped up with up to 32G of RAM can theoretically host tons of virtual machines all acting as a physical server. An entirely virtual solution is hosting applications in “the cloud”.

Cloud computing is not without it’s challenges. I’ve challenged the reliance on it in the past, and I still do. However, with cloud services like Amazon’s EC2, S3 or Google’s App Engine, it becomes entirely possible to not only store data in the cloud, but also run and maintain entire services in the cloud.

The problem is, each of them require different things. Amazon has a suite of developer tools that are needed to build against their cloud offerings. Google App Engine only supports Python, Ruby or Java.

There should be a way to abstract this development to a single layer — or API, if you will — to take advantage of this.

Laugh it up, chuckles. A cloud-based framework API is not all that ridiculous of a concept. The world once thought the earth was flat as well.

Sharing Mini Stories

Clearly, I don’t update this blog enough. Not that I feel like I have to. It’s my personal blog. I can do anything and say anything I want to. However, one thing I DO do a lot of is surf the web. Via Twitter and Friendfeed, not to mention links passed in IM chats, I spend a lot of time discovering new content that I really like.

So I’ve added a new feature, for this blog, that will share content I find interesting. IT’s smaller font-size so it’s different than normal posts. Hope you enjoy it.

Applescripting Technorati and Skype

I’ve been watching my Technorati ranking over the past few weeks and I’m happy to say it’s been climbing. In other news, I’ve been wanting to learn Applescripting. So, I put the two things together this evening and came up with my first practical AppleScript.

The script does one thing. It queries Technorati for my ranking, and updates my Skype mood message with a little ditty skype.jpg about my ranking: Technorati Ranking: 2426.

To pull this off, I dug out my Technorati API key and grabbed the satimage XML library for Applescript (very useful!) and set about to write this script:

set trati_apikey to "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
set myblog to ""
set trati_URL to ""
set trati_xml to do shell script "curl -G -d url=" & myblog & " -d key=" & trati_apikey & " " & trati_URL

(* Uses the SatImage XML Parser from: *)
set trati_xml to XMLOpen trati_xml
set the_root to XMLRoot trati_xml
set tapi to XMLChild the_root index 1
set doc to XMLChild tapi index 1
set weblog to XMLChild doc index 2
set rank to XMLChild weblog index 8
set rank to XMLGetText rank

tell application "Skype"
    send command "SET PROFILE MOOD_TEXT Technorati Rank: " & rank script name "skypetechnorati"
end tell

Now to set about doing more cool Applescripting. :)