The Loci/Piper Project
INTRODUCTION(Thanks to dLoo for this introduction.)
The Command LineThe UNIX command line is the heart of UNIX tradition. It provides access to a set of simple tools that do one thing well.
In a typical command line session, a user might list files:
Count the lines in a document:
And list all of the processes in their user space:
The UNIX philosophy of providing a large base of simple tools creates
a simple language in which users can manipulate files and directories.
Merging 'ls' and 'sort'Without pipes, the UNIX language would consist of nothing more than one word grunts. Users, for example, would be able to list files with 'ls' and sort items in a file with 'sort,' but they would not be able to sort the output of a listing of files. Only programmers, with an intimate knowledge of C, could to link the two.
Creating a link between two UNIX utilities, something called a named
pipe, would require the following code:
Even worse, in a world without pipes, the above solution would connect
'ls' and 'sort' in a manner that was neither general nor flexible. In this
way, it would encourage users to create large, single purpose, monolithic
programs rather than the simple utilities that are the spirit of UNIX.
Pipe is transparent I/O glueEnter pipe. The pipe utility, "|", is one of the most important utilities in the UNIX world of the command line. With pipe, users can glue the I/O of simple utilities together.
Users can list processes:
Sort a list of processes:
Uniquely sort a list of processes:
Count the number of uniquely, sorted processes:
As can be seen above, "|" transformed the UNIX from a set of single
word utilities to a rich language that users can use in an infinite variety
of ways. By moving the process of gluing utilities together from the programmer
level to the user level, "|" gave the command line the power it has today.
Benefits of pipe
The GUIToday, most users have left the command line to work in graphical users interfaces. This provides an easy to use graphical environment for users to work in, of which both KDE and GNOME are examples.
Users can access the file system:
Desktop environments, like KDE and GNOME, provide a uniform view of the file system and access easily used programs ranging from calculators to spreadsheets. These programs are build by assembling components in C, C++, and other programming languages.
Although it is easy for programmers to connect components together in
these environments, it is not easy for users. Doing so requires code like
or the following:
Few users know CORBA or DCOP, so this puts a tremendous burden on them
if they want to connect components in new and novel ways.
Piper is transparent component glueEnter Piper. Piper, like pipe, moves the processes of gluing components from C and and C++ code to the user level. Piper uses XML rather than C or C++ to describe how components are related to each other. For example, if an email component talked to a spell checker component, this would be represented in an XML document as a relationship between two components. When this document was loaded at runtime, Piper would dynamically create the relationship.
Piper provides a simple graphical representation of component relationships that users can easily manipulate. Rather than use the "|" symbol, Piper uses simple lines and arrows to connect different components together and then allows users to change and add to these connections at will.
Piper is significantly richer than the traditional world of pipes. The goal of Piper is to be a complete XML component language that allows users to construct any program they need from a set of components located anywhere on the Internet.This gives tremendous power to the user.
The work on Piper has just begun. Right now, Piper allows users to view the components that programs are built out of:
Create new programs by connecting new components
And view the data flowing over individual components
Piper is multidimensional in that one component can have multiple connections
to other components, though this is not displayed above. When a set of
Piper components is finished, users can create a BlueBox user interface
to the components. The resulting program will then be accessible from any
platform that BlueBox has been ported to.
Benefits of Piper