Glish is a system for building loosely-coupled distributed systems . ``Loosely-coupled" means that the programs in a Glish system communicate with one another at fairly low rates (perhaps a hundred times a second). ``Distributed systems" means that the programs in the system can run on different computers, communicating transparently over a network.
The main thrust of the Glish system is that individual programs in the system should be wholly modular, with no knowledge of other programs or data types that might exist in the system. Glish supplies a uniform way for programs to communicate without knowing about one another. This is done by writing the programs in terms of events , which are name/value pairs. In the usual case, programs receive an event, perform some sort of action in response to the event, and possibly generate one or more new events associated with the response. An example is an FFT ``server" , which might be sent an event with the name ``please-FFT-this" and an associated value of an array of double precision data, to which the server in turn generates an ``FFT-done" event whose value is two arrays, the Fourier components of the original data. More generally, programs can also spontaneously create events in response to external actions, such as a piece of hardware signaling that some condition has changed, a timer going off, or a person interacting with a graphical interface.
Glish has three parts :
The Glish system is very flexible :
Overviews of the Glish system can be found in the papers ``Glish: A User-Level Software Bus for Loosely-Coupled Distributed Systems,", by Vern Paxson and Chris Saltmarsh, Proceedings of the 1993 Winter USENIX Technical Conference, ``Glish: A Software Bus for High-Level Control,'' by Vern Paxson, Proceedings of the 1993 International Conference on Accelerator and Large Experimental Physics Control Systems, to appear in Nuclear Instruments and Methods in Physics Research, and ``Programming in Glish,'' by Darrell Schiebel, Proceedings of the 1995 Astronomical Data Analysis Software and Systems conference. PostScript for these papers is also distributed with Glish, in the files doc/USENIX-93.ps, doc/ICALPECS-93.ps, and doc/ADASS-95.ps.
This manual is intended to provide full documentation for users of the Glish system, both those who simply wish to write Glish scripts for creating applications from existing Glish clients, and those who wish to write new Glish clients. The main emphasis is on the Glish script language, which is very powerful and can often be used to avoid having to write lengthier programs in C or C++.
First, to convey the feel of using Glish, the next chapter presents examples illustrating how Glish could be used to build a fairly simple distributed system.
The subsequent chapter begins discussion of the Glish language with a look at the different types of values that can be manipulated in a Glish script. Glish is an array-oriented language, and provides many operators for succinctly manipulating arrays of numeric and string-valued data. The chapter covers the Glish type system, the array manipulation operators, and the ways in which Glish values are created from constants.
Chapter 4 covers the different ways of creating values from other values using expressions.
Chapter 5 then looks at the different statements available in the Glish language for assigning values to variables, print values, testing conditions, looping, and sending and receiving events.
Chapter 6 discusses how to create and use functions.
Chapter 7 discusses Glish events in full detail, and the following chapter presents the Glish Client Library, which is used by programs to connect to the Glish system.
Chapter 9 details the functions and variables that are predefined by Glish for use in Glish scripts; an index is given at the end of the chapter.
Chapter 11 discusses how to use the Glish interpreter, and how to debug Glish clients.
Chapter 14 looks ``under the hood" at how the Glish system works from a systems programmer's point-of-view, and chapter 12 describes an optional command line editing feature.
Finally, Chapter 15 documents the changes between the various Glish releases, Chapter 16 lists all of the known Glish bugs, and Chapter 17 discusses those areas where Glish is likely to change in the future. Chapter 18 lists acknowledgments for Glish's development, and Appendix A gives the Glish syntax and grammar.