09 May 2002

Thu, 09 May 2002

Sam Ruby says never say impossible

Sam Ruby comments on the dynamic vs. static nature of Radio:



DavidWatson: It's impossible to have up-to-the-minute-data with regard to the page unless the script executes at page-load-time and that requires scripting a dynamic page via asp, jsp, php, etc. Never say impossible.  DiveIntoMark publishes statistics and linkbacks hourly.  Radio has a scheduler.addTask. [Sam Ruby]


I'm not sure that I like that solution. I'm assuming that you mean the addTask would publish the page. That may have ancillary effects (RSS?), though my knowledge of Radio is nil in that regard. Anyhow, I already updated my site to use PHP to do the HTTP GET, which gives me referrers up to the minute, or the granularity supported by the RCS server.

Posted at: 09:34 | permalink

Radio - not statically served anymore

Well, I started thinking about the Jon Udell comment, dynamically updated but statically served. And I thought, what options do I have, if I want my site to have up to the minute referrer listings? The obvious choice for me was PHP, since I use apache on linux. So, I sat down and wrote an HTTP GET using PHP:

<?php include "Net/HTTP/Client.php"; $http = new Net_HTTP_Client(); $http->Connect( "24.154.119.16", 8080 ) or die( "Connect problem" ); $status = $http->Get( "/soap/urn:rcsproxy/getReferers?site=0102172&group=radio1" ); if( $status != 200 ) die( "Problem : " . $http->getStatusMessage() ); else echo $http->getBody(); $http->Disconnect();?>


Then the problems started. First, I had to get the HTTP Client class from here. I wrote enough code to get the call working and discovered a bug in the client class.


// DNW echo '$this->debug & DBGINDATA :' . $this->debug & DBGINDATA;


I commented out the offending line, which BTW, inserts a zero into the body text. I believe it's missing an if debug line. So the PHP code was working. Then I set about adding the PHP code to my Radio templates and discovered this problem. Sigh. I thought for a moment and decided I'd tell apache to go ahead and parse HTML as PHP. This didn't seem to have any ancillary effects save for the fact that the page loads may slow a bit. I'm curious to try it outside my LAN. Two benefits occur:



  1. The site referrer listing at the bottom of each page is accurate up to the minute.

  2. The publish time for Radio went way down since it doesn't block on the call to my getReferers web service.

I'm going to let it run this way for the time being and try and learn a little in the process. Hopefully, the page load times don't turn visitors away.


One thing I learned, yet again, is how horribly awry the Radio template editing can go if it's not perfect. Due to the nature of this change, it was difficult to test since I needed to have the script executing on the server in order to see what was happening at the browser.


I probably  need a full-blown staging environment but that seems like overkill right now. I may pursue that shortly though since I totally blew away my site twice this morning with horked up templates. My apologies if you had to suffer through my rather poor use of HTML.

Posted at: 09:24 | permalink

Radio - Dynamically updated but statically served

Jon Udell makes an important point about Radio that I've tried to explain to a few people, but Jon's gift for clear explanations goes along way toward clarifying my point (emphasis added by me):



Since Radio sites are dynamically updated but statically served, the behavior seen at disenchanted and elsewhere—that is, per-item referrals shown after items—ultimately calls for a solution that fetches referral data from the community server, correlates it by referred-to page over time, and then updates the site accordingly. [Jon Udell]


Part of the problem is that Radio executes the scripting language calls embedded in templates at publish-time. I've made this point previously but I'm not sure that it's clear. By comparison, if I make a call to my web service from something like a servlet, the code executes at page-load-time - when the browser requests it on behalf of the user. However, in Radio, that execution occurs when I publish the page. This is an important distinction for people to understand at some point in their mastery of Radio. Not a novice topic per se, but an import point nonetheless. It's impossible to have up-to-the-minute-data with regard to the page unless the script executes at page-load-time and that requires scripting a dynamic page via asp, jsp, php, etc. That's why the referer data listed at the bottom of every page on my site may differ from page to page, because the script in the template executes when I publish the page and there is latency in the time that each page is published.

Posted at: 07:23 | permalink

The space below this page is up for grabs

Chris Wenham on Ghosts of Xanadu:



In the words of one inspired soul, it's disintermediating the web—reducing the role and importance of central agencies. [disenchanted.com]


Wenham never ceases to amaze me and this article takes the backlinking referer analysis a step further. Thanks for the compliment, Chris.

Posted at: 07:08 | permalink