DB connection differences (C/S app vs. installable cloud app)

Long-running connections vs. short-lived connections

The PowerBuilder traditional client/server application uses long-running connections: a client connects with the database when CONNECT statement is executed, and the database connection is kept open and used by that client until the DISCONNECT statement is executed. This means, for a particular client, the database connection is always the same one.

In PowerBuilder installable cloud apps, the database connections are short-lived, because the database connection is made from PowerServer (not from the client), and the database connection is cached in the pool when idle and used by any client when necessary. This means, for a particular client, the database connection may not be always the same one, it may use any database connections cached in the pool (for example, first connection A, then connection B, etc.), and for a particular database connection in the pool, it may be used by different clients (for example, first client X, then client Y, etc.).

This connection difference may cause features such as temp tables to fail to work in the installable cloud app. In this case, you can use the LongConnection database parameter to enable the installable cloud app to support the long-running connection. For more information, refer to later section Enabling long connections.

Transaction object vs. transaction object + cache

The PowerBuilder traditional client/server application uses the transaction object to connect with the database server. The transaction object stores and passes the database connection information. It is a direct connection made from the client to the database (client-to-server connections).

The PowerBuilder installable cloud app provides a more secure way, in which the database connection is made from PowerServer to the database (server-to-server connections). The database connection information is stored in a cache in PowerServer. The transaction object is used only to find the cache; it no longer passes the connection information from the client to the server. Therefore, for installable cloud app to work, you will need to configure a cache and then map the transaction object to the cache. Refer to later sections for how.