Technology Preview: General Magic’s Magic CAP & Telescript
From the Original Pages
Click a page to enlarge · Alt-click to open the full issue
If the wizards at General Magic are right, Magic CAP and the Telescript communications technology may alter not only the way we interact with computer networks, but also how we conduct our lives. These technologies are clearly designed to attract the vast majority of people that would never think of using a conventional network.

Telescript is, first and foremost, a language. Based on the name alone, many people automatically compare Telescript to the familiar PostScript that guides many laser printers and a few display screens. While not a perfect analogy, simply stated Telescript is to communication what PostScript is to imaging.
Since communication is so important to complete much of life’s work, people require a special type of application—a communicating application—that facilitates a person’s interaction with others.
General Magic realized the importance of this when they designed Magic CAP, their interactive operating environment that enables users to keep in touch and enter the electronic society of today and the near-future. In fact, CAP stands for Communicating Applications Platform.

While Magic CAP incorporates several interesting user interface innovations, it’s too early to comment extensively on its operation or effectiveness with novice users.
Therefore, what follows is a quick overview of the main features of the interface, followed by a more detailed description of the underlying communication technology: Telescript.
The Rabbit’s Out of the Hat
Magic CAP takes the idea of a physical metaphor to a new level. While the Macintosh attempted to simulate your desktop, Magic CAP creates a nearly 3-D virtual world through which you interact to exchange messages, get information, or purchase goods and services.

Interaction takes place in three highly stylized settings: the Desk, the Hallway, and Downtown. The desk, illustrated in Figures 1 and 2, provides the tools for organizing and communicating with others. The on-screen objects, though often enhanced, have features similar to their real world relatives.
The Hallway contains several rooms that you would expect to find in a normal building, including a Store room, a Library, and a Games room. Figure 4 illustrates a typical hallway.

The Downtown symbolizes the Main Street of your electronic community and features buildings such as stores, boutiques, and shopping centers. Each building represents a service or collection of services that a user can select to engage.
The Downtown on any device depends on the services to which a user chooses to subscribe. Users of the AT&T PersonaLink service, for example, will see a large AT&T Pavilion somewhere on the street as illustrated in Figure 3.
The Button Bar
Located at the bottom of the screen is a button bar of useful features, tools, and utilities. From left to right, the buttons represent the following:
- the Desk button provides a quick return to the desk
- the Stamps button features dozens of stamps to attach to notes and postcards (please see figures 5 to 8). The stamps can be decorative, including sound and animation; or they can be functional giving the card a special property such as urgent.
- the Lamp button includes global functions such as faxing, printing, erasing and others.
- the Tote Bag enables you to move objects from one place to another.
- the Keyboard and the Trash Truck perform the expected functions.
The Technology of Telescript
One of the most common models for modern networks today relies on a system called client-server computing. In this model, the client sends a request to a server and waits for the response. At the heart of the client-server model is a technology known as remote procedure calling (RPC).
In the RPC model, a message—which is essentially data—carries the request from the client to the server to execute a procedure. Likewise, a message carries the procedure response back to the client.

The RPC and client-server technologies have proven to be powerful paradigms for performing a range of tasks, especially in the typical office environment where computers are permanently connected, generally immobile, and where access is purposefully restricted to a defined group of people.
This situation bears little resemblance to the world of the average person. People tend to form temporary connections with a service, are highly mobile, and would like to subscribe to any useful service in a painless manner. For this, a new approach to network communication is required: remote programming (RP).
In the RP model, the network transports objects which are made up of data and procedures. Upon arriving on the receiving computer, the object is executed. General Magic refers to these objects as agents, because they tend to act as electronic surrogates that perform some useful work for you.
If the receiving computer offers a service, your agent can request it to perform a defined task for you. In real life, this may mean placing an airline reservation, or ordering a new compact disc.

One advantage will become immediately obvious. In the RPC model, many tasks require an ongoing communication stream to be maintained between the client and the server. This implies greater traffic on the network to handle the extra messages, something especially ill-suited for a narrow and expensive channel such as a wireless link.
On the other hand, the RP model transports everything that is needed to execute the task at the remote station without requiring an ongoing, and potentially costly, connection. There is no reason for a person to remain connected to a service while the task is being performed.
All the Places an Agent Can Go!
Agents are the first important concept in Telescript. The other two are known as place and go. A place is a location where an agent can reside and execute. Your personal communicator serves as a place, as does a service provider such as an electronic shopping center.
In the AT&T PersonaLink service, electronic mailboxes are considered to be places. A place may be nested in another place. For example, a sport and concert ticket provider may be located in an electronic mall.

Stepping back a bit, both agents and places are programmed using the Telescript language.
The third ingredient of Telescript is the mechanism by which agents can travel through the network to get to places where they can complete the transaction you requested. Every agent has the ability to transport itself from one place to another, and it does this by using a Telescript instruction called go.
In terms of network programming, go serves as the high-level construct that developers use in order to program agents to move through the network. Using Telescript, the task of communicating is reduced to a single instruction, independent of the underlying network.
All the Good Meetings are Taken
Upon arriving at a place (a service provider, for example), your agent may choose to interact with another agent, most likely an agent representing the service provider.

The Telescript language includes an instruction called meet to perform this operation. The second agent may accept or decline the meeting. If it chooses to decline, it may do so in a manner which precludes other agents from even finding out about its existence!
Once a meeting has been established, the agents receive references to each other, thereby enabling them to interact as peers to perform the tasks for which they are authorized.
The Concierge Agent
Up to now, we’ve described a rather simple system that has an agent travelling to a place to interact with another agent to accomplish some goal. However, the language provides flexibility for a full range of agents and services. One interesting example is an agent that is programmed to perform several functions; something we can call a concierge agent.
For example, a hotel’s concierge agent may arrange for a taxi to arrive at 6 pm, purchase tickets to the leading play in town, and reserve a table at a popular restaurant after the show.
Using the Telescript language, agents can be arbitrarily complex and have the ability to build several basic services into complete service packages with added value.
More About the Language
The Telescript language has several characteristics that lend to its power and suitability as a programming tool for communicating applications. Telescript is:
- object-oriented, using subclassing to increase program modularity
- dynamic, capable of using new classes during program execution
- persistent, storing objects in non-volatile storage
- communication-centric
- interpretive
The Telescript Engine
Like PostScript, the Telescript engine is an interpreter that executes an agent’s procedures. Each device that wishes to deploy agents on the Telescript network must have a Telescript interpreter. (Please see the interview with Jim White starting on page 12 for a description of the current implementations of the Telescript engine.)
The Telescript engine maintains agents and places on a device. On a personal communicator, there may typically be only a few agents and places, however a public service provider may maintain thousands.
The Telescript engine is capable of executing programs concurrently, and when it comes time to execute the go instruction, bundles an agent for transport to another engine.
Telescript Engine APIs
Every Telescript engine has three conceptual application program interfaces (APIs) that enables it to use the resources of the underlying device. (Note: the portable version of the Telescript engine actually does have these three APIs). These are:
- the External Applications API, enables a communicating application written in C, for example, to interact with the parts written in Telescript.
- the Storage API, provides safe storage of objects in the nonvolatile storage of the device.
- the Transport API, provides access to the communications system of the device.
Developing for Telescript
General Magic offers two products to help developers create communicating applications using Telescript. These include:
- The Telescript Developer’s Kit (TDK), containing object code, sample programs, and documentation for building applications.
- The Telescript Porting Kit (TPK), containing source code for the Telescript Engine.
Information for this article was taken from several sources including the General Magic White Paper “Telescript Technology: The Foundation for the Electronic Marketplace” written by James White, the creator of Telescript, and from conversations with Mr. White.
Transcribed from Pen-Based Computing, Volume 4, Number 1 — January 1994. Pages 3, 4, 5, 11.