GAIA and CURSA can interrogate remote catalogues via the Internet to retrieve lists of objects which satisfy a given criterion. GAIA can also extract images of a specified region of sky from remote databases. Similar facilities are also available in other packages, such as the ESO SkyCat image display tool and the Gemini observing tool. This functionality is achieved by having servers on the remote systems which accept queries sent by GAIA etc, interrogate their local copies of the catalogues to find the data which satisfy the query and return them to the client which sent the query. This method of working is an example of a `client-server architecture', with GAIA, CURSA etc. acting as the client. The server and client can communicate because the query is sent, and the results returned, in a standard format. This document describes how to write such servers and also the formats of the queries and results.
The standard formats for the queries and returned data were developed by Allan Brighton and colleagues at ESO for use with their Astronomical Catalogue Library (ACL). This subroutine library provides the functionality for a client to access a remote server, and is used by, for example, SkyCat and GAIA. Consequently, in this document the formats will be called the `ACL format' and a server which accepts queries and returns data in these formats will be called an `ACL server'.
The communication between the client and the server uses the Hyper-Text Transfer Protocol (HTTP) developed as part of the World Wide Web. The servers are, strictly speaking, gateways using the Common Gateway Interface (CGI). One way of thinking of the client is as a very specialised Web browser. A consequence of this approach is that if a site is to host an ACL server it must also be running a Web server. The HTTP and CGI protocols are, of course, enormously flexible and the ACL format is a set of additional rules and restrictions which sit `on top' of them.
An ACL server is a CGI gateway, and CGI gateways can be provided in any number of different ways. However, the usual technique is to implement the gateway as a Perl script and this approach will be adopted in this document. Usually (though not always) the Perl script will invoke a special-purpose program or Database Management System (DBMS) to interrogate the catalogue database.
This document is divided into two parts:
Writing Catalogue and Image Servers for GAIA and CURSA