Table of contents
The GLU system (Générateur de Liens Uniformes) gives a global solution to avoid this problem, using symbolic names of resources; the URLs will be generated on the fly and always with the last definition. These definitions are maintained by the managers of the participating remote services.
The GLU system has other functionalities as:
A basic difference with similar tools (such PURL tool or URN concepts) is that the resolution of URL is done when the HTML pages are generated and not when the user clicks on the links. This reduces the response time to a minimum and increases security in order to link efficiently databases.
The GLU system has been developed by CDS (Centre de Données astronomique de Strasbourg ). Demos and documentation can be found on the CDS httpd server at this address : http://aladin.u-strasbg.fr/glu/glu.htx. Comments and questions can be send at email@example.com.
The primary goal of the GLU system is to avoid hard-coded links in HTML pages. For this, it uses a filter tool to replace on the fly symbolic names (also called GLU identifiers) by the corresponding URLs. This is the GLU resolver task.
To perform these resolutions, the GLU system needs to have some knowledge about HTTP accesses of Web services.
For this purpose, the GLU system allows a data manager to describe his/her HTTP accesses in GLU records (see the example below). These records can be very short (an identifier and a corresponding URL) but generally, they give more information:
%ActionName simbad_query %Description Simbad data base query (on Strasbourg host) %Owner CDS'simbad %DistribDomain CDS %DistribDomain ASTRO %Doc.User http://simbad.u-strasbg.fr/sim-fid.pl %Url http://simbad.u-strasbg.fr/sim-id.pl?Ident=$1&CooEqui=2000&Radius=$2&Radius.unit=arcmin %Url.Method POST %Param.Description $1=Identifier or coordinates %Param.DataType $1=Coo(J2000,COO) %Param.DataType $1=CDS'simbad'I %Param.DataType $2=HEASARC'astrobrowse'Angle(MINf) %Param.Value $2=10.0 %Param.Optional $2 %Test param="M31" %Test param="'12 30 45 +10 20' 6" %Institute CDS
We call a GLU dictionary a set of GLU records. As it is in ASCII, any editor can be used to edit and modify it.
Each record has an identifier made of three elements : a name, a service name and a registration domain (the two last elements are also called the owner). The GLU protocol guarantees that each identifier is unique in the whole GLU system. The full identifier is written in reverse order like this: domain'service'name. In the example, the full identifier is CDS'simbad'simbad_query (In a given context, the owner is not required and the identifier is just the name, for example: simbad_query)
The GLU system can also define data types. Any GLU member can described his/her own data types in his/her GLU dictionary or can use definitions provided by other data managers. These definitions are written in specific GLU records like in the example below. These data types are used to describe the URL parameters and the content-type of results (see the example above).
%DataTypeName I %Description Identification of astronomical object (Simbad identification) %Owner CDS'simbad %DistribDomain CDS %DistribDomain ASTRO %Test param="M 31" %Test param="sao 12345" %DefaultAction smb.query %Doc.User http://vizier.u-strasbg.fr/cgi-bin/Dic %DataType.Conv GLU'default'J2000 : GetHttp("http://simbad.u-strasbg.fr/sim-id.pl?Ident=$1") |Regex("^Coordinates \(2000\) :<b> ([0-9\.\+\- ]+)")
Presently, only a few data types have been defined in the GLU system:
CDS'simbad'I : Identification of astronomical object (Simbad identification) CDS'VizieR'E : Designation of an Astronomical Catalog with CDS/ADC Conventions CDS'biblio'R : Bibliographic reference code (bibcode) CDS'VizieR'M : Acronym as listed in the Dictionary of Nomenclature of Celestial Objects CDS'VizieR'U : Physical Unit symbol CDS'misc'query/keywords : Keywords in english natural language CDS'misc'query/name : Last name GLU'default'J2000 : J2000 coordinates GLU'default'B1950 : B1950 coordinates GLU'default'Coo($Sys,$Fmt) : Generic coordinates GLU'default'Mime($MimeType) : Mime type HEASARC'astrobrowse'Angle($fmt) : Generic radius
A few data types (owner: GLU'default) have been already defined in the GLU system by default for astronomical coordinates and the MIME types.
In addition, the description of a data type can have conversion rules. These rules allow the GLU resolver tool to convert URL parameters from their specific data type into the data type required by the URL (see the field %DataType.Conv in the example). This feature is widely used by the CDS Astrobrowse implementation (AstroGlu).
For each GLU record, the data manager can specify in which GLU domains he wants to distribute it. This is done by appending one or several fields (%DistribDomain) with the GLU domain name (see our example). The distribution of a record is authorized only if the owner of the record has been correctly registered in the GLU system. In the simbad_query example, this means that the simbad_query record can be distributed only if the service simbad has been registered in CDS GLU domain.
This distribution is done by a daemon called glud. Every hosts having a GLU daemon is called a glu member. Hosts having a GLU daemon and distributing its GLU records is a glu server.
Each GLU member can ask to receive GLU dictionaries from other data managers. For this, it asks its GLU daemon to subscribe to the GLU domains from which it wants to receive the records. In this case, the glu member is a glu client.
On each glu member, with all the received records, the glu daemon builds and maintains its own global dictionary, merge of several remote dictionaries.
The management of a GLU domain (registration of clients, servers and services) is done by any dedicated glu daemon. In this case the glu member is a glu manager. The GLU system has some mechanism to authorize or reject subscriptions based on IP address masks or hostname masks.
The creation of new GLU domains must be registered in a specific glu member called glu root. There is only one glu root for all the system to guarantee the uniqueness of the domain name.
The connection with the GLU managers is required only when a new service, client or server must be registered. And in the same way, the connection with the glu root is required only when a new domain must be registered. In any case, the running of the glu daemon is never required for the GLU resolver tool. They continue to work with the more recent global dictionary that the glu daemon had built.
To install the GLU system, you have two possibilities: either you launch the installation script (./INSTALL.sh) or you try yourself following the directives below:
The configuration file for the GLU daemon must be called glud.conf
and placed in the installation directory of GLU.
Its format is very simple : key-word value on a line. Empty lines or lines beginning by `#' are ignored.
The following example shows a general glud configuration file:
GluHook host.dns.domain DomainManager YOUR_OWN_GLU_DOMAIN LocalDic /path/name/of/a/glu/dictionary SUBSCRIPTION_DOMAIN DomainClient GLU_DOMAIN
The GLU system is built on a hierarchical scheme. To join this system, you must specify a ``hook'', ie a hostname in the GluHook parameter. On this host, a glud manager must be running (see below) and the responsable of this must be joined to authorize your subscription.
If your glud is a glud manager itself, it means that it manages one or several GLU domains. The parameter DomainManager will be used to define them. A glud manager has to maintain and to distribute the list of glud clients and glud servers of its domains. It has to manage the list of GLU services registered on its domains.
The parameter LocalDic means your glud is a glud server. All GLU services associated to the records (specified in the GLU dictionary) will be registered in the indicated domains. In each GLU records, one can specify one or several distribution domains (see the field %DistribDomain).
The parameter DomainClient is used to specify the GLU domains for which you want to receive the records.
All parameters can be repeated to specify several domains (except GluHook)
GluHook simbad.u-strasbg.fr DomainManager XXX DomainManager XXXEXPORT LocalDic /usr/local/glu/xxxmgr.dic XXX LocalDic /usr/local/glu/xxmgr.bis.dic XXX DomainClient XXX DomainClient CDSEXPORTThis glud.conf file defined two domains (XXX et XXXEXPORT), it subscribes two local dictionaries files in domain XXX, and it wants to receive all GLU records distributed in XXX domain and CDSEXPORT domain.
The manual of all other configuration parameters can be found at the address: http://aladin.u-strasbg.fr/glu/gludhelp.pl.
The glud must be launch in background (not by inetd)... under the owner of the glud (bin for example).
su bin /usr/local/glu/glud &
Rem : Glud uses the TCP port 1600. There are always two glud process running.
To manage the glud daemon, you use the command gluc followed by a parameter. The most important are:
There are several interesting informations displayed by the command gluc info, for example :
.glud host (DNS name): xxxhost.domain.dns .glud listens on port: 1600 .glu directory: /usr/local/glu .general dictionary: glu.dic .level log: 10 .pid of main glud: 1510 .pid of glud listener: 1511 .next synchronisation: 1997/06/17 08:56:11 (delay: 1d) .next check: 1997/06/17 08:56:12 .check delay range: [10m..365d] .check average delay: 1d .check with glu.top: 15d .check local indulgence:5s .max child exec gluds: 8
.glu hook : simbad.u-strasbg.fr .Domain manager for: XXX XXXEXPORT .Default domain rights: clients servers services .Client on domain(s): XXX GLUROOT .Server on domain(s): XXX XXXEXPORT GLUROOT .Service owner: XXX'xxxmgr XXXEXPORT'dommgr XXX'dommgr .on domain(s): - NED for ./xxx.dic
.Version: 4.030 beta - Sept 1997 - glud manager package .Contact: C.D.S. - Pierre.Fernique@astro.u-strasbg.fr
This method is recommended in two cases:
To do that, just use the gluc command with the following parameters:
gluc mirror hostWhere host is the GLU member for which you ask a GLU dictionary copy. The configuration file (glud.conf) of this host has to mention that your host is allowed to use the mirror functionality on itself. For that, your hostname has to match atleast one of its AllowedMirror specifications (wildcard words or regular expressions). For example:
AllowedMirror /.*glu.*/ AllowedMirror *.u-strasbg.fr
WARNING: in mirror GLU functionality, it's your responsability to ask regularly a copy by putting this command in your crontab.
<&action_id,options param1 param2... |anchor_text>
<&cdsbib 1996A&A...123..34> <&CDS'smbmgr'simq 'HD1'> <&ADS'bibmgr'abstract 1995PASP...123..18|reference> <&getabs,rpn 1994A%26A...110..45 'T A K'> <&heasarc '%B1950:10 12 32.23 -10 23 20.5'|click here>
An other syntax of GLU tags is possible. Instead of defining the action you can specify (by a GLU identifier), you just indicate the data type of an object. In the GLU dictionary, the definition of this data type will specify the default GLU action to be taken.
Nota: for a simple data conversion, the option 'c' must be specified. just after the data type. In this case the default action isnot taken into account.
<%I HD1> <%R 1994A&A...134..23> <%E IV/25/|POSS Plate Date> <%J2000,c '%B1950:10 11 12.2 +3 4 45'>
lib-glu.pl for Perl sources (only under SunOs.2.x):
The file lib-glu.pl is required in your Perl sources, and you can use these four functions:
Automatic translation by httpd server:
It is very efficient to use the Action functionality of the httpd apache server to filter automatically .gml files by the glufilter when they are called by a http browser.
If you want to implemente this functionality, follow the directives below (under Apache 1.2.x):
|Action text/gml /cgi-bin/gml2html|
echo "Content-type: text/html"
In the same way, but for cgi scripts generating directly GML in output:
(we suppose that these GML scripts are under /cgi-bin/cgigml directory of the httpd server)
|Action application/gml /cgi-bin/cgigml2html|
$PATH_TRANSLATED | /usr/local/glu/glufilter
%ActionName nameA %Description one line short description %Owner srv %DistribDomain dom %Url http://server/dir/file.html
%ActionName nameB %Description one line short description %Owner srv %DistribDomain dom %Url http://server/dir/cgi?p1=$1&otherparam=$2
%DatatypeName nameC %Description one line short description %Owner srv %DistribDomain dom %DefaultAction nameB
%ActionName nameD %Description one line short description %Owner srv %DistribDomain dom %SeeAlso nameD1 %SeeAlso nameD2 %ActionName nameD1 %Description one line short description %Owner srv %DistribDomain dom %Url http://server1/dir/cgi?p1=$1 %ActionName nameD2 %Description one line short description %Owner srv %DistribDomain dom %Url http://server2/dir/cgi?p1=$1
%ActionName nameE %Description one line short description %Owner srv %DistribDomain dom %Url http://server/dir/cgi?p1=$1 %FullTextResult Clic on <A HREF=$1>this</A>
%ActionName nameF %Description one line short description %Owner srv %DistribDomain dom %FullTextResult for $1 click on <&nameA> or <&nameE>
%ActionName Action record identifier (and aliases) %Description Short description %Owner Owner service %VersionNumber Version number and date %DistribDomain Distribution domain %Technical.Doc URL for technical documentation %User. Doc URL for user documentation %Url Action URL with templates (\$n) %Url.Method Recommanded HTTP method for immediate query %DefaultAnchor Text Default anchor text %FullTextResult HTML anchor context %Local.ResultTest Local program for result test %Remote.ResultTest Remote URL for result test %Param.Description Parameter description of action URL %Param.DataType Parameter data type of action URL %Test Parameters (and options) for test sequence %Test.Delay Proposition of delay between two tests %Test.Result Last test result and date %ResultDataType Result data type of action URL
%DataTypeName Data type record identifier (and aliases) %Description Short description %Owner Owner service %VersionNumber Version number and date %DistribDomain Distribution domain %Technical.Doc URL for technical documentation %User.Doc URL for user documentation %DataType.Equiv Data type equivalence %DataType.Conv Data type conversion %DataType.Revconv Reverse data type conversion %DataType.NConv Multivocal data type conversion %DataType.NRevconv Multivocal reverse data type conversion %DefaultAction Default action identifier
The manual of GLU record fields can be found at the address: http://aladin.u-strasbg.fr/glu/gludichelp.pl.