Go backward to 1 IntroductionGo up to TopGo forward to 3 A Distributed Mathematica Environment |

The Mathematica environment consists of three major building blocks [11]:

**Kernel.**- The Mathematica kernel is basically an interpreter for the
Mathematica programming language. This language combines features from
procedural, functional, and rule-based programming; its execution model is
essentially based on the concept of
*higher-order equational logic*[2]. The kernel has a simple text-based interface by which the user can enter commands and receives the results in textual form, e.g.In[1]:= Sum[i+1, i, 0, n+m] (m + n) (1 + m + n) Out[1]= 1 + m + n + ------------------- 2

**Library.**- The Mathematica library incorporates the system's "expert knowledge"; it consists of a large number of mathematical algorithms written in the Mathematica language and interpreted by the Mathematica kernel. Apart from the basic library, many Mathematica packages for various application domains are available. However, because of the poor performance of the interpreted Mathematica language, a couple of time-critical algorithms are directly implemented in the kernel (written in C and compiled to machine code).
**Frontend.**- The Mathematica frontend represents a graphical user-interface
to the kernel. Actually, there exist various frontends for different purposes,
e.g. for the visualization of computational results. The
*notebook frontend*(see Figure 2) allows to write, display, and interact with Mathematica*notebooks*, i.e., hypertext documents structured as hierarchies of nested*cells*which may be individually opened and closed. A notebook may embed*active contents*, i.e., Mathematica commands that are executed by the kernel and whose results are displayed inline. By sophisticated facilities for mathematical type-setting and for multimedia components, notebooks serve as the main means of presentation and authoring in Mathematica.

Kernel and frontend are separate processes; they communicate by an external
communication mechanism called *MathLink* designed for the portable
exchange of Mathematica data (see Figure 2). Thus one may call
external programs from within Mathematica or, vice versa, use Mathematica as a
component of third-party applications. Moreover, this gives the possibility to
run Mathematica kernel and frontend on different machines, to set up
alternative frontends, or to exchange data between concurrent instances of
Mathematica. The MathLink Developer's kit provides a C library for the
development of programs that can exchange data with Mathematica via
communication links built on top of the Unix socket mechanism.

A typical scenario for the use of Mathematica in scientific/technical education are lectures based on the presentation of Mathematica notebooks analogous to lectures supported by transparency slides: The lecturer loads a notebook on her own machine whose display is projected to an overhead screen. She scrolls through the document, changes the level of detail by opening and closing cells, and triggers the execution of active contents; the audience listens to the presentation and watches the screen.

Provided that the audience is equipped with own machines, the participants may then load the notebook via some file transfer protocol or network file system into their own instances of Mathematica and independently run exercises, work on assignments, develop own programs, and so on. In a similar way, results may be transferred back to the lecturer's host.

However, the use of Mathematica in this scenario is quite restricted and rather uncomfortable:

- By its reliance on optical communication facilities, the presentation is restricted to a local audience. Furthermore, the quality of projection (with respect to brightness and contrast) is typically poor compared to computer displays.
- The coordination of independent exercise modes (involving file transfer, system startup, etc.) and the subsequent presentation of results by students is difficult.

The following sections sketch a system that addresses these problems by integrating the individual instances of Mathematica on different machines into a unified distributed environment.

Author: Wolfgang Schreiner

Last Modification: July 17, 1997