Building Distributed
Applications
Using the Progress AppServer


The Connection-based Model

Communication between a client application and an AppServer is connection-based. That is, before a client can send a remote procedure request to an AppServer, it must establish a connection to that AppServer. The client can then send the remote procedure request in the context of that connection and can continue to send remote procedure requests using the same connection until the client disconnects from the AppServer.

Connection Components

A client application connects to an AppServer with the help of a NameServer, as shown in Figure 2–3. The dotted arrows indicate communications required to establish a connection between a client application and the AppServer instances.

Figure 2–3: Connection-based Model

The NameServer maintains a list of the available AppServers in the network. When the client application wants to connect to an AppServer, it requests an available AppServer from the NameServer and establishes the connection with the AppServer supplied. For more information on NameServers and how they coordinate AppServer connections for client applications, see the "Run-time Components and Operation" section. For more information on how AppServers maintain connections for client applications, see the "Connection Process" section.

The Connection ID

When an AppServer accepts a connection request from a client, the Application Broker assigns a connection identifier (ID) that uniquely identifies the connection between a client and an AppServer.

The Application Broker and all Application Server processes use the connection ID as an identifier when they log any information associated with the connection. Progress also makes this connection ID available to both the client application and the AppServer application. Both the client application and AppServer session can use this connection ID, which can be used to maintain any connection-related information, such as an application log.

This connection ID has the following format:

SYNTAX
appserver-host::appserver-name::global-unique-id 

appserver-host

The host name of the machine where the connected AppServer is running.

appserver-name

The name of the connected AppServer configuration. For more information on how you can specify this name, see Administration."

global-unique-id

A value guaranteed to be globally unique for all time. This value can never be generated by some other connection at the same or a different AppServer within a single computer network.

In general, you can compare connection IDs strictly for equality, but other types of comparisons are irrelevant.

Connecting an AppServer Instance

4GL clients use the CONNECT( ) method on a server object handle to establish an AppServer connection. Java and ActiveX Controller clients use similar methods to connect an AppServer. For more information on connecting from the 4GL, see Programming the Client Application." For information on connecting from a Java or ActiveX Controller application, see the Progress Open Client Developer’s Guide.

Disconnecting an AppServer Instance

A client application can disconnect an AppServer at any time. A 4GL client disconnects by using the DISCONNECT( ) method on the server object handle to the AppServer. A Java or ActiveX Controller client uses a similar method to disconnect the AppServer.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095