↓ Archives ↓

Archive → August, 2009

the power to yield a better console interface

as part of a different project, i needed to duplicate some existing terminal magic in python. what i needed to write was something similar to the getch() function in curses. it can be found in: ncurses*/base/lib_getch.c after doing an: apt-get source libncurses5

what’s the magic? i need to stay in a continuous loop reading from the file descriptor, however i want to return periodically so that gobject doesn’t block and the interface can remain responsive. enter: yield, who comes in and saves the day. see the accompanying code for specifics.

as part of the bigger scheme, i wanted to write a console like interface for talking to a dbus server that both allows you to run methods, and receive signals. i wanted to use gobject, and i didn’t want to use threads! and because i wanted to make it pro, i decided it should look and feel like my standard bash shell (except prettier). it’s intended to be easy to use, and running the module will give you an example session. check back for a more complete and expressive code base.

1) if anyone knows who to do a ualarm (not alarm) in python, help is appreciated. either through ctypes or as a c extension for python.

2) please leave me your comments on my greadline module! more features are on the way, such as history and cursor support.

code: http://www.cs.mcgill.ca/~james/code/greadline.tar


The 12 principles behind the agile manifesto adapted to web operations

Walking once again through the twelve principles behind the Agile Manifesto, I realized how tailored they are for software development projects. Yet experience has shown that agile practices are not strictly limited to development projects, but to all areas involved in bringing a software product to the users. Here is my version of the twelve...

Automated Control paper by the RAD Lab folks

Wow, how did I miss this until now? In June, some smart people gathered in Barcelona for the First Workshop on Automated Control for Datacenters and Clouds (ACDC09) and jeez it looked like it was a good time, from a glance at the program.

One of the cooler papers is “Automatic exploration of datacenter performance regimes” in which the smart folks over at the RAD Lab at UCB tackle the idea of:

  1. Gathering up real usage metrics in production
  2. Taking that data to feed a resource allocation (”auto-scaling”) controller

The bits about coming up with an exploration policy is where the juicy stuff comes in, building in safety factors driven by external SLAs. You should read the whole thing to see how thoughtful their method was, which includes taking into account effects such as cold ramping, which you almost never see accounted for in simulated situations.  Rock on, RAD Lab: this is the stuff that brings the academia smarts to the real world. Kudos.

FYI: I’m not just saying the paper is cool because they cite my book as a resource in it. :)