Monthly Archives: May 2007

First thing to do for your new coRank site

coRank has just opened up their sub-domains to anybody who wants to start their own Digg-like community. One thing they didn’t do is put an RSS link in the header.html template file. No problem:

  1. Grab the RSS link from your coRank site. It should look something like this: http://YOURSITE.corank.com/tech/all/upcoming/rss.xml
  2. Open up the Header.html template file and insert that URL into the head section:

    <link rel="alternate" href="http://YOURSITE.corank.com/tech/all/upcoming/rss.xml"
    type="application/rss+xml" title="Travel at coRank"/>

Socially Networked Spam

As I crawl around the Web 2.0 world, I’m seeing more examples of “parked” spam pages on social networking sites. They’re easy to find in Technorati, and I’ve also just spotted some on Squiddo. Why didn’t the creators of these sites just get a domain and park it? Well, for one thing, a lot of Web 2.0 sites are giving away sub-domains and their pages are already being indexed. Plus, these sites make it easy for their pages to be linked together, possibly giving a site a ranking advantage.

Most of the spam sites don’t add widgets to their pages, text is good enough, I suppose. Also, the social-sites are using cool URIs which makes them more accessible and appreciated by indexing spiders.

.TRAVEL going nowhere fast

Dot TRAVEL (.travel) seems to be just another top level domain (TLD) to be skeptical about. Critics include the Practical Nomad Edward Hasbrouck and the domainers are weighing in as well. The Domain Editorial posts a humorous exchange with a .travel administrator and there are some good comments at Frank Schilling’s blog and at the Domain Wire. Advise from domainers: stick with dot COM.

Fan run amok on Mandriva Free Spring 2007

My Averatec 6200′s fan was running uncontrollably, until I figured out the laptop_mode and how to change the default values in various configuration files.

  1. Open up the file:/etc/laptop-mode/laptop-mode.conf
  2. Change these settings from “0″ to “1″:

    ENABLE_LAPTOP_MODE_ON_AC=1
    CONTROL_CPU_FREQUENCY=1
  3. Save the file then execute the commands:

    laptop_mode stop
    laptop_mode start force
  4. And listen for the fan to slow down…

Next, there are some extra steps to get the laptop startup in laptop mode:

  1. Open up the script, /usr/sbin/laptop_mode, and change the “0″ values to “1″ for:

    ENABLE_LAPTOP_MODE_ON_AC=1
    CONTROL_CPU_FREQUENCY=1
  2. Then open thefile /etc/rc.d/rc.local and ADD the following line:

    /etc/rc.d/init.d/laptop-mode restart

I got some help about laptop-mode here. And I learned about the rc.local trick from the laptop_mode Oct 6, 2006 changelog.

I’m sure NOT all of these steps are necessary, but they worked for me!

UPDATE: These settings cause my Averatec to overheat and shut itself down: major bummer. When I find out how to configurate laptop mode better, I’ll update this post… :)

RESTful negotiations

Many RESTful applications expose APIs that require the use of components of the URL to specify the output format or the expected mime content-type of the response. This does, however, violate a key REST good practice: the one on URI opacity. There is already an HTTP request header that’s intended for this purpose and it allows multiple mime formats to be specified instead of only one, which is typical of REST APIs that only use the URL.

Examples of using the URI to specify the content-type include, featureserver.org, the Catalog Services specification from the OGC and Feature Demo from the Python, Geospatial, and The Web blog.

If it’s a good practice to NOT use the URI to identify RESTful representation mime-types, then how is a simple client, like the Web Browser suppose to get what it wants? Well, it can’t. Not now, anyway. You’ll have to wait for XHTML 2.0 when links can be specified with proper HTTP request headers such as “ContentType”.

OGC services provide for negotiation via a capabilities request. This request takes the form of a simple HTTP GET on a URL that looks like this: http://myserver.com/service?request=GetCapabilities&... The representation returned is always an XML document that describes a particular service (a resource in REST-speak) and contains the URLs that can be used to perform various operations on that service. This is analogous to using an RSS URL to obtain other URLs: linking to feeds provides further links to stories.

The interesting thing about the capabilities request is that it can be used to negotiate for a particular kind of service. In other words, a client sends a GetCapabilities HTTP request that also includes a description (a RESTful representation) of a desired service they’d prefer to interact with. In response, the service could potentially send back a different set of operation URLs depending on the negotiated service model. Typically though, the GetCapabilities response is implemented as a static XML file sitting on the HTTP server.

Negotiation is a key ingredient for supporting real RESTful applications. Services and specifications up to this point are only half way there, but the future look promising for REST…