Design Description for the RIP Text Export Utility
Background
The text export utility falls under the umbrella of the RIP
Infrastructure sub-probject. The infrastructure encompasses all of the
supporting programs, configuation files, procedures, and similiar items
which are not strictly part of the database server itself, but necessary
for its proper functioning.
The legacy database server exported its data files to a publically
accessible FTP server. These could then be downloaded by users, either
to synchronize mirrors, or for other uses. The legacy database used a
special 2-character abbreviation to describe the attributes of the
objects it contained.
An Example of a Legacy Object
*dn: UOI.GR
*de: University of Ioannina
*de: Computer Center
*de: Ioannina
*ac: IL495-RIPE
*ac: PP2466-RIPE
*tc: PP2466-RIPE
*ns: 193.92.4.7 139.91.1.1
*sd: cc
*di: 193.92.4.0
*ch: panos@cc.uoi.gr 19930809
*ch: ripe-dbm@ripe.net 19990711
*so: RIPE
The data is in a plain-text format, easily imported and exported as
desired. The data was provided in seperate files, compressed by
gzip. Additionally, the data was presented in a single
combined file, also compressed, that could be downloaded.
Because the output of the Whois server used longer,
human-friendly, attribute names, an additional text file was produced,
with the shorter names converted to the
RIPE-157 standard
names.
An Example of a Legacy Object with Long Attribute Names
domain: UOI.GR
descr: University of Ioannina
descr: Computer Center
descr: Ioannina
admin-c: IL495-RIPE
admin-c: PP2466-RIPE
tech-c: PP2466-RIPE
nserver: 193.92.4.7 139.91.1.1
sub-dom: cc
dom-net: 193.92.4.0
changed: panos@cc.uoi.gr 19930809
changed: ripe-dbm@ripe.net 19990711
source: RIPE
This text file contained the same information as the combined file,
except in the more readable format. It was also compressed using
gzip.
Goals
The goals for the RIP Text Export Utility are:
- Provide the contents of the RIP database in RPSL format.
- Not require any additional work for installation or support.
The first goal is obvious, the second may not be. Currently RIP
requires a great deal of work for the administrator to install,
especially compared to the legacy database server, which only required a
recent Perl install and a Unix box. RIP requires MySQL, glib, and a C
compiler at the least. While Perl would have been an easy tool to write
the utility with, it would have been an additional component.
Execution Overview
RIP uses an SQL database, MySQL currently, to store its data. This data
needs to get exported to a file or set of files. While ordering the
data would have been nice, this would have required that the dumper
understand the format of the tables in some (although not much) detail.
It was decided that a simpler approach is to merely output each class
into a seperate table, unsorted.
Fortunately, all of the raw data in the RIP server is stored in a single
table. This makes retrieving it very simple. The stages of execution:
- Parse command-line options
- Connect to database and request table dump of the last
table
- Open two files for each class, one for the long attribute names and
one for the short attribute names
- For each row in the last table:
- Output to appropriate long attribute name file
- Convert long attribute names to short
- Output to appropriate short attribute name file
The utility does not combine or compress the files. This task is easily
and more properly performed by a shell script which in turn calls the
utility itself.
Features
The program allows the user to specify database host, port, user,
password, and name. Only name is required, with the others using the
default if not specified. It also allows the user to ask for verbose
output, in which case some useless information is output, such as the
options used, and the speed at which the records were processed.
It would probably be best to read the defaults for the options from the
RIP configuration. This option will be pursued.
$Id: DESIGN.html,v 1.2 2000/11/29 18:26:35 shane Exp $