Moving to Client/Server

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Installing and Using Apollo VCL >

Moving to Client/Server

Apollo VCL applications can work in local mode (i.e. standalone), peer-to-peer (i.e. sharing files on a network or file server) or in true client/server mode (i.e. connecting to the Apollo Database Server).

 

The source code required for each mode is the same. The only difference between moving supporting these different environments with Apollo VCL is with the AccessMethod property of TApolloTable and TApolloQuery. (See below)

 

To move to client/server, you will reuqire the Apollo Database Server. A free 2-User edition of this server may be downloaded from the ApolloDB web site (www.apollodb.com). This 2-User edition is full featured with the only limit being it supports only 2 concurrent connections.

 

Apollo Database Server requires a server PC with a addressable IP address or domain name running on Windows 11, Windows 10, Windows 7, Windows Vista, Windows NT 4.x or Windows 2000. Windows 95 and Windows 98 are not recommended platforms for the Apollo Database Server application (due to NT Service and performance requirements).

 

The Apollo Database Server application (ApolloServer.exe), Apollo Server Manager (ADSManager.exe), and ..\Engine\Apollo*.DLL files should be installed on this machine. The server applications and their associated database files can be located in any directory, while the .DLLs should be located in the ..\WinNT\System32 or ..\Windows\System32 directory.

 

The updated TApolloTable component includes two new properties (AccessMethod and ApolloConnection) that make it quick and easy to switch your application from accessing tables locally to connecting remotely through the Apollo Database Server. However, the easiest solution is not usually the best, especially in this case.

 

The TApolloTable component generally sends one instruction at a time to the server and gets one response at a time back from the server. The FetchCount property of TApolloTable does allow it to fetch multiple records from the server at a time, that does give it a good speed boost. On the other hand, the TApolloQuery component uses SQL to give the server multiple instructions at once, retrieving batches of records back at once. The result of using TApolloQuery over TApolloTable for most server-side operations is much faster performance. There may be exceptions to this rule.

 

Certain operations, such as grabbing all fields (Select *) from a table using a simple expression that has an available index, may very well be faster to come back with the initial result set using TApolloTable.Query than TApolloQuery.SQL.

 

The TApolloServerDLL component allows the client application to access server-side DLLs tell the server to execute pre-defined procedures consisting of many different instructions, optionally returning values to the client. Effective use of Server DLLs can dramatically improve the performance of your application, since there is minimal network traffic involved.

 

See Also

Steps to Client/Server