Radical computing thoughts: Data impedance & automatous computing
Thu, 25 Oct 2001 17:02:02 +0000
(1) Most of the text in "real" computer programs, accounting
for a disproportionate number of bugs, and a hugely
disproportionate expense in maintenance and understandability,
is the code that does nothing except move data between internal
variables and external representations. These include devices,
files, databases, historians, TCP ports, mail servers, web
servers, registries, etc. Each is manipulated through its own
API. Worse, each has its own name space.
(2) A large part of what makes Unix hacking so productive is
that the OS presents most external data as a text file, and
provides piping to wire programs together through this
mechanism. Most programs are written to read stdin, to write
stdout, and what gets mapped to these the program cares not.
Plan 9 extends this "factorization of representation" to
more complex programs, but on successful platforms, programs
revert to dealing with every kind of data source and store
in its own fashion.
(3) The radical question: Should programs do I/O at all??
Here's the argument for answering it "no." Issues of format
and persistence of external data should be specified
outside the program. Always. This partitions concerns,
lessens maintenance, and would make most programs much
smaller. How would this work? Instead of doing I/O, a
program is written with unbound variables that must be
bound externally before the program is executed. The
execution environment includes mechanisms for binding
external data sources and stores to internal variables,
and provides a way to specify needed data transformations.
The SAME program would function against a text file, an
XML file, a database, a TCP port, or a keyboard, for any
of its external data sources, with no change to its code.
(Whether it does something useful depends on whether the
"plumbing" around the program makes sense. Writing to
a keyboard would generate an exception, indicating not
that the program has a bug, but that it was plumbed
(4) Many maintenance issues, including most having to do
with new data formats, sources, or repositories, are
completely separated from application programs. This
seems to me a necessary and important step in the
"autonomous computing" initiative that IBM is pushing.
There's my thought for the day. Tomorrow, I will return
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp