Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Glish is used for building loosely-coupled distributed systems. ``Loosely-coupled" means the programs in a Glish system communicate with one another at fairly low rates (perhaps a hundred times a second). ``Distributed systems" means programs in the Glish system can run on different computers, communicating transparently over a network.
The main thrust of Glish 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 provides a uniform way for programs to communicate without knowing about one another. Communication occurs because the programs are written in terms of events, i.e. name/value pairs. In the usual case, programs receive an event, perform an action in response to that event, and possibly generate one or more new events associated with the response. An example is an FFT ``server" that might be sent an event with the name ``please-FFT-this" and an associated value of an array of double precision data. In this case the server generates an ``FFT-done" event whose value is two arrays, the Fourier components of the original data. 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 consists of 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 for those who write Glish scripts for creating applications from existing Glish clients, and for those who want 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++.
To convey the feel of using Glish, the next chapter presents examples illustrating how Glish is used to build a simple distributed system.
Chapter 3 begins discussion of Glish as an array-oriented language with a look at the different types of values that can be manipulated in a Glish script. Glish provides many operators for succinctly manipulating arrays of numeric and string-valued data. This chapter covers the Glish type system, array manipulation operators, and ways in which Glish values are created from constants.
Chapter 4 covers the use of expressions to create 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 8 discusses how to read and write ASCII files.
Chapter 9 discusses how fail values are used to propagate and report errors. This chapter also discusses other debugging tools.
Chapter 10 details the functions and variables that are predefined by Glish for use in Glish scripts; an index is given at the end of this chapter.
Chapter 11 discusses a particularly useful client which allows graphical user interfaces to be created and controlled from Glish scripts.
Chapter 13 discusses how to use the Glish interpreter, and how to debug Glish clients.
Chapter 14 discusses features for editing commands entered at Glish's command-line interface.
Chapter 15 discusses the C++ library which is used to create Glish clients.
Chapter 16 looks ``under the hood" at how the Glish system works from a systems programmer's point-of-view, and chapter 14 describes the command line editing feature.
Finally, Chapter 17 documents the changes between the various Glish releases, Chapter 18 lists all of the known Glish bugs, and Chapter 19 discusses those areas where Glish is likely to change in the future. Chapter 20 lists acknowledgments for Glish's development, and Appendix A provides the Glish syntax and grammar.