Re: virus: X-Internet

From: Mark Collins (me@thisisnurgle.org.uk)
Date: Tue Jul 30 2002 - 07:08:06 MDT


Note: Non-programmers might not want to read this.

On Tuesday 30 July 2002 9:52 am, you wrote:
> What's Next: The X Internet
>
> Source: NASA Tech Briefs
> (http://nasatech.com/Features/July01/xnet_june.html) Authors: Staff
> Dated: 2002-07-30
>
>
> Get ready to put an "X" through the "WWW" in your Internet address.
>
> Forrester Research (Cambridge, MA) predicts that the Executable Internet,
> which adopts the XML standard, will become the dominant way we interact
> with the Net by 2005, replacing browsers and static Web pages with a much
> richer, interactive experience.

Oh gawd, not another "ALL HAIL XML!" article. I'm getting pissed off with
these things. Sure, XML is useful for things that involve large amounts of
data that isn't always required (such as documents, pagers, online business
cards), but in more cases than not, it's overkill (and highly ineffecient).

XML is too bloated for anything vaguely real-time, which would rule out most
house-hold appliances.

The way to go is a STANDARD network layer with a clearly defined protocol for
controlling appliances. Which of the following makes more sense for
controlling a thermostate (article example)?

XML version:
<thermostat device="stat0001">
        <cut-off-temp measure="celsuis">20</>
</>

Traditional protocol version:
struct {
        unsigned long size;
        unsigned long device_type;
        unsigned long device_id;
        unsigned long command;
        BYTE data[MAX_PACKET_SIZE];;
} device_control_t;

struct {
        float cut_off_temperature;
} device_thermostat_contol_t;

Granted, the latter requires more work on the programmers side, but parsing
text tends to be quite an expensive operation, esp. compared to something as
simple as the latter example. Reading the data is nothing more than:

switch (device->device_type) {
case DEV_THERMOSTAT:
        device_thermostat_t *thermostat = &(device->data);
        set_temp (thermostat->cut_off_temperature);
        break;
}

Total number of intructions to perform this operation would be less than 10
on most processors, where as an XML parser would require hundreds.

So can we please get off the XML bandwagon and start using our heads?

-- 
===
Mark 'Nurgle' Collins
http://www.thisisnurgle.org.uk
Stupid IRC quote of the <variable time period>:
<phoenix> insider, you'll have to excuse nurgle, he's the epitamy of evil



This archive was generated by hypermail 2b30 : Sun Sep 22 2002 - 05:06:16 MDT