RAD Studio
ContentsIndex
PreviousUpNext
The Structure of the Application Server

When you set up and run an application server, it does not establish any connection with client applications. Rather, client applications initiate and maintain the connection. The client application uses a connection component to connect to the application server, and uses the interface of the application server to communicate with a selected provider. All of this happens automatically, without your having to write code to manage incoming requests or supply interfaces. 

The basis of an application server is a remote data module, which is a specialized data module that supports the IAppServer interface (for application servers that also function as a Web Service, the remote data module supports the IAppServerSOAP interface as well, and uses it in preference to IAppServer.) Client applications use the remote data module's interface to communicate with providers on the application server. When the remote data module uses IAppServerSOAP, the connection component adapts this to an IAppServer interface that client datasets can use. 

There are three types of remote data modules:

  • TRemoteDataModule: This is a dual-interface Automation server. Use this type of remote data module if clients use DCOM, HTTP, sockets, or OLE to connect to the application server, unless you want to install the application server with COM+.
  • TMTSDataModule: This is a dual-interface Automation server. Use this type of remote data module if you are creating the application server as an Active Library (.DLL) that is installed with COM+ (or MTS). You can use MTS remote data modules with DCOM, HTTP, sockets, or OLE. See Using transactional data modules for information about the benefits and limitations of using MTS or COM+ with the application server.
  • TSoapDataModule: This is a data module that implements an IAppServerSOAP interface in a Web Service application. Use this type of remote data module to provide data to clients that access data as a Web Service.
Note: If the application server is to be deployed under COM+ (or MTS), the remote data module includes events for when the application server is activated or deactivated. This allows it to acquire database connections when activated and release them when deactivated.

As with any data module, you can include any nonvisual component in the remote data module. There are certain components, however, that you must include: 

It must include a dataset component to represent the records from that database server if the remote data module is exposing information from a database server. Other components, such as a database connection component of some type, may be required to allow the dataset to interact with a database server. 

For every dataset that the remote data module exposes to clients, it must include a dataset provider. A dataset provider packages data into data packets that are sent to client datasets and applies updates received from client datasets back to a source dataset or a database server. 

It must include an XML provider for every XML document that the remote data module exposes to clients. An XML provider acts like a dataset provider, except that it fetches data from and applies updates to an XML document rather than a database server.

Note: Do not confuse database connection components, which connect datasets to a database server, with the connection components used by client applications in a multi-tiered application. The connection components in multi-tiered applications can be found on the DataSnap category or WebServices category of the Tool palette
.

Overview of AMIDAS Based MultiTiered Applications 

The Structure of the Client Application 

Creating the Application Server

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!