Explains the available OLE DB remoting solutions and how they can help developers write scalable distributed solutions. (19 printed pages) Covers: Application scenarios where remoting is needed. RDS implementation details and components. Scenarios where RDS can be used, including example RDS code. OLE DB remoting features currently being considered by the Data Access Group. Complete object model for RDS components.
OLE DB remoting enables applications, written to consume data from OLE DB providers, to work with remote OLE DB providers. To preserve security and robustness, it may not be preferable to run applications in the same process as the OLE DB providers they are accessing. And it is neither possible nor feasible to install OLE DB providers on all client machines, especially in today's world of distributed applications and Internet commerce. Three-tier distributed computing also requires most application logic to stay at the middle tier while the client components handle just the local validation and presentation of the data. Remote Data Service is a component that ships with the Microsoft Data Access Components (MDAC) version 2.0. RDS enables applications to access OLE DB providers, running on remote machines or in separate processes on the same machine. RDS enables a new generation of distributed applications: Components hosted in the Internet Explorer (3.0 or later) environment can get access to live data, which comes to the client from Web servers. It brings the power of the Microsoft ActiveX® Data Objects (ADO) object model to HTML pages by using Microsoft Visual Basic®, Scripting Edition (VBScript) or Microsoft JScript™. Problem Space Applications hosted on Internet browsers typically use scripting routines or Java applets to interact with user actions or with data embedded inside the HTML page. With Visual Basic 5.0 or later, client applications can be built to run inside the browser and to access data sources on the server directly, rather than going through scripting. Examples of such applications are ActiveX Controls and active documents. A typical scenario for dynamically generated Web pages looks like this: The user enters the address for the page/site from which the user wants to access data. The user request is translated into a Hypertext Transfer Protocol (HTTP) request by the browser and sent to the Web server. The address typically points to a Common Gateway Interface (CGI)-style application on the server or to an Active Server Page (ASP). An ASP is a specific form of Internet Server API (ISAPI) application available to the servers hosting Microsoft Internet Information Server (IIS). The server application makes a connection to the data store and creates a resultset that matches some parameters included in the initial request from the user. The resultset is converted into an HTML table that is embedded in the HTML page to be sent to the user. The user receives an HTML page that contains dynamically generated data. The page may also contain some HTML input controls that can receive some data from the user. The user submits the newly entered data by using the Submit button on the page. This approach works very well when all programming logic must stay on the server. The HTML page sent to the user contains script code to control user actions and to perform local validations. This approach is used in most Internet applications where users cannot be trusted with live data and where there is no control on the browser version or brand the user runs. In intranets, the environment is much better defined. Because most enterprises standardize on software components such as browsers, it is becoming common to write applications that make use of specific features of software components available on client machines. Therefore, in shops where Internet Explorer is in use, HTML pages make extensive use of ActiveX Controls. RDS provides a much better client experience for such shops and also allows a new breed of distributed applications to be created by its special implementation of OLE DB rowset marshaling. With RDS, the HTML page at the client receives a disconnected ADO recordset that can be manipulated by the script code. RDS also enables client script to invoke methods on middle-tier Automation components in an efficient manner. This is especially important when the clients connect to servers by using HTTP.
Author(s): Kamaljit Bath
Related items:
The Pitfalls Of IIS Security
(Ulrich Schwanitz )
AVI Files with Hot Spots
(David A. Feinleib)