Telescript (programming language)

Last updated

Telescript was an agent-oriented programming language written by General Magic as part of the overall Magic Cap system. Telescript programs used a modified C-like syntax known as High Telescript and were compiled to a stack-based language called Low Telescript for execution. Low Telescript ran within virtual machine interpreters, or "Telescript engines", on host computers.

Contents

The basic model of Telescript is similar to Java, and differs primarily in where the applications would run. Java was modelled to make it possible to download Java applications onto any platform and run them locally. Telescript essentially reversed this, allowing end-user equipment with limited capabilities to upload Telescript programs to servers to allow them to take advantage of the server's capabilities. Telescript could even migrate a running program; the language included features to marshal a program's code and serialized state, transfer it to another Telescript engine (on a device or a server) to continue execution, and finally return to the originating client or server device to deliver its output.

General Magic had originally developed as a team within Apple Inc., and were spun off in 1990. When they began to generate some press buzz in 1992, Apple decided to enter the same market with their Newton tablet computer. General Magic were unable to find a niche within the market, and Telescript services were soon deprecated in favor of new products unrelated to mobile computing.

History

In 1990, Marc Porat convinced then-Apple-CEO John Sculley that the future of computing lay not in desktop personal computers, but much smaller portable devices combining computing power, communications systems, and data located on network-accessible servers. [1] He noted that portable computers would always have less power than the machines they would connect to, and suggested that this be part of the design - instead of trying to build a portable computer that could perform the tasks of a desktop system, the portable device should invisibly use the computational power of the servers to produce a similar result. [2] [3]

Sculley agreed to allow Porat to begin researching the concepts under the code-name "Pocket Crystal". Key members of the early team were Porat, and famous Macintosh developers Bill Atkinson and Andy Hertzfeld. The team quickly found themselves ignored by upper management and left continually struggling for resources. They approached Sculley again with the idea of spinning off Pocket Crystal as a separate company. Sculley agreed to this, as well as the idea of inviting in new partners on the hardware side. The new company, General Magic (GM), was created in May 1990 with Apple, Sony and Motorola each holding a 10% stake. The company ranks soon filled out with other Macintosh alumni, including Joanna Hoffman, Susan Kare, Dan Winkler, Bruce Leak and Phil Goldman. [1]

By 1992 GM had signed development agreements with a number companies to work with the Magic Cap environment, including Sony, Motorola, Matsushita, Philips, British Telecom and AT&T Corporation. This generated considerable press "buzz". [3] Apple had by this time started the Newton project, a design for a larger hand-held tablet-like computer more similar to the full-sized iPad. With General Magic's success in the press, they re-positioned the Newton squarely in the same market and rushed it to release in 1993. They also sold their stake in General Magic and sued them. General Magic's partners did not release hardware until 1994, by which time the Newton had essentially defined what a personal digital assistant (PDA) should be, and PDA systems were being judged on their handwriting recognition capabilities. Magic Cap was a point and click interface (similar to HyperCard or the modern iOS). [2]

By 1995 the company was a shell of its former self and most of the original developers had left. In 1996 Steve Markman was hired to take over, and he hired Kevin Surace to take the company in a new direction. A new team developed the Portico telephone-based personal assistant system, which lives on today as the basis of OnStar. The original handheld group was spun off in 1998 as DataRover Mobile Systems Incorporated and later renamed Icras in 2000, [4] serving a number of vertical markets before shutting down in 2001. [5] The remains of the original company were liquidated in 2004. [3]

Description

Underlying concepts

Telescript was modelled on the concept of small programs known as agents that would interact with computing services known as places all of which would run on a cluster of one or more servers that hosted what was called a Telescript cloud. The user's handheld device was one such place, albeit one with limited capabilities. The model assumed that most information and services would be provided by places running on larger server computers hosted by the communications providers like AT&T. Even early documents refer to this as running in the cloud. [1] User-facing programs would consist of a number of such agents, which might run locally, on the provider's hosts, or even be forwarded to 3rd party servers. To coordinate communications, Telescript also included the concepts of a telename that uniquely identified users, and teleaddresses which identified the device even as it moved between networks. [6]

For example, consider a shopping application that the user asks to find prices on a new barbecue grill they wish to purchase. In a traditional client–server model, the application would form a number of queries, send them to a number of services, and then collect the results and display them. In the Telescript model, the application would instead build a new agent populated with the data from the request, stamp it with their name and address, and then send that to a store place on a server for processing. That server could then handle the request directly, or hand off the agent to other places, like the actual vendors' places, for further processing. The results could be placed in the agent's internal data fields and sent back through the network to the user's device, or a new "messenger" agent could be spawned to carry only the result data and sent back to minimize network data transfer. [7]

The model also differs from traditional solutions in the way that data exchange occurs in the case of interacting programs. For instance, if the user chooses to buy one of the barbecues they found in their previous search, in a conventional system the task of filling out the order forms and confirming payment would be accomplished through direct communications between the user's device and the remote server, requiring a "live" communications channel throughout the process. In the Telescript model, a new agent with the information needed to complete the purchase is sent to that vendor's store place, interacts with the store place or agents from the vendor, and then returns with the success or failure. The main communications takes place between the agents and places on the remote server, so communications over the network is required only at the start and end of the process. [8]

Telescript was object-oriented (OO) and used a number of uncommon terms to describe object state and communications. Attributes correspond to what other languages refer to as instance variables or fields. Method calls were known as requests, and the act of running a method's implementation was known as performing it. All such calls always responded with a message indicating success or failure, it was up to the requesting object to optionally trap those and respond to them. Hints on how to pass the data into and out of method calls were known as constraints, and covered the common "by ref" and "by value", among others. [9]

Telescript was generally stateless in terms of data lifetime. All data within the program, both instance and local variables, were always serialized. Agents could be invoked or suspended at any instant, and would not lose their state. This same mechanism also allowed agents to be easily communicated between hosts.

Syntax and layout

Although Telescript's control and layout was inspired by C, its precise syntax was considerably different. One obvious difference was the replacement of C-style curly braces with parentheses at the definition level, retaining curly braces for grouping statements within logic and flow control statements, and the use of the colon to separate a name from its definition. The following code defines the interface for objects of the type Pie: [10] [N 1]

  Pie: interface(Object) = (        public            name: String;            initialize: op(name: String);   );

Note the use of the keyword op, which corresponds to the function or sub found in other languages. The implementation of the Pie could be used in one or more class objects, which can be organized into moduless in a fashion similar to Visual Basic .NET's namespace construct. #include is used to import header files, but the import is local to the modules, not the file as a whole. [11]

Telescript's agent and places concepts were invoked simply by sub-classing those two classes, Agent and Place, both of which were subclasses of Process. For code clarity, one could place both of these in a single file, and even gather them into a single module. The following code defines the agents needed to implement a store that sells Pies: [12]

   PieStoreModule: module = (     #include "pie.i"             PieBuyer: class(Agent) = (      public       live: sponsored op() = {         *.go(*.destination);         myPie = place@PieSeller.sellPie();         *.go(*.originPlace);        };       );            PieSeller: class(Place) = (      public       sellPie: op() Pie = {        aPie: Pie | Nil;        aPie = *.getPieFromStock;        if (aPie = nil) {         PieBuyer(*.distributorTicket, Permit(nil));         aPie = *.waitForPie();         return aPie;        };       };      );    );

The PieBuyer object, an Agent, contains a single method, live, the standard startup method used by all Agents. [13] Simply creating a PieBuyer and invoking it will cause the live method to be called, in a fashion similar to the new operation found in most OO languages, although this method is called after setup. The * replaces what is more commonly implemented as self or Me, referring to the object itself, in this case the PieBuyer agent. The code basically says that when it is created, the object should send itself (*.go) to the location sent to it during creation (*.destination). Once there, it should tell the matching place object, in this case a PieSeller, to sellPie. When that command is complete, the agent will return to its place of origin. The invoking application can then examine the results by inspecting the myPie variable. [12]

The PieSeller object, a Place, also contains a single method, sellPie. It defines a local variable called aPie, defining it to be a Pie object, or "nothing", which is used in the case that there are no pies. It then attempts to set aPie to a value by calling its own getPieFromStock method (not shown here) and then checks if that returned a value. If it did not succeed, for instance, if the stock was empty, it then builds a new PieBuyer object of its own, sends that request off to another shop, and then waits for a response. That shop might forward the request off to another, and so on. When this chain of events concludes, either with a pie or unsuccessfully, the PieSeller place finally returns that to the calling PieBuyer. [12]

Objects are normally "owned" by the place that created them. Ownership also confers capabilities and security settings. The language can take ownership of an object through the own {} construct, or in this case, use the sponsored keyword to indicate it should run within the ownership of the place it is running in. This might be used, for instance, to grant the agent the ability to see stock in the inventory, values that would otherwise be private. Using sponsored is exactly the same result as placing the code in an own {} block, but allows this to take place in the caller. [14]

Telescript includes several built-in collection types, Set, List, Dictionary, and Collection, the last of which is essentially a List with text indexes (one half of a Dictionary). One common source of errors in Telescript was that while a collection as a whole could be passed back in an agent, individual items within it were owned by the place. Thus if one used return MyCollection[someIndex];, it would arrive back on the user's device as null. The solution was additional syntax, the DictOwned and ColOwned hints, which caused the ownership of returned values to be changed on return, and thus be serialized into the results when returning to the original place. [15]

Sub-classes were known as flavors; the PieBuyer class outlined above is a flavor of Agent. Telescript also included the concept of mix-in classes, which offered features similar to multiple inheritance by allowing the creation of classes containing only code that could then be included in other classes. Mix-ins were not flavors. [16]

Like many modern OO languages, Telescript separated interface and implementation, placing these in .i files for the interface, and .t files for the implementation (t as in "t"elescript). Uncommonly, the language also defined a third type of file, .d, which combined multiple .i files together. [17] Compiled code was placed in a .s file, which was guided by linker instructions in a .l file. [18] The External Application Framework allowed C++ code to be called by Telescript. [19]

Notes

  1. These examples are modified from the originals found in the Guide, correcting a number of errors in syntax and spelling.

Related Research Articles

In object-oriented programming, a class is an extensible program-code-template for creating objects, providing initial values for state and implementations of behavior.

<span class="mw-page-title-main">Java (programming language)</span> Object-oriented programming language

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need to recompile. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but has fewer low-level facilities than either of them. The Java runtime provides dynamic capabilities that are typically not available in traditional compiled languages. As of 2019, Java was one of the most popular programming languages in use according to GitHub, particularly for client–server web applications, with a reported 9 million developers.

<span class="mw-page-title-main">Server (computing)</span> Computer to access a central resource or service on a network

In computing, a server is a piece of computer hardware or software that provides functionality for other programs or devices, called "clients". This architecture is called the client–server model. Servers can provide various functionalities, often called "services", such as sharing data or resources among multiple clients or performing computations for a client. A single server can serve multiple clients, and a single client can use multiple servers. A client process may run on the same device or may connect over a network to a server on a different device. Typical servers are database servers, file servers, mail servers, print servers, web servers, game servers, and application servers.

The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) designed to facilitate the communication of systems that are deployed on diverse platforms. CORBA enables collaboration between systems on different operating systems, programming languages, and computing hardware. CORBA uses an object-oriented model although the systems that use the CORBA do not have to be object-oriented. CORBA is an example of the distributed object paradigm.

In software engineering and computer science, abstraction is:

ABAP is a high-level programming language created by the German software company SAP SE. It is currently positioned, alongside Java, as the language for programming the SAP NetWeaver Application Server, which is part of the SAP NetWeaver platform for building business applications.

<span class="mw-page-title-main">Backdoor (computing)</span> Method of bypassing authentication or encryption in a computer

A backdoor is a typically covert method of bypassing normal authentication or encryption in a computer, product, embedded device, or its embodiment. Backdoors are most often used for securing remote access to a computer, or obtaining access to plaintext in cryptosystems. From there it may be used to gain access to privileged information like passwords, corrupt or delete data on hard drives, or transfer information within autoschediastic networks.

In computer science, a software agent or software AI is a computer program that acts for a user or other program in a relationship of agency, which derives from the Latin agere : an agreement to act on one's behalf. Such "action on behalf of" implies the authority to decide which, if any, action is appropriate. Some agents are colloquially known as bots, from robot. They may be embodied, as when execution is paired with a robot body, or as software such as a chatbot executing on a phone or other computing device. Software agents may be autonomous or work together with other agents or people. Software agents interacting with people may possess human-like qualities such as natural language understanding and speech, personality or embody humanoid form.

In computing, an interface is a shared boundary across which two or more separate components of a computer system exchange information. The exchange can be between software, computer hardware, peripheral devices, humans, and combinations of these. Some computer hardware devices, such as a touchscreen, can both send and receive data through the interface, while others such as a mouse or microphone may only provide an interface to send data to a given system.

In computer science, a mobile agent is a piece of software agent combined with data that is able to migrate from one computer to another autonomously and continue its execution on the destination with the ability to interact with other agents there. Rather than a client requesting data and performing actions, a mobile agent is sent to a server to perform those tasks. This paradigm delegates the work from the client and onto the server.

<span class="mw-page-title-main">XMLHttpRequest</span> Web API to transfer data between a web browser and a web server

XMLHttpRequest (XHR) is a JavaScript class containing methods to asynchronously transmit HTTP requests from a web browser to a web server. The methods allow a browser-based application to make a fine-grained server call and store the results in XMLHttpRequest's responseText attribute. The XMLHttpRequest class is a component of Ajax programming. Prior to Ajax, an HTML form needed to be completely sent to the server followed by a complete browser page refresh.

General Magic was an American software and electronics company co-founded by Bill Atkinson, Andy Hertzfeld, and Marc Porat. Based in Mountain View, California, the company developed precursors to "USB, software modems, small touchscreens, touchscreen controller ICs, ASICs, multimedia email, networked games, streaming TV, and early e-commerce notions." General Magic's main product was Magic Cap, the operating system used in 1994 by the Motorola Envoy and Sony's Magic Link PDA. It also introduced the programming language Telescript. After announcing it would cease operations in 2002, it was liquidated in 2004 with Paul Allen purchasing most of its patents.

PowerHouse is a byte-compiled fourth-generation programming language originally produced by Quasar Corporation for the Hewlett-Packard HP3000 mini-computer, as well as Data General and DEC VAX/VMS systems. It was initially composed of five components:

<span class="mw-page-title-main">Java (software platform)</span> Set of computer software and specifications

Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems that provides a system for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers. Java applets, which are less common than standalone Java applications, were commonly run in secure, sandboxed environments to provide many features of native applications through being embedded in HTML pages.

<span class="mw-page-title-main">JADE (programming language)</span>

JADE is a proprietary object-oriented software development and deployment platform product from the New Zealand-based Jade Software Corporation, first released in 1996. It consists of the JADE programming language, Integrated development environment and debugger, integrated application server and object database management system.

In computer science, marshalling or marshaling is the process of transforming the memory representation of an object into a data format suitable for storage or transmission. It is typically used when data must be moved between different parts of a computer program or from one program to another.

OS 2200 is the operating system for the Unisys ClearPath Dorado family of mainframe systems. The operating system kernel of OS 2200 is a lineal descendant of Exec 8 for the UNIVAC 1108. Documentation and other information on current and past Unisys systems can be found on the Unisys public support website.

Object-oriented programming (OOP) is a programming paradigm based on the concept of objects, which can contain data and code. The data is in the form of fields, and the code is in the form of procedures.

<span class="mw-page-title-main">Distributed Data Management Architecture</span> Open, published architecture for creating, managing and accessing data on a remote computer

Distributed Data Management Architecture (DDM) is IBM's open, published software architecture for creating, managing and accessing data on a remote computer. DDM was initially designed to support record-oriented files; it was extended to support hierarchical directories, stream-oriented files, queues, and system command processing; it was further extended to be the base of IBM's Distributed Relational Database Architecture (DRDA); and finally, it was extended to support data description and conversion. Defined in the period from 1980 to 1993, DDM specifies necessary components, messages, and protocols, all based on the principles of object-orientation. DDM is not, in itself, a piece of software; the implementation of DDM takes the form of client and server products. As an open architecture, products can implement subsets of DDM architecture and products can extend DDM to meet additional requirements. Taken together, DDM products implement a distributed file system.

This glossary of computer science is a list of definitions of terms and concepts used in computer science, its sub-disciplines, and related fields, including terms relevant to software, data science, and computer programming.

References

Citations

  1. 1 2 3 Levy 1994.
  2. 1 2 Clark & Knaster 1995.
  3. 1 2 3 Kanellos 2011.
  4. Dan Hanttula, "Magic Mirror", Pen Computing, April 2000
  5. Mark Beaulieu, "Wireless Internet Applications and Architecture", Addison-Wesley Professional, 2002, 9780201733549, p. 12.
  6. Reference 1995, p. 1.
  7. Reference 1995, pp. 1–2.
  8. Reference 1995, p. 2.
  9. Reference 1995, pp. 8–12.
  10. Guide 1995, p. 7.
  11. Guide 1995, p. 8.
  12. 1 2 3 Guide 1995, p. 9.
  13. Guide 1995, p. 66.
  14. Guide 1995, p. 40.
  15. Guide 1995, p. 42.
  16. Reference 1995, p. 20.
  17. Guide 1995, p. 3.
  18. Guide 1995, p. 4.
  19. Guide 1995, p. 5.

Bibliography