More About ALLBASE/NET Features [ COMMUNICATOR 3000/XL XL RELEASE 3.0 ] MPE/iX Communicators
COMMUNICATOR 3000/XL XL RELEASE 3.0
More About ALLBASE/NET Features
by Mike Kelley
Data Management Systems Division
MORE ALLBASE/NET FEATURES
ALLBASE/NET allows an application on one Hewlett-Packard machine to
access an ALLBASE/SQL DBEnvironment on another HP machine, provided the
two machines are connected via a local area network (LAN) or an X.25 wide
area network (WAN). The local machine is known as the client node, and
the remote machine is known as the server node. An application runs on
the client node, and accesses an ALLBASE/SQL DBEnvironment residing on
the server node.
The ALLBASE/NET product is composed of several parts. On the client node
there is an application program, ALLBASE/SQL and the AliasDB file. On
the server node is ALLBASE/SQL, the NETUsers file, and the listener
daemon or process. The following applications can use ALLBASE/NET to
access a remote ALLBASE/SQL DBEnvironment from the client node:
* ISQL.
* ALLBASE/SQL Preprocessors (all languages).
* ALLBASE/QUERY.
* ALLBASE/4GL.
* User-written applications which have been preprocessed with an
ALLBASE/SQL preprocessor.
* Information Access PC and HP NewWave Access.
The Listener Daemon/Process
The listener provides two important functions: (1) it listens for
connection requests and (2) it sets up a direct communication line
between the user and the database process. The listener monitors a
specified data communications port for any incoming connection requests.
When it receives one, it determines the identity of the client user and
spawns a database process for that user. After spawning the database
process, the listener redirects communications so that the user and
database process communicate directly with one another over the network,
thus leaving the listener free to resume listening for more connection
requests.
The listener design is consistent across all supported HP platforms.
Therefore, the use and installation is the same regardless of the machine
being used. This eliminates any re-learning for the different platforms.
The listener must be manually started in order to allow remote access to
the server node. It is a streamed job on MPE/XL which is started by
MANAGER.SYS. On HP-UX, the listener is started up by root and runs as a
background process.
The listener can be shut down by aborting the job on MPE/XL or killing
the process on HP-UX. Once the listener is down, no further connection
requests will be accepted. However, any remote database access already
in progress will not be affected by the listener shutdown and will be
allowed to terminate normally.
The listener records all network and ALLBASE/NET errors in a log file
which can be checked in case of problems with remote database access.
NETUsers File
The NETUsers file resides on the server machine and is created
automatically by the maintenance utility, NETUtil, when the first entry
is added to the file. The main purpose of this file is security. The
file contains an entry for each user that is permitted access to a
DBEnvironment on the server node. An entry in the NETUsers file consists
of the client node name, the login name of the user trying to gain
access, and the login name to be used on the server node when accessing
the DBEnvironment. The client node name and the client login name
together uniquely identifies a remote user. Access to this file is
controlled by the NETUtil utility and is covered below.
The first message that the listener daemon receives will contain the
client node name and the user's login name on the client node. The
listener will use this information to locate the corresponding entry in
the NETUsers file and map these to a login name to be used on the server
node when spawning the database process. If a matching entry is not
found in the NETUsers file, an error message is returned.
Transparency
Achieving complete location transparency is one of the main goals of the
ALLBASE/NET product. Location transparency means that an application
does not have to knowwhich machine the database is on. In fact, location
transparency means that a database can be moved from machine to machine
without causing any changes to the applications that access that
database. With ALLBASE/NET, the only modification necessary to move a
database to a different machine is a change to the AliasDB file entry for
that database. The AliasDB file is discussed below.
In ALLBASE/NET, location transparency is achieved through an aliasing
mechanism. An alias is an alternate name used in place of the actual
DBEnvironment name in a START DBE or CONNECT statement. Therefore, the
information associated with an alias name can be changed (i.e., the
actual location of the DBEnvironment) without requiring any changes to
existing code.
ALLBASE/NET handles connections in the following way:
A connection to a LOCAL database with the given name is attempted. If
the local attempt fails, a REMOTE connection is attempted:
* the alias name is looked up in the AliasDB file
* if a matching entry is found, the entry is used to determine which
server node to communicate with and which datacomm protocol to use
* if a matching entry is not found, an appropriate error message is
returned
AliasDB File
The AliasDB file resides on the client node. It contains an entry for
each aliased DBEnvironment which can be accessed remotely from that node.
An entry consists of the alias name, the nodename of the server, the real
name/location of the DBEnvironment on the server node, the type of
machine the server is running on, and the type of data communication
protocol being used. This information is needed to set up the
communication line between the client and server machines and to make the
connection to the remote database.
Another flexibility that the AliasDB file provides is the ability to have
multiple alias names for the same DBEnvironment. This would be helpful
for developing a new application. While developing, a smaller database
could be used to test the application. When the application was
completely tested, a new alias for the real database could be added to
the AliasDB file, thus allowing access to the real database rather than
the test database.
Maintaining the AliasDB and NETUsers Files
NETUtil is a command driven utility that resides on both the client and
server nodes. It is used by the system manager or root user to create
and maintain the AliasDB and NETUsers files. Entries can be added,
deleted, modified, and displayed with NETUtil. Access to these files is
restricted for security reasons.
MPE/iX Communicators