Author Archives: admin

Playing in the clouds

For one of my current projects, we’re investigating two ‘cloud computing’ services for hosting, Google AppEngine and Amazon EC2. It’s getting pretty interesting to learn about the good and bad points of the platforms, see them evolve, and imagine what’s going on behind the scenes to make them work.

My highest-level impressions so far are:

  • they’re both going to provide more hardware, bandwidth and reliability than you could imagine building in your server room, unless you happen to have billions of dollars to spare
  • EC2 is the easier to wrap your head around if you have significant experience in building servers from the metal
  • GAE is the easier to wrap your head around if you have no experience in web applications or server building
  • GAE (when it starts charging) scales smoothly, costwise, from zero up. EC2 has a ‘pay-for-what-you-use’ model, BUT, if you want to do anything at all and have it available 24×7, you have to pay for your instance 24×7 even if there’s no traffic, so you’re looking at at least $72/mo. Not a problem for a well-funded project, but for someone diddling around with a little idea and paying with their own credit card, it’s going to be a problem.
  • EC2 is all kinds of flexible, GAE is all kinds of simple. GAE does force you into a new programming model if you’re used to LAMP or the like, but everything else becomes super-simple once you get past that. Scaling, server maintenance, geo-distribution, etc. are all just done for you, whereas with EC2, you get the raw tools to deal with those problems, but you have to patch it all together. There are tools out there to help with that, of course, but EC2 itself is not enough.

We’ll see how the services progress and how my understanding of the capabilities and tradeoffs progress with them…

P. C.

Good choice Jon: Stewart whipped out a Palm Centro on the Daily Show today.

Trails

Occasionally you get a PDF of a scan of a printed copy of an automated email, and you say, “huh, that’s kinda funny”.

Here’s a phrase

Here’s a phrase, of sorts, from my past. I wonder if anyone out there in Internet-land can identify it.

This is from memory (I can’t find the original source material right now), so hopefully it’s still right:
“that’s a little too much high that’s that’s it low”.

Letters and cases

I was just looking at a travel itinerary sent through email, and it reminded me of something. There has been a great failure in the computing profession.

I’m a computing professional myself, so I feel some responsibility to repair this failure, and if my blog does nothing else, I’d love it if I could just get more awareness of this one particular issue. I feel the need to inform people in all walks of life of this one fact: computers can store and display letters in cases other than ‘upper’. Among the other cases that can be used in computer-mediated communication is the case ‘lower’. Just incorporating that one additional case into your repertoire would take us all a nice little step toward a better world.

Hmmm, maybe I should make a short slogan out of this concept to sort of help the meme spread. Let’s see…:

“Use lower case (in your computer-mediated communications, whether you are a computing professional yourself incorporating human-visible text into your software, displays, software configurations, error messages, etc., or whether you are someone who is directly or indirectly responsible for forming specifications for projects wherein the aforementioned computing professionals are presenting human-visible text on your behalf)!”

Serendipity’s fun

I like it when random things collide in an engaging way. I stopped “Blade Runner” in the middle to browse the web (yeah, I’m prone to random shuffling of activities), and found an interesting article on vagueness through a link on del.icio.us’s ‘recent’ list (which I’ve talked about before). The two come together nicely.

I also like the fact that I’m reading a paper from the world of sociology and it’s actually making some sense. OK, sorry, it’s from the world of “dynamic, critical interdisciplinary research at the interface of cultural geography, sociology, cultural studies, architectural theory, ethnography, communications, urban studies, environmental studies and discourse analysis”, as the journal’s ‘about’ page says.

Open source skillset

It’s interesting how one develops a different group of skills to work with open source elements that with closed source ones. ‘course, the skillset change is also related to the availability of the web and search engines, which are resources of inestimable value to software developers whether or not they’re working with open source elements.

Today I was investigating a problem with PyAMF, getting an exception that says “Unknown command operation 12”. In the old days, had PyAMF been closed source and the web not been what it is today, I’d have been forced to do the BBPD (Black Box Probe Dance). I’d have looked in the official docs, seen nothing of any help, so I’d spend the day messing with the context of the problem until I got some different results that eventually led me to understand the basic shape of the offending turd somewhere inside there. Then I’d devise a workaround (because there’s never time or money or vendor enough to get proper support from the library vendor), which in this case would probably be in the form of some sort of proxy class that would drop the incoming message before it got into the library (i.e. a turd shredder).

In the new days, I did the RFTS loop (Read, Fiddle, Test, Search). I searched for “Unknown command operation 12”, found only dead ends, found the line in the PyAMF code where the exception was coming from, read enough of the context to try a hack to basically ignore the operation, saw that that removed the exception, found the list of operations in the code, saw that 12 was not in it, searched for the text name of one that was in the list, found Adobe’s Flex 2 docs, discovered the list of names/numbers in Adobe’s docs matched those in PyAMF, hacked the doc URL to get the Flex 3 version, saw that DISCONNECT_OPERATION/12 was added for Flex 3, searched for “pyamf disconnect_operation”, saw that there was a patch to PyAMF for this problem and that it was equivalent to my hack, applied the patch so as to match PyAMF’s official code, and checked in the change to our repo.

It’s a very different process, very interesting to develop.

FYI, if you came to this page because you got “Unknown command operation 12”, try applying the patch.

Toshiba A105 fan control in Linux

Hmmm, one annoying and potentially dangerous thing about Linux on my Toshiba A105-S4134 is that there doesn’t seem to be a way to get fan control to work. When first booted, the fan goes to low mode and just stays there forever, which means I could end up with an overheated CPU/motherboard. So far it hasn’t been an actual problem, but that’s one of those things that could come up when you don’t expect it, or could cause cumulative damage which eventually disables the whole machine.

After resuming from suspend, the fan usually goes to high mode and stays there forever, which of course is annoying, even if less dangerous. This actually happened in Windows, too, where I used the Toshiba power utility thing to work around the problem. Don’t have a workaround here.

The fan is advertised via ACPI, but when I try to use /proc/acpi to control it, I get a variety of errors no matter what I try.

There’s the ‘omnibook’ module for the kernel around that has a hint of support for the A105, but it doesn’t do fan.

Dunno what to do about this one yet…

Hang on/off

I just noticed that in a certain usage, the phrase-forms ‘hang … off …’ and ‘hang … on …’ mean the same thing. (Of course, you could find a lot of examples of such phenomena in English, but hey, this is my blog and I reserve the right to post about things that are not very new or original.)

‘Course, you wouldn’t say ‘hang the shirt off the hanger’ or ‘hang the keys off the hook’, but you would say ‘hang the Payment object off the Speaker object’ or ‘hang the new tree off the first leaf’ when talking about data structures in software. Or at least, I and my peer group would say these. But they mean the same as if you replace ‘off’ with ‘on’. I guess the preposition there is more for looks than function, since ‘hang’ itself is fairly unambiguous.

So I guess the only thing that’s actually interesting about this is that the phrase was appropriated into programming terminology, then slightly morphed from its origin, and probably for no good reason.

Unexpected classloader weirdness

Did you know that in Tomcat 6, you apparently… well, I can’t quite say what the cause is, but here’s what happened:

  • I have a webapp that’s using a library that might be doing some slightly tricky classloader things
  • If I access that app through the AJP connector, it fails to find a class that’s definitely there in my WEB-INF/classes and world-readable
  • If I access that app (from the same URL and in the same state) through the HTTP connector, it finds the class

It must be something to do with classloaders, but I can’t say that I understand any reason why that would happen. Of course, I haven’t investigated it, either, because I’m more interested in getting the thing to work right now than in figuring out what this weirdness is about.

Instead of using mod_jk and JkMount, I’m using mod_proxy_http and ProxyPass. Works well enough for my purposes and avoids whatever this problem is. Maybe sometime I’ll be inspired to dig deeper, because ya know this would turn out to be one of those “wow, I can’t believe these things would all interact in such an unexpected way” things.