Tuesday, September 12, 2006

Requiem for bytes

The Internet is simultaneously a battleground and a triumph of cooperation. Many businesses are built around the Internet and their competitive edge is often maintained using proprietary technology. This results in browser wars, portal wars, search engine wars and so on. However the most important changes are not single products from a single company but entire new protocols that create a new ecosystem for both cooperative and competitive activity. The bottleneck in the evolution of the Internet is the creation of these protocols—a breakthrough in the standartization process will lead to a breakthrough in the rate of development of the global computing infrastructure.

The Internet and the Web have been built around wire protocol standards such as HTTP and HTML. Agreeing to a common interpretation of a sequence of bytes enables data interchange and wide-scale collaboration. However, time and time again wire protocols cannot keep up with evolution of the systems they are describing and are becoming in the long term a barrier to true interoperability.

Useful interactions between systems requires complex interfaces; these interfaces cannot be completely described by a wire protocol, even an extensible one. Consider any of the existing image formats. They support simple extensions—for example, new metadata that specifies camera settings. However, adding a more complex extension—such as annotating a location of an image—is impossible, since programs that scale, crop or rotate an image won't know how to update the annotation coordinates. "Annotated image" must be described by a new image format, and all applications must be upgraded to support it.

Typically, the adoption of a new wire protocol is followed by a period of euphoria as new applications flourish. As the protocol is used widely, its limitations become apparent. The protocol is extended in ways that increasingly depart from the spirit of the original; the need for backwards compatibility becomes a growing burden. Eventually another generation of standards is produced that better addresses the requirements at the expense of backwards compatibility, pushing the infrastructure into a difficult and expensive phase of replacement.

At any given time, you can see wire protocols in every stage of the lifecycle. Today there is a great deal of activity around Atom, with new applications built around it. More mature HTML evolved a lot since the early versions, and the need to be backwards compatible with old browsers presented a significant problem. The foundation of the Internet, IPv4, is being slowly replaced by a redesigned IPv6—which requires an upgrade of the worldwide infrastructure.

As the world increasingly comes to resemble a single large computer, the need for myriad wire protocols will go away. Already Java and .NET virtual machines hide details from the application programmers, presenting only higher-level abstractions such as objects and interfaces. Wire protocols are used for persistence and for communication outside the machine; will they always be necessary? If the system transparently handles persistence, communication to the outside is not required—if everything is inside the world-wide computer, then there is no outside. The application developer never has to care about the proper sequences of bytes.

An alternative to wire protocols is to standardize on programmatic interfaces implemented using mobile code. For example, image objects include both data and code that performs operations such as scaling or rendering to the framebuffer. A document knows how to display itself interactively, print itself, or convert itself to plain text. The high-level interface is more compact and easier to get right than a wire protocol. Since objects of the same type share code, transfer and persistence can be implemented efficiently, while extensibility is practically unlimited.

The development tools must be the first to embrace the new mentality. Today's standards for describing interfaces and code—traditional text-based programming languages and bytecode specifications—are wire protocols themselves, and as wire protocols their adaptability and extensibility are strictly limited! "Program fragment" is an object that can be evaluated, edited and transformed—it should be treated by the system as an object and not as a sequence of source bytes. Language-Oriented Programming is an emerging paradigm that approaches software development without exposing wire protocols.

A successful standard for describing interfaces and mobile code can be compared to the invention of the alphabet. The alphabet allows different innovations to proceed simultaneously and take advantage of each other: new words are created from letters independently of new representations of letters such as fonts or Morse code or Braille. The move away from wire protocols will lead to independent development of richly interoperable software components and faster rate of evolution of the global computing infrastructure as a whole.


Post a Comment

<< Home