# Part IPreface

### Accessing this document

A hypertext version of this document is available. To access it on Starlink systems type:

showme   ssn75

Paper copies can be obtained from the Starlink document librarian, who can be contacted as follows.

 The Document Librarian. Starlink Project, Rutherford Appleton Laboratory, Chilton, DIDCOT, Oxfordshire, OX11 0QX, United Kingdom.

Electronic mail: starlink@jiscmail.ac.uk

Fax:

 from within the United Kingdom: 01235-445-848 from overseas: +44-1235-445-848

### Obtaining assistance

If you run into difficulties writing a server then I might be able to offer advice or assistance. I can be contacted as follows.

 A.C. Davenhall. Institute for Astronomy, Royal Observatory, Blackford Hill, Edinburgh, EH9 3HJ, United Kingdom.

Electronic mail: acd@roe.ac.uk

Fax:

 from within the United Kingdom: 0131-668-8416 from overseas: +44-131-668-8416

### Revision history

(1)
26th July 2000: Version 1. Original version (ACD).

## List of Tables

### 1 Introduction

GAIA[4] and CURSA[3] 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 SkyCat1 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:

Part I
– a tutorial example of creating a simple ACL server,
Part II
– reference material, mostly describing the ACL format.