DP4 Thin Client (Terminal Server)

Introduction

Typical DP4 componentsFor many years DP4 has had an extremely well modularised and portable structure which lends itself to distributed processing. Until recently this has primarily been used to create applications with a typical client/server architecture with a database distributed between one or more servers, and perhaps also held locally on each client to provide resilience. The typical DP4 components are shown in the diagram on the left.

With the decreased cost and increasing power of PC based servers, as well as the increasing complexity and cost of deployment of PC based software a new type of solution has become popular - "Thin Client", or "Ultra Thin". In this architecture the absolute minimum of software is deployed on client PCs and applications run primarily on the server with the client computer acting more or less solely as a terminal (possibly a very sophisticated one).

In fact this largely represents a return to the typical model of computer systems before the invention of the PC. Thin Client solutions should offer cost savings through reduced cost of deployment and administration, and savings on hardware costs through reuse of legacy hardware for clients and reduced cost of new hardware.

From version 4.523/4.619 DP4 can run in this type of configuration. Existing applications are able to run with little or no modification using the new DP4 Terminal Server.

Existing Thin Client Technologies Compared with DP4 Terminal Server

The original thin client software was probably Telnet - this allowed any computer to act as a dumb terminal to any other computer running as a Telnet server to which it could connect. Telnet is still a very useful program - its primary disadvantage is that it can only run text based programs. Later on the Unix X Windows system allowed GUI based programs to run in a similar fashion, though this does not seem to have become very commonly used as yet (at least in the commercial environment).

In recent years two more types of technology have emerged:

DP4 systems can already be deployed using most, if not all, of these technologies. However the DP4 Terminal Server architecture has unique advantages over all of them. Before going into this in more detail a few terms will be defined:

Here then are the advantages of the DP4 Terminal Server Architecture:

Architecture

To understand the DP4 Terminal Server Architecture it is only really necessary to understand the basics of the regular DP4 architecture.

A pure DP4 application program never interacts with any devices on the computer directly. All such interaction is done via one of two interfaces - the DP4 database interface, and the DP4 terminal interface. The DP4 database interface implements the calls necessary to access and update a DP4 database. The DP4 terminal interface implements a set of APIs which is sufficient for all typical application needs - it contains calls to display screens, collect data from the user, access and create non database files, and print to regular or special printers or files. Specialised hardware is via the terminal interface accessed using abstract devices.

The word interface was used advisedly above. It is common to speak of a program "calling" the database manager, but this is not strictly accurate, it is an interface that is called, and the components that implement that interface can be extremely varied - anything from a standalone DP4 database residing locally through to a mixture of DP4 and non DP4 databases residing on different servers running different operating systems on different and incompatible processor architectures and accessed through differing network protocols. The application need not care about the implementation of the DP4 database at all.

Internally this is achieved by defining a simple protocol which is common to all calls to the database interface. This protocol is completely independent of the operating system and hardware used by the program. All calls to the DP4 database interface work by constructing a simple parameter block which describes the function to be called and the data to be passed in and out of the function. In the simplest case calling the interface will send some kind of message directly to the DP4 database manager. In a more complicated set up the same message may be picked up and passed through one or more ADC components and then passed into one of the DP4 network requesters. This then communicates with a DP4 network manager (receiver) running on another server and transfers to it the parameter and data associated with the call. The call can then be handed on to the DP4 database interface on that server. From the point of view of whatever is implementing the DP4 interface on the server computer the call is more or less identical to one made by a DP4 application running locally - so the same process may be repeated to pass the call through several more layers. Eventually (usually almost instantaneously) the destination will be reached, the call will be processed and the answer will be returned to the calling application, which will have no idea where or what actually did the processing. The DP4 networking components function much like software equivalents of electrical extension cables and adapters that convert British to Continental plugs or vice versa. (A slightly better analogy might be with surge protector type adapters or UPS as the DP4 networking software also contains logic to deal with network problems of various types)

Diagram of DP4 Terminal Server architecture The DP4 terminal interface is logically identical to the DP4 database interface. In exactly the same way a parameter block is constructed to describe the function to be called and its input and output data. Indeed the format of the parameter block is compatible, and in principle exactly the same network components can be used to transfer a call from one machine to another. (The same interface is now also used for calling the DP4 SQL Engine and will be used for any future interface components). The implementation of the DP4 terminal server, shown in the diagram on the right, is almost as simple as replacing the regular DP4 terminal manager component with the existing network requester and making the existing DP4 network receiver accept and pass on Terminal Interface calls as well as Database Interface calls.

In fact things are not quite as simple as this as there do need to be some additional "components" and there are some minor changes required to the regular DP4 network architecture. For example the client machine has to have some program running that is capable of starting an application on a remote server, and at the same time creating an instance of the "terminal receiver" that will execute its client side code. Whereas the regular DP4 network requester is completely single threaded a separate "terminal requester" is created for each application (since otherwise all the applications on the server could be blocked if a remote user went to lunch with a DP4 program sitting in a data entry screen). The regular DP4 Network Receiver is used as the program which processes requests from clients to launch applications. Each application is supplied with an environment variable that tells its terminal requester which client machine to connect to.

The diagram shows the networking components as using TCP/IP protocol. In principle there is no reason why other protocols could not be supported.

Implementation

The Terminal Requester is built into the regular DP4 Terminal Manager. An application will automatically select whether to use the regular terminal manager code, or the requester version. Thus there is no problem with running DP4 applications locally on the application host.

No additional components are required on the application host. On the client side you can choose either to install a simple client configuration (which comfortably fits on a single diskette) without installing any other DP4 components, or you can install the client as an additional package. This might be convenient where you want to deploy some, but not all of an application locally. You can run almost any mix of local,client-server, and DP4 terminal server applications all at once, connecting to as many servers as you want!

The two special components for the client side are :

In addition to this a skeleton DP4 installation is required - the install program for the client will do this automatically. For example on Linux the files tcp3,trm3 and userdata.sys are required. On Windows a few additional DLLs are also required and the DP4 service program srvw32.exe . The OSDI must be installed on the clients if required.