Data remoting is fundamental to developing distributed database applications. The .NET remoting technology provides a flexible and extensible framework for interprocess communication. With .NET remoting you can interact with objects in different application domains, in different processes running on the same machine, or in different machines on a network.
Using the RemoteServer and RemoteConnection components, you can easily migrate a client/server application that uses DataHub and DataSync components to a multi-tier DataSet remoting application. RemoteServer implements IDataService and publishes itself as a singleton server activated object (SAO). On the client side, the RemoteConnection properties form the URL for connecting to the RemoteServer. Channel specifies the protocol to use (TCP/IP or HTTP), Port specifies the port on which the RemoteServer is listening for requests, and URI refers to the unique resource identifier for the RemoteServer.
Building a distributed application with data remoting components consists of the following steps:
Property |
Description |
Providers |
Specifies a collection of DataProviders to use as data sources. Click the ellipsis button to open the DataProvider Collection Editor, and add a DataProvider for each table you want to provide and resolve. |
CommitBehavior |
Specifies the logic (Atomic, Individual, or ForceIndividual) for handling failures during resolving. |
Property |
Description |
DataSync |
Specifies the DataSync that needs remoting. Select the DataSync from the drop-down list in the Object Inspector. |
AutoStart |
Specifies whether or not to start the remote server automatically when the application runs. Set this property to True. |
ChannelType |
Specifies the channel type: Http (HTTP) or Tcp (TCP/IP). Select the channel type from the drop-down list in the Object Inspector. |
Port |
Specifies the port the remote server will be listening on. Enter a new value, or accept the default port value, 8000. |
URI |
Specifies the universal resource identifier for the remote server. By default, the URI property is the same as the Name property. |
Property |
Description |
ProviderType |
Specifies the type of provider published by the remote server. In this case, the property should be set to Borland.Data.Provider.DataSync. If the remote server is running, you can select this value from the drop-down list. Otherwise, you must enter the value. |
ChannelType |
Specifies the channel type: Http (HTTP) or Tcp (TCP/IP). Select the channel type from the drop-down list in the Object Inspector. This should match the setting for the remote server. |
Host |
The name or IP address of the remote server. |
Port |
Specifies the port the remote server will be listening on. Enter a new value, or accept the default port value, 8000. This should match the setting for the remote server. |
URI |
Specifies the universal resource identifier for the remote server. This should match the URI property for the RemoteServer component in the remote server application. |
Property |
Description |
DataPort |
Specifies the data source. Set the DataPort property to the added RemoteConnection component (for example, RemoteConnection1). |
DataSet |
Specifies the DataSet to hold the data retrieved from the specified data source. Set this property to the added DataSet (for example, dataSet1). |
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|