The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

ROADS::Centroid - A class to generate and process centroids

SYNOPSIS

  use ROADS::Centroid;
  # public methods
  @servers_to_ask = doreferrals("sex and drugs");
  PollCommand(FILEHANDLE, "/roads/source", "/roads/guts/index");
  # private methods
  if (ROADS::Centroid::referrallookup("sex and drugs")) { ... }
  ROADS::Centroid::AuthenticatePoll("FULL", "foobar", "yourserverhandle");

DESCRIPTION

This class implements support for generating RFC 1913 style centroids from ROADS databases and for doing referral lookups within a collection of centroids.

METHODS

@servers_to_ask = doreferrals("sex and drugs");

Given a query, this method checks any available centroids for servers which can satisfy it. A list of these servers' handles is returned as the result. referrallookup is called behind the scenes for each centroid.

PollCommand( FILEHANDLE, "/roads/source", "/roads/guts/index" );

This method is used to process an incoming request (via FILEHANDLE) for a poll of a ROADS database, and generates an RFC 1913 style centroid using the ROADS templates and index specified in the second and third arguments respectively. The centroid is returned on STDOUT.

referrallookup("sex and drugs")

This method is used to perform the actual check for a given query in a given centroid.

AuthenticatePoll( "FULL", "foobar", "yourserverhandle" );

Process authentication information in the poll request. The first argument is the poll type, the second is the authentication data (e.g. clear text password) and the third is the server handle of the polling server. This routine is called behind the scenes by PollCommand.

BUGS

The referral lookup code only lets you search across all of the centroids which are available - it should let you specify just certain servers' centroids and ideally all centroids except those from certain servers.

The authentication code is a NOOP - but the ROADS WHOIS++ server has its own access control list mechanism based on ip addresses / domain names / password protection. We should also be passing the authentication type as well, though only "password" (clear text passwords) has been defined so far.

PollCommand assumes that it should be sending its output on STDOUT, which isn't necessarily a good thing.

SEE ALSO

"wppd.pl" in bin, RFC 1913, "wig.pl" in bin

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>