Building a distributed application
Setting up the DPB Server

Generating the Server Application Executable

Preparation for deploying the server application to a production environment starts with building the executable. This process is not different from building an executable for any normal PowerBuilder application.

Open the pbserver application in PowerBuilder. Click on the 'Project' toolbar button tbproject.gif (921 bytes) and select 'New' to create a new PowerBuilder project. The following window will be presented to choose the type of objects that you want to generate -

pbprojecttypes.gif (5374 bytes)

Choose 'Application' as the type of target and click OK. The Project painter will open with an untitled project. Configure the executable generation in the following manner -

  • Specify the Executable file name as 'pbsever.exe'
  • You need to specify a .PBR file if any of the PBLs hosted in the server use bitmaps or icons.
  • Check 'Machine Code' if you would like to generate compiled code, else leave it unchecked to generate p-code.
  • Do not check any PBLs so that they are include in pbserver.exe. You can choose to compile each PBL into a .PBD or a .DLL in case of larger applications.

Click on the 'Build' toolbar button tbbuild.gif (921 bytes) to generate the executable.

Note

If you are using a server like PowerObject's DPB Server, then you just need to compile the remoteobjects.pbl into a .DLL and host it on the server. Check PowerObject's web site for information on how to deploy the DPB server and host objects on it.

 

Choosing the Deployment DLLs

Now that we have generated the EXE, we need to figure out which additional PowerBuilder DLLs will be required to run the server application. With 6.0, Powersoft has really simplified the deployment process by reducing the total number of DLLs required for deployment. The online book - Application Techniques, has a whole section devoted to this issue. This documentation is also available online at http://sybooks.sybase.com.

Based on Chapter 33 of Application Techniques, I was able to figure out that we need to deploy the following DLLs along with server application on a 32 bit Windows machine-

  1. PBVM60.DLL (PowerBuilder Virtual Machine)
  2. PBDWE60.DLL (Datawindow engine for Datawindows/Datastores)
  3. PBODB60.DLL (For using ODBC drivers)

These DLLs can be found in the Deployment Kit, which can be installed from the PowerBuilder installation.

 

Setup

To setup the Server application on a server machine do the following -

  1. Copy pbserver.exe and the above mentioned DLL to a directory on the server machine.
  2. Make sure that the database middleware is installed and configured correctly on the server. This is SQL*NET for Oracle, Open Client for Sybase and DB-LIB for MS SQL Server. For SQL Anywhere it's the ODBC driver.
  3. Edit the 'services' file on the server machine and provide a port for the server to listen to just like you did when you were developing and testing the server application on your standalone developer machine.
  4. Start the database
  5. Start the DPB server by running pbserver.exe

 

Tips

  • It's a good idea to run the DPB server and the database on different machines. This gives you greater flexibility when scaling the system for higher load on the middle tier.
  • There are cases when it is desirable to run the DPB Server on the same machine as the database in order to minimize network traffic. For example when running database intensive batch processes and reports. In such a situation, you can build another, independent server for hosting batch processes and reports. The main DPB sever would then connect to this server as a client.
  • I suggest using Windows NT as the OS on the server machine rather than Windows 95, because NT is known to be more stable than Windows 95.
  • On a Windows NT machine you can run your server as a Window NT service.
  • DPB has been known to have problems on multi-processor Windows NT servers. Hopefully Sybase will fix this up soon in a patch to 6.5 or a subsequent version.
  • If you intend to install the server application on multiple sites, or if you are developing a marketable product, you should create a professional looking installation program for the server application using a tool like InstallShield.

 



Introduction

Strategy
Building the monolith
Building the DPB Server
Building the PB Client

Setting up the DPB Server
Deploying the PB Client

Points to Ponder
Where to go from here

 download.gif (351 bytes)Download the application

What's Next?

 

Related Links

Follow Me FAQ: PowerBuilder VM Deployed Server Deployment Licensing

Follow Me DPB Server from PowerObjects

Follow Me Running the DPB server as a NT service

Previous  Next Home
1