Logo[ Bristol CS | Index ]

DIPSY: A Declarative Internet Programming System

Background of the research

The study of concurrent and distributed programming has become dramatically more important in recent years, thanks largely to the rapidly increasing use of computer networks. Examples of distributed systems, comprising multiple processes interacting via the Internet, are now ubiquitous. At the same time, programming distributed systems is an inherently more difficult task than conventional sequential programming, in respect of both correctness (to achieve correct synchronization) and efficiency (to minimize slow interprocess communication).

Most current Internet applications are simple client/server systems, such as World Wide Web browsers and servers. However, as the technology matures, more complex applications are likely to be developed. This will increase the demand for programming languages and systems that ease the task of constructing correct, reliable, and efficient distributed software. Declarative programming languages are well placed to fulfil this need. For example, languages like KL1 and Parlog already provide a high-level concurrent programming style and can be implemented efficiently on many platforms.

Tempo (Gregory and Ramirez, 1995; Gregory, 1996; 1997) is a new declarative concurrent programming language that has much in common with KL1 and Parlog, but several key differences:

A prototype implementation of Tempo exists as an interpreter written in Parlog, and has been widely distributed.

References

Gregory, S. and Ramirez, R. 1995. Tempo: a declarative concurrent programming language. In Proceedings of the 12th International Logic Programming Conference, L. Sterling (Ed.). MIT Press, pp. 515-529.

Gregory, S. 1996. Derivation of concurrent algorithms in Tempo. In Proceedings of the 5th International Workshop on Logic Program Synthesis and Transformation, M. Proietti (Ed.). Springer-Verlag, pp. 46-60.

Gregory, S. 1997. A declarative approach to concurrent programming. In Proceedings of the 9th International Symposium on Programming Languages, Implementations, Logics, and Programs, H. Glaser (Ed.). Springer-Verlag.

Purpose of the research

The aim of the proposed research is to design and implement a programming language suitable for the construction of distributed Internet applications in a declarative style. This language will be based on Tempo, which should be an ideal starting point, for the following reasons:

The specific aims of the research are to design and implement features that are currently lacking from Tempo. For example:

Contents of the research

The research will consist of designing new language features and implementing them, and finally testing them on appropriate applications.

As a testbed for the language extensions, we will convert the existing Tempo implementation, which is written in Parlog, to KLIC. KLIC is an ideal vehicle for this purpose because (like Parlog but unlike C or Java, etc.) it provides the symbolic concurrent programming facilities that Tempo inherits from logic programming. In addition, KLIC is extremely fast, powerful, and robust; it provides an interface to C programs; it has built-in procedures to perform TCP/IP communication via sockets; and it can easily be extended if required.

The language features will then be designed and implemented as follows.

Resulting Software: DIPSY

The Tempo implementation produced during the course of the research will be made available as a toolkit, named DIPSY, which will allow the construction of distributed Internet applications in a declarative manner.

Tempo programs define temporal constraints, which are relations between the execution times and values of event structures. Computation is performed by function constraints} and test constraints, which are simply relations between data values (numbers, strings, etc.), and can be defined in any (preferably declarative) language. In DIPSY, the test and function constraints will be defined in KLIC. Primitive constraints like `+' and `<' will be built into the system, but others can be defined by the programmer in KLIC (and hence also in C).

The first version of the DIPSY system (DIPSY-1) will be a single program that executes programs in Tempo (extended with I/O and real-time programming features). Since it will be an interpreter, Tempo programs can be created dynamically, but KLIC and C code called from Tempo programs will need to be compiled and linked with the DIPSY system in advance. This system will be able to interact with other Internet processes, including other invocations of DIPSY itself.

The intermediate version of DIPSY (DIPSY-2) will be a basic distributed system featuring the Internet process location feature. This will be able to spawn processes on other (properly configured) Internet hosts by sending them the processes' constraints together with their defining code. To simplify the implementation, any KLIC and C code must have been compiled and linked with the DIPSY system on every host, in advance of execution.

In the final version of DIPSY (DIPSY-3), all of the code needed by a process, including KLIC and C code, will be sent to the remote host at the time the process is spawned. This version will also include full mobile software features.

The DIPSY system will be distributed as a set of KLIC source files, which can be compiled to produce executable programs on any machine that will run KLIC programs.

DIPSY-1 will comprise a single program that executes extended Tempo programs. If user-defined KLIC/C code is to be used, the user's KLIC/C source programs must first be compiled and linked with the DIPSY system.

The distributed versions, DIPSY-2 and DIPSY-3, will each comprise two executable programs:

  • An interactive front-end program which allows the user to supply programs written in Tempo (and KLIC and C, in the case of DIPSY-3), and enter Tempo queries to be executed.

  • A server program running as a demon on any hosts on which the user wishes to run Tempo processes. The server will receive Tempo processes (the constraints and the code that defines them) in an encoded form, and execute them, communicating with other hosts when necessary to execute shared events.

    The server will be significantly more complex in DIPSY-3 than in DIPSY-2, since KLIC/C code may be included with the processes. The server will then need to dynamically compile and link the KLIC/C code and invoke a Tempo interpreter as a new Unix process to execute the new process.

    Advantage of the software from users' point of view

    DIPSY will provide an easy way to construct correct, reliable distributed Internet applications:


    Steve Gregory, steve@cs.bris.ac.uk. Last modified on Friday 9 February 2001 at 14:20. © 2001 University of Bristol