Version 5 of Thoughts on Unified view of data and program

Updated 2006-03-03 17:14:05

Smalltalk brought OO into mainstream . It took the extreme step of giving a unified view of everything is a object. In non-smalltalk world, there is an active process/program that acts on passive data. Smalltalk removed this dichotomy and viewed every piece of data as a tiny active process responding to messages.In otherwords, the passive data is no more considered passive, it is considered another active process.

This article tries to analyse such similar attempts to unify data and program.

In the sameway, smalltalk unified passive data into active process. There are also systems, that unified them other way.ie active process are treated as passive data.

One popular model is WWW. Basically URL - refers to a resource ,ie a file, traditionally considered passive data. CGI- is a way of interacting with programs, thro URL.Every invocation of method with a set of parameters, is treated as a file whose content is the result of that invocation.

Plan-9 system, from the unix camp, uses kind of this approach. Most services are viewed as a file in a namespace(filesystem). Reading and writing stuff into them invokes the methods of the process.

Why software system designers try to unify them. -?

These are some of my thoughts. Unification creates simplicity. Why simplicity matters. For some people it matters for some it does not matter. TCL language incorporates simplicity model but perl does not.

There are 3 categories of people who deal with computers. End-users who just use computers to get things done. Programmers and system administrators. Researchists in computer science field and other field.

Most contributions to open-source software from 2 categories of people - programmers and system administrators, computer science researchists. Though some people use the term hackers for both, there is distinct mindset between the two and their contributions.

The researchists try to find a new paradigm or architecture for solving problems and improving efficiency. They are macro-thinkers. They tend to love unity. The same way einstein searched for unified field theory.Simplicity and unity goes together.On the other-side, hackers are mostly micro-thinkers. Most paradigm shift, architectural innovations come from researchists and not hackers.

LISP,smalltalk,to some extent TCL, plan9 comes from this camp.

Unix, C, perl, php, python, ruby - comes from the other camp.

A simple mechanism has to to deal with the smallest case and biggest case in a consistent fashion.

As a contrast , take the unix shell paradigm. Most unix tools heavy use unidirectional pipes. Therefore most tools are forced to fit into filter paradigm. But many programs do not fit this model like ftp, server programs. They need bidirectional pipes. Though it is trivial to create bi-directional pipes from unidirectional pipes. There is not of much plumbing tools in unix world, till "expect" came along. Therefore unix does not care for consistency from the smallest to the biggest.

Architectures that use one consistent model for smallest and largest requirements have these characteristics - simplicity and scalability.

But there is a cost for these benefits.Performance . The approach that can deal with complex requirement puts too much overhead for the smallest case. We can see this in smalltalk, TCL. In TCL, conversion from string to native format, when using C libraries.

Now to whom simplicity matters. -? Researchists and end-users. Hence architectures, emphasising simplicity becomes popular among end-users. Products of smalltalk camp - GUI became huge success. It is an extension of object interaction taken to the highest level.

WWW also adopts unified view - everything is a file. This unified view bring simplicity. It finds huge success among end-users. Again this simplicity brings with it poor performance. But people have accepted it for its simplicity.

Here simplicity refers to simplicity of interface not the implementation. Only architectures emphasising simplicity bring computing power to the masses. Of-course at the cost of performance. but it may not matter with time.

This is one reason Linux finds it difficult to get into desktop market. To address masses, simplicity is the criteria. But hackers want to take the last juice out of the processor. They measure sytems, languages based on performance measures like pages served/per second. For them simplicity is not a criteria. Hence their tools, products does not have simplicity and hence finds it difficult to reach masses.