Lydia Leong

A member of the Gartner Blog Network

Lydia Leong
Research VP
11 years at Gartner
19 years IT industry

Lydia Leong is a research vice president in the Technology and Service Providers group at Gartner. Her primary research focus is cloud computing, together with Internet infrastructure services, such as Web hosting, content delivery networks…Read Full Bio

Coverage Areas:

Mosso’s Cloud Files API

by Lydia Leong  |  November 25, 2008  |  1 Comment

I had some time to kill on a train today, and I amused myself by trying out the API for Cloud Files.

I decided I’d build something mildly useful: a little shell-like wrapper and accompanying tools for dealing with Cloud Files from the command line. So I cranked out a quick “ls”-like utility and a little interactive shell chrome around it, with the idea that my little “cfls” script would be handy for listing Cloud Files embedded in another shell script (like a quick script typed in on the command line), and that I’d be able to do more interesting manipulations from within the interactive “shell”. I decided to do it in Python, since of the languages that the API was available in, that’s the one I’m most comfortable with; I’m not a great Python programmer but I can manage. (It’s been more than a decade since I’ve written code for pay, and it probably shows.)

I was reasonably pleased by the fruits of my efforts; the API was pleasantly effortless to work with for these kind of minor tasks, and I have a version 0.1. I got the shell core and the cfls utility working, and for the heck of it, I made direct API calls out of the Python interactive mode to upload my source code to Cloud Files. For nearly no time investment, this seems pretty satisfying.

The only annoying quirk that I discovered was that the containers in the results set of get_all_containers() do not get their instance variables fully populated — all that’s populated is the name. (Calling it results in constructing a ContainerResults object with list_containers(), and the iterator only populates each Container generated with its name.) So it seems like you have to call list_containers() to get all the container names, and then get_container() on each container name, if you actually need the instance variables. I also had some odd unexpected exceptions thrown when testing things out in the Python shell — related to time-outs on the connection object, I assume. Still, these are not problems that cause more than a moment’s sigh.

The Cloud Files Python library is far and away better than the Amazon S3 Python library, which seems much more like demonstration code than a real working library (which is probably why people doing things with AWS and Python tend to use Boto instead). The Cloud Files module for Python is decently if sparsely documented, but its usage is entirely self-evident. It’s simply and intelligently structured, in a logical object hierarchy.

The important point: It’s trivial for any idiot to build apps using Cloud Files.

Bookmark and Share

1 Comment »

Category: Infrastructure     Tags: ,

1 response so far ↓

  • 1 How much should I geek out on GBN?   November 25, 2008 at 12:11 am

    [...] Who’s BloggingLydia LeongGreg YoungDebbie WilsonAllen WeinerMichael MaozJohn PescatoreDavid McCoyJim SinurNick JonesGartner Blog NetworkApplication Architecture, Development & IntegrationBrian PrenticeKristin MoyerMark DriverAndrea DiMaioCameron HaightJeff RosterMike McGuireAnthony BradleyAndrew WhiteJim HolincheckNick GallFrench CaldwellGene PhiferAndrew FrankMastering The Hype CycleMark RaskinoWhit AndrewsKathy HarrisOffice of the OmbudsmanThomas OtterVal SribarJim LundyGene AlvarezAndreas BittererFrank KenneyThomas BittmanJeffrey MannDan ShollerPat PhelanDaryl PlummerToby BellTom AustinDavid M SmithDavid CearleySteve PrenticeNikos DrakosEric GoodnessRay ValdesTom Murphy ← Mosso’s Cloud Files API [...]