The Polymorphous Web Buggy
A Web buggy isn't a thing, it is a concept
- which manifests itself as a virtual object within an object oriented environment.
In essence, it is a system of interacting objects which act together in
providing all the various features of a sophisticated client side intelligent
agent.
The Polymorphous Web Buggy is a project for exploring the possibilities
of combining object oriented programming, biological principles and intelligent
objects with the Internet.
The "Buggy" is polymorphic in the sense that the virtual shape
can be abstract with no tangible form or it can be given a screen image
enabling it to have a physical appearance to represent any kind of metaphor
appropriate for an application.
In essence, the Polymorphous Web Buggy (PWB) is a programming shell which
includes an Internet protocol engine.
The buggy I first experimented with consisted of a Director/Lingo shell
with a Marionet (Allegiant) engine. The arrangement chosen was that shown
in fig 21/1
Figure 21/1 An early Mac Buggy with a Marionet engine
This skeleton Buggy was written in Macromedia Director 4 on
a Macintosh. The projector opens a "link1" movie which has a facility
for choosing between a variety of different types of Web Buggy.
Opening the "webBuggy" movie activates the Marionet application
and puts a MIAW object into a global (engineMIAW). The MIAW contains two
external objects which allow communication with the Marionet application
object in a Mac environment and deals with appleEvents.
Marionet is a small application which, acting like a Lingo object, accepts
commands from a Lingo handler and turns them into Internet protocols. This
effectively allows Lingo handlers to communicate with the Internet. For
example, a command sent to Marionet from a handler in the main buggy movie
might be:
tell engineMIAW to Marionet "GetHTTP",
sessionID, url, "page"
This will tell the engineMIAW object to instruct Marionet
to make a link with the Web page given by the URL address and return the
text contents of that page back to the buggy.
The returning information is relayed via Marionet and the externals in the
engineMIAW object to the "webBuggy" movie. There, the relevant
information is sorted or parsed and then stored in a field or a text document.
In a similar way, another command might instruct the Marionet object to
insert information into a Web page at a particular URL address using a command:
tell engineMIAW to Marionet "PostHTTP",
sessionID, url,.......etc
With a little imagination, even this simple system has almost
unlimited potential.
The first object-oriented trick is to think of all the objects which are
involved in the complete buggy system collectively - representing them as
a single integrated virtual object which is known as the Web Buggy (e.g.
all the items contained in the Web Buggy folder shown in fig 21/1 might
be thought of as collectively representing a virtual Web Buggy).
Many kinds of specialized software objects can be created in memory, which
combine to form more complicated virtual buggies. This principle can be
expanded to create buggies of any kind of complexity. Fig 21/2 shows a schematic
for such a multiple object buggy (illustrative only, not an actual example
- although future updates to this site might show the schematics of several
actual Web Buggies).
Figure 2/2 Schematic for a multiple object virtual Web Buggy
Although, in reality, such a system only sends out to and receives
messages from Web sites on the Internet, a paradigm shift will allow you
to imagine this virtual buggy as traveling out to places on the Web and
finding the information there.
According to the instructions fed into this virtual buggy system, the buggy
can be thought of as selecting relevant information, processing it, storing
it in memory or using the information it finds to go on to somewhere else.
It can be thought of as reacting both emotionally and logically to the information
which it encounters in the environment of the Internet.
In this way the buggy can be programmed to virtually "roam" about
the Web, picking up various elements of information which it can process
or react to in all kinds of complex ways. Of course there is no actual software
creature creeping over the Internet but the effect is exactly the same as
if there were.
Buggy to buggy communication
Using the buggy metaphor, you can more easily think up novel
ways to program Director objects and movies for Internet applications. For
example, it is easy to think of buggies communicating with each other.
Here we can go again to biology for inspiration and look at the system of
ants. Ants are particularly noted for their ability to combine and cooperate
in creating environments which rival human civilizations for ingenuity and
complexity. However, as complex and unfathomable as an ant society appears
to be on the surface, it is no more than a well developed object-oriented
system.
The ant is an object in this system and it incorporates a library of programmed
behavior patterns (handlers). These behavior patterns are triggered by chemical
molecules which the ants pass around between themselves. These molecules
are the chemical equivalent of the messages which are the characteristic
of object-oriented systems. Absorbing, processing and re-emitting these
chemical messages allow the ant objects to do all the wonderful organized
collective things ants do.
Similar to the way in which ants communicate using chemical messages, Web
Buggies can communicate using text messages. Remember, in information terms,
the biological molecule (which is a chemical substance) can be represented
as bits in a computer memory. These bits representing the chemical molecules
are no different from the bits which are used to represent the ascii code
of text and symbols.
How then can buggies exchange messages with each other on the Internet?
Again the key comes from biology where chemical message passing techniques
between various mammals abound. For example, territorial animals quite often
leave scent messages at the boundaries of their territory to warn others
to keep away. This is not face to face communication, but it can be just
as effective.
There is no reason why the Web buggy shouldn't use a similar means of communication.
The HTML convention of using messages embedded in tags provides an ideal
mechanism for buggies to communicate with each other.
Browsers use messages embedded in HTML tags to get the instructions for
presenting Web content to their clients. The Web browser picks up the information
in exactly the same way as a dog might pick up a scent message which warns
it to keep away from another dog's patch. Both use the same method as the
ants which use chemical molecules to trigger patterns of behavior.
Web Buggies can use this method to communicate with each other by leaving
messages for each other embedded in tags within Web pages. This will allow
buggies to be at least as effective as ants and mammals in organizing complex
cooperative situations.
Fig 21/3 shows a simple Web page as it might appear using a normal browser.
Figure 21/3 Web text as seen by a client
This observed text on a Web page is not as simple as the way
it appears to the client. The actual HTML text on the page will also include
numerous instructions embedded in tags which are used by the browser to
display the page in a specified manner. These tags and their contents are
not displayed to the viewer.
Fig 21/4 shows how the document shown above in fig 21/2 would be seen by
a normal HTML browser - complete with all the tagged instructions. Notice,
however, that there is a hidden message embedded within special tags which
will not be displayed.
Figure 21/4 As the Web text really is
The contents of HTML tags on a Web page are used by a browser
only if the browser recognizes the coding within the tags. If the coding
is not recognized, then the tags and their contents are completely ignored.
The secret message shown in fig 21/4 will thus be concealed from a regular
browser because it would not understand the code "zpq".
A Web buggy designed to retrieve the full HTML text could easily parse out
this hidden message. A simple handler for parsing out the message from the
full HTML document is shown in fig 21/5.
Figure 21/5 A script to parse out the embedded message
From an object-oriented paradigm, the Web buggy goes out to
this page (URL) on the Web and picks up the message, displaying it as shown
in fig 21/6.
Figure 21/6 The embedded message parsed out from the page
The hidden message shown here is of course just a simple example
but it could easily have been another URL address to visit or some kind
of important data. It could also have been programming messages, computer
code or even object parent scripts.
This simple little convention of embedding messages and computer code was
exploited most successfully by Sun MicroSystems for their Java language.
Within a matter of months this completely new language (which was no more
than a variant of C++) became the Web rage with everybody talking about
how this was now the language of the Web.
In fact Sun was only using the HTML tag system in a clever way, in conjunction
with a Web browser (Netscape Navigator) in an Intranet system - a technique
available to almost all other computer languages including Lingo.
A little bit of thought and you can soon figure out all kinds of clever
ways to make use of the tag system within the context of Web pages, movies
and Intranet systems.
In chapter 14, of "Lingo Sorcery", we played around with self
modifying objects and got objects to build other objects. This demonstrated
how powerful these techniques could become. This would be especially true
if you have a whole Internet to travel around to pick up component parts
to construct objects.
If you would like to take part in this Web Buggy project, see the page taking
part.
[Index]
[Next - Tying it all together]
[Back - The illusions of bots and COISes]
Peter Small August 1996
Email: peter@genps.demon.co.uk
Version 1.00
© Copyright 1996 Peter Small
No reproduction in whole or part without prior permission