DBMS
 

 


Concepts and Terminology

By Marcia Gulesian and Philip Gulesian
DBMS, July 1997

Using PowerBuilder 5.0 and later versions means that you have a single tool that you can use to develop all the components in a distributed system.

PowerBuilder 5.x alone can provide transparent communication between distributed objects written in PowerBuilder. That is, with it you can invoke a method on an object irrespective of whether that object is located in the same process, in another process on the same machine, or on another machine across the network.

DPB introduces some new concepts and terminology and new PowerScript language constructs to support DPB. They include:

PowerBuilder Server Application -- In releases prior to 5.0, PowerBuilder applications were usually the "client" portion of a client/server database application. PowerBuilder 5.0 introduces the concept of a PowerBuilder server application, which is an application containing nonvisual user objects (NVOs) intended to be invoked by one or more client applications. NVOs used in this way are called remote objects. These remote objects can be invoked across process boundaries (separate executables on the same computer) or across computer boundaries (networked computers). The DPB server application contains a new PowerScript object called a Transport, enabling it to listen for and process client requests for its remote objects. The server application can also be used as a "normal" PowerBuilder application acting as the client portion of a typical PowerBuilder client/server application and/or a remote client to another PowerBuilder (PB) server application.

PowerBuilder Client Application -- In the context of DPB, a PowerBuilder client application invokes remote objects and services. The DPB client application contains a new PowerScript object called a Connection to connect to a PB server application. Once connected to a PB server, the client application can invoke remote object methods as if they were local NVO methods. The client application can function entirely as a client, or it can function as a PB server to another PB remote client.

PowerBuilder Remote Objects -- Very similar to other NVOs, a remote object contains business logic written as PowerScript methods. As a special case of a NVO, remote objects may reference any nonvisual PB programmatic function and issue database commands. They can also use a nonvisual form of a DataWindow called a DataStore to encapsulate database access. Remote object methods behave like procedure calls and support parameter passing and functional results for all PowerBuilder datatypes (with the exception of visual object datatypes).

PowerBuilder Transport Object -- This is a server-side object receiver for client requests based on a particular communications connection type. Once instantiated using a PowerScript create transport, the transport object method Listen is executed to accept client requests based on the communication method attributes set in the transport object. These attributes include items such as communications driver name and communications protocol type, and connection timeout threshold. Getting and setting of attribute values is accomplished identically to other PB objects such as the transaction object SQLCA.

PowerBuilder Connection Object -- This is a client-side object sender for client requests based on a particular communications connection type. Once instantiated using a PowerScript create connection, the connection object method ConnectToServer is executed to connect the client to the server application based on the communication method attributes set in the connection object. These attributes include items such as communications driver name, server computer name, client name, and communications protocol type.

DPB Object Save Proxy -- A new option when saving a user-object, Save Proxy saves a remote-alias name for the object and generates additional internal object-proxy code enabling the user object to be remote. The user object enabled for remote execution is used in conjunction with the connection object to affect either local or remote execution. A user object SetConnect() instantiates the object based on the attributes set in the connection object. These attributes determine whether or not the connection is local or remote as well as specifically establishing the location of subsequent object references.

DPB supports several communication drivers: WinSock, NamedPipes, OpenClientServer, and Local. At present, however, only Windows NT supports all of them on both the server and client.

Multiple clients can connect to the same server application, which allocates memory space for each connected client. It also creates a thread for each connected client application to process requests. In this situation, the server application maintains a "pool" of client connections and reuses resources when it accepts new ones.

As part of its QuickStart Multimedia series, Powersoft had a two-CD set on DPB. It's a painless way to acquire a working knowledge of the material covered in this section.


Before turning their attention to the development of database applications that run on diverse networks, Marcia served as plant operations manager and Phil as president of a manufacturing company with nationwide distribution and sales. You can email Marcia at mg@world.std.com and Phil at pjg@world. std.com.
Return to "Uniting Object-Oriented and Distributed Systems by Marcia Gulesian and Philip Gulesian.

What did you think of this article? Send a letter to the editor.


Subscribe to DBMS and Internet Systems -- It's free for qualified readers in the United States
July 1997 Table of Contents | Other Contents | Article Index | Search | Site Index | Home

DBMS and Internet Systems (http://www.dbmsmag.com)
Copyright © 1997 Miller Freeman, Inc. ALL RIGHTS RESERVED
Redistribution without permission is prohibited.
Please send questions or comments to dbms@mfi.com
Updated Wednesday, June 18, 1997