The HyperText Computer and the web information space

After reading the following quote from Tim Berners-Lee I have been reflecting on the appropriateness of my proposal of a HyperText Computer — a model computer built on top of HTTP:

From the fact that the thing referenced by the URI is in some sense repeatably the same suggests that in a large number of cases the result of de-referencing the URI will be exactly the same, especially during a short period of time. This leads to the possibility of caching information. It leads to the whole concept of the Web as an information space rather than a computing program. It is a very fundamental concept.

Universal Resource Identifiers — Axioms of Web Architecture

Does the HTC undermine the idea of the web being an information space rather than a computer program?

The web’s information space is underpinned by an enormous amount of computing. Many, perhaps even most, URLs are dereferenced not to static information, but are generated on-the-fly by the execution of computer programs. Further, the conceptual simplicity of the web browser has been compromised by web documents carrying Javascript with them that is executed within the browser.

A foundational principle of the proposed HTC is that all computing resources are presented as the capability to fulfill HTTP requests. So long as the distinction between HTTP GET and POST are respected Berners-Lee’s observations about the information space will still apply. The proposed HTC also provides an alternative to browser hosted execution of code – this has the potential of reducing the amount of code embedded in webpages which would strengthen the role of HTML rather than reduces it.

My conclusion is that the HTC strengthens the ideal of the web “as an information space rather than a computer program”.

The HyperText Computer and the Axioms of Web Architecture

Tim Berners-Lee has written several articles about the axioms and design principles behind the web. I have been curious as to how many of the basic principles of the web are broken by the proposed HyperTExt Computer (HTC).

A key idea of the HyperText Computer (HTC) is that every operation is an HTTP request and all information is addressed by the HTC via URLs. Here is a summary of the princples and axioms with comments about the HTCs compliance:

Axioms from Universal Resource Identifiers — Axioms of Web Architecture:

Axiom 0a: Any resource anywhere can be given a URI This is one of the central foundations of the HTC. The HTC applies this principle to its logical conclusion. Every operand in a HTC has a URI.
Axiom 0b. Any resource of significance should be given a URI. The HTC is based on the assumption that depending on context, any, or every, resource may be of significance – particularly if the processing to do with that resource moves from one processor to another. In a HTC every item of information is referenced as a “first class object”.
Axiom 1 It doesn’t matter to whom or where you specify that URI, it will have the same meaning. HTC doesn’t break this.
Axiom 2a a URI will repeatably refer to “the same” thing HTC does not break this.
Axiom 2b the significance of identity for a given URI is determined by the person who owns the URI, who first determined what it points to. This is a basic governance position. No conflict with HTC model.
Axiom 3 URI space does not have to be the only universal space HTC does not break this.
Axiom In HTTP, GET must not have side effects. HTC does not break this.
Axiom In HTTP, anything which does not have side-effects should use GET HTC does not break this.
Axiom The only thing you can use an identifier for is to refer to an object. When you are not dereferencing you should not look at the contents of the URI string to gain other information as little as possible. HTC does not break this.

Design Principles from Principles of Design:

Simplicity The HTC proposes a unified programming model for distributed computing. That offers simplicity for the programmer.
Modular Design Yes.
Tolerance Yes.
Decentralization High.
Test of Independent Invention CORBA, DCOM, RMI and HTTP-NG need to be examined.
Principle of Least Power This principle underlies the choice of HTML. See the discussion that follows.

How does an HTC reinforce the Principle of Least Power?

Burners-Lee says:

I chose HTML not to be a programming language because I wanted different programs to do different things with it [the HTML text]: present it differently, extract tables of contents, index it, and so on.

It is the simplicity of HTML as a declarative language that underlies its reuseability. XHTML+CSS make the text of webpages even more reusable by removing almost all of the rendering hints out of the text of the page. Javascript in today’s browsers allows them to take some processing load off the webserver and offer low latency processing and temporary storage. While the Javascript to be executed is sourced from the webserver, its programming model is discontinuous with that of the webserver. The webserver is accessed over the network, Javascript executes in a local sandbox.

The last 10 years has taught the web community a lot about how to securely deliver code to a user’s browser for local execution. The HTC is, in part, an attempt to fold what has been learnt back into the original HTTP protocol. The HTC model of handling client side processing has been discussed here. The HTC is proposed as a way of providing the client side processing without needing to resort to an “in-browser” processing environment. Using the HTC model, the browser could revert to being an pure interpreter of a declarative page description language. This could strengthen the value of the “Least Power” language HTML.

Additional Principles from Web Architecture from 50,000 feet:

anything, absolutely anything, “on the Web” should identified distinctly by an otherwise opaque string of characters (A URI and possibly a fragment identifier) is core to the universality

Comment: The HTC takes this principle to its logical conclusion.

The ideal goals, then, for an evolution of HTTP – would include:

# A schema system which allows any (Corba, DCom, RMI, etc) RPC interface to be defined, with an implied standard efficient format for RPC transmission;
# Extensions to the RPC state transition protocols to allow asynchrony needed for web applications (bidirectionality, streaming, asynchronous calls…);

Comment: Berners-Lee anticipates HTTP being used for computer to computer Remote Procedure Calls. The contribution of the HTC needs to be compared and contrasted with the technologies listed in this quote. It does not appear that the HTC idea of building a computer entirely on top of an end to end network protocol is in view here. In addition to the initiatives listed by Berner-Lee, the HTC needs, also, to be compared and contrasted with web services, mashups, Amazon’s S3, and middleware initiatives.

Conclusion
The proposed HTC does not seem to be in conflict with any of the principles and axioms described in these articles by Berners-Lee. The originality of this invention is an open question.

The HyperText Computer and Client Side Scripting

Client side scripting enables the local client computer to perform parts of the processing required by a web application. Javascript is a client-side part of the magic sauce that makes AJAX apps so fluid and useful. This works, of course, but why do we need separate client side and server side technologies? The HyperText Computer provides an alternative to client side scripting.

The HyperText Computer (HTC) is a computer built on the HyperText Transport Protocol (HTTP). In a HTC, every operation is implemented by a HTTP request and all information is accessed via document URLs. Because of this the processing of any program may be seamlessly moved from the remote server to be executed locally without employing a new language technology.

It could work like this: When a user asks for a URL to be displayed in their browser, if the local HTC has spare processing or storage capacity this may be indicated in the HTTP request. The remote server, after receiving the request has a choice of returning the document that is at that URL or returning a URL of the code that when executed will generate the document. This works because the code that the server would have run retrieves all the information it needs by retrieving other URLs — that could just as easily be retrieved by the local HTC. If a browser, having indicated that it has local processing capacity available, receives code instead of HTML in reply to a request , it does not execute the code, instead it initiates a request of its local HTC passing the URL of the code to be executed.

The required extensions to HTTP to enable this mechanism is an open area for research. One consideration would be a mechanism servers could indicate a lifetime of the code returned in response to a HTTP request.

The HTC’s uniform model relying exclusively on HTTP requests and URLs means that the locus of processing is seamlessly transferable from one computer to another.

The HyperText Computer, Microsoft and Google

A couple of days ago, John Milan in his “Changing Climates for Microsoft and Google, Desktops and Webs” post on Read Write Web, explored the balance of local verses remote processing and storage and the battle between Microsoft and Google. Earlier today my post was on just this topic: The HyperText Computer and Rich Internet Applications.

The HyperText Computer and Rich Internet Applications

The HyperText Computer may provide an alternative to the need for special technologies created just for Rich Internet Applications.

The HyperText Computer (HTC) is a computer built on the HyperText Transport Protocol (HTTP). In a HTC, every operation is implemented by a HTTP request and all information is accessed via document URLs.

Rich Internet Applications (RIA) are programming environments that blend the capabilities of desktop and web applications, these offer advantages such as richer interface, smoother interaction, balance of processing load and network efficiency. At the present time, RIAs are being popularised around a variety of technologies – Flash, Flex, ActiveX, Java and others.

The amount of processing and storage done locally verses that which is done remotely is one of the key tradeoffs in designing computing solutions. Larry Ellison’s vision of a “Network Computer” (resurrected just this week) argues that the future is in doing almost no computing or storage locally. Full blown PCs running their own applications are the other extreme, with RIAs a middle ground with processing shared between the local computer and a remote server.

Today each of these scenarios employs different programming technologies and methodologies to deliver computing to end users. In the HTC model, local and remote computing resources are presented uniformly to programmers as a capacity to fulfill HTTP requests. This means that the HTC offers a model of computing that can support each of these scenarios using one programming model.

A minimal computer with just enough power to run a user agent (browser) would source all its processing and storage through HTTP requests of remote computers. If more processing power and or storage was available locally it would be available to fulfill processing and storage requests that must be done off-line or with lowest latency. Applications could, as well, be run completely locally, drawing only on the local computer’s capacity to service HTTP requests. In this way, the programming model of the HTC avoids the necessity to commit to a technology (like Flex) which forces you into one of these three models for running your application.

Instead of using special technologies to achieve a desired balance between local and remote processing – an HTC allows the right balance to be achieved based on factors like: the availability of local resources and the willingness of the owner of the programming code in question to allow it to be transferred to and executed by a local HTTP server.

The Hypertext Computer

The HyperText Computer (HTC) is proposed as a model computer. Built on the HyperText Transport Protocol (HTTP), the HTC is a general purpose computer. In its basic instruction set, every operator is implemented by a HTTP request and every operand is a URL referring to a document. The HTC is a foundational model for distributed computing.

Motivation for the HTC comes from observations that the browser may be considered a special purpose (as opposed to general purpose) model computer. Technologies like AJAX at the presentation level and iSCSI at the transport level are so undermining the Fallacies of Distributed Computing that inter and intra-computer communications not carried over IP are looking like special case optimizations. As noted by Cisco’s Giancarlo, IP networking is rivalling computer backplane speeds leading him to observe that “It’s time to move the backplane on to the network and redesign the computer”.

The HTC is a redesign of the computer. The transition from computers being connected by networks to the network as a computer has been anticipated for some time. The HTC is a model of a computer built from the ground up containing no implicit information about locality or technology.

Of course, implementation of this model will require optimisation of interconnections. A naive implementation of a HTC would have it spending 99.999% of its time in network routines fetching every operand and operator. Without affecting the programmer’s view of the HTC one may be built in silicon by hiding the optimised and messy implementation behind an onchip NAT. Programs written for the HTC will also run without change with its components distributed on 5 continents.

Computers of the future will contain just enough processing power to run a user agent. Any additional processing power or storage available locally will be available as an HTC with low latency. However, unplugging the local computing resources, does not impact the users or the programmers view in any way. In this case, other issues such as intellectual property will dominate decisions as to where and how processing is done.

SVG Visualisations

A few years ago I created this solar Equation of Time visualisation using a visual basic macro and DeltaCAD:

That was at a time before SVG was supported by any major browser. Today the situation is quite different and it is time to revisit the creation of Visualisations for the web. Is it possible to create a SVG visualisation that is contructed as part of page creation by a PHP script? After many visits to google, I finally found the keys here:

In order to use PHP in conjunction with SVG you have to do two additions in your webservers config-file. We will describe the Apache case, because it is the most-popular webserver. We assume that PHP is already installed and working correctly. First you need to add the type “psvg” to your mime-type file so that the relevant line reads like image/svg+xml svg svgz psvg. The mime-types are usually either located at /etc/mime.types or /etc/httpd/mime.types. Secondly you have to add an additional SVG-handler in the apache config-file, so that your relevant line reads like: AddType application/x-httpd-php .php .php4 .phtml .psvg, assuming you call your php-generated svg-files .psvg.

Stirring stuff! Actually with my bluehost.com control panel adding the mime type and the application type was the work of about 5 minutes.

In addition to adding the mime and application types to my server, I also needed to make sure that the psvg file contained a header() command and that the xml header was printed into the output rather than being plan text:

<?php
header("Content-type: image/svg+xml");
print("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
?>

Unfortunately IE and Firefox cross compatibility issues require the use of the non-standard <embed /> element instead of the recommended <object /> element. Here is the cross browser compatible html to include an svg into a web document:

<embed width="600" height="600" src="eotvisualisation.psvg" NAME="Dynamic EOT Visualisation" type="image/svg+xml" />

Having registered .psvg files with the webserver and sorting out the cross browser issues, the results may be seen in a unique visualisation of the speeding up and slowing down of sun based time throughout the year.

Sunlit Design

I created www.sunlit-design.com as a solar calculation resource site.

  • Very high accuracy freeware solar calculations software that can be used in office programs, CAD programs and as a plug-in for your own programs.
  • Solar calculation terms explained in a helpful way.

Visit www.sunlit-design.com!

Leap Seconds

Some of you will be aware that the rotation of the earth is not at a completely uniform speed. In fact, due to the action of the tides and other forces, the earth is slowing down. (Dr. Richard Sauder has written an interesting summary here. ) The international time standard UTC is linked to the earth’s rotation and this means that UTC occasionally has leap seconds added to it to account for the slowing. The last leap second was added just last January.

[Read more…]

Kazakh Keyboards

Kazakh Language Keyboards (KLK) is a package of Keyman 6.0 keyboards for typing Kazakh language texts under Windows 98/2000 and XP.

Download

The latest version of KLK may be found here . Please download, open the zip file and run KLK.exe to install. Free for personal use.

The Sun API

An Excel plug-in that calculates high accuracy solar values according the methods given in the book “Astronomical Algorithms” by Jean Meeus.

Kazakh Language Font – Chi Writer

The Chi Writer program came with a font editor and using this I created a Kazakh Cyrillic font and a keyboard mapping. The Keyboard mapping is still in use with modern unicode fonts.