This chapter provides an overview of ALDSP for client application developers. It includes the following topics:
BEA AquaLogic Data Services Platform (ALDSP) brings data access into the world of service-oriented architecture (SOA). ALDSP enables organizations to consolidate, integrate, transform, and service-enable disparate data sources scattered throughout their enterprise, making enterprise data available as an easy-to-access, reusable commodity: a data service.
From the perspective of a client application, a data service typically represents a distinct business entity, such as a customer or order. Behind the scenes, the data service may aggregate the data that comprises a single view of the data, for example, assembling it from multiple sources and transforming it in a number of ways. A data service may be related to other data services, and it is easy to follow these relationships in ALDSP. Data services insulate the client application from the details of the composition of each business entity. The client application only has to know the public interface of the data service.
With ALDSP, client applications can use heterogeneous data through a unified service layer without having to contend with the complexity of working with distributed data sources using various connection mechanisms and data formats. For client developers, ALDSP provides a uniform, consolidated interface for accessing and updating heterogeneous back-end data. It enables a services-oriented approach to information access using data services.
This document describes how to create ALDSP-aware client applications. It explains the various client access mechanisms that ALDSP supports and its main client-side data programming model, including Service Data Objects (SDO). It also describes how to create update-capable data services using the ALDSP update framework.
From a high-level perspective, a data service defines a distinct business entity such as a customer and the customer’s orders. The data service defines a unified view of the business entity by aggregating data from any number of sources — relational database management systems (RDBMS), Web services, enterprise applications, flat files, and XML files, for example. Data services can also transform data from the original sources as needed.
In order to use data services as a client, you need know only a few details, such as:
Data service client applications can use data services in the same way that a web service client application invokes the operations of a Web service.
For detailed information on developing data services, see the Data Services Developer’s Guide.
An ALDSP client application is any application that invokes data service routines. Client applications can include Java programs, non-Java programs such as Microsoft ADO.NET applications, BEA WebLogic Workshop applications, JDBC/ODBC, or web-service based applications in any programming language.
Figure 1-1 provides an overview of these multiple access methods.
Regardless of the client type, ALDSP provides a uniform, service-oriented mechanism for accessing and modifying distributed, heterogeneous data. Developers can focus on business logic rather than on the details of various data source connections and formats.
In your client application code, a client simply invokes the data service routine; in turn, ALDSP:
The ALDSP data objects conform to the Service Data Object (SDO 2.1) specification, a Java-based API for data programming that is the result of joint effort by BEA, IBM, Oracle, SAP, and others.
Application developers can choose from among several client API models for accessing ALDSP services. The model chosen will depend on the desired access mechanism. Each access method has its own advantages and uses. Table 1-2 provides a description of each of these access methods and summarizes the advantages of the various programming models for accessing ALDSP data services.
Service Data Objects (SDO), a specification proposed jointly by BEA, IBM, Oracle, SAP, and others, is a Java-based API for data programming. SDO simplifies data programming against data sources of different types. It simplifies data access, giving data consumers a consistent, uniform approach to using data whether it comes from a database, web service, application, or any other system.
SDO uses the concept of disconnected data. Under this architecture, a client gets a copy of externally persisted data in an SDO data object or data graph, which is a structure for holding data. The client operates on the data remotely; that is, while disconnected from the data source.
If the client makes data changes that need to be saved to the data source, a connection to the source is re-acquired later. Keeping connections active for the minimum time possible maximizes scalability and performance of web and service-oriented applications.
To SDO clients, the data has a uniform appearance no matter where it originated or what its underlying source format is. Enabling this unified view of data in the SDO model is the concept of a data mediator. The mediator is the intermediary between data clients and back-end systems. It allows clients to access data services and invoke their functions to acquire data or submit data changes. ALDSP implements such an SDO mediator.
For details on SDO, see Data Programming Model and Update Framework.
The SDO specification allows for many types of mediators, each intended for a particular type of query language or back-end system. ALDSP provides a Data Service Mediator API, a server-side component of the ALDSP XQuery processing engine that serves as the intermediary between data services and client applications or processes.
The Data Service Mediator facilitates access and updates to the various data sources that comprise any data service. The Mediator is also the core mechanism for the data service update framework. For details on using the Mediator API for web services clients and for Java clients, see:
Developing an ALDSP-enabled client applications encompasses these steps:
For example, if the data service has been mapped out as a web service, you can develop a Web service client application using Java in conjunction with the service’s WSDL file.
Similarly, if the data service is incorporated in a portal, business process, or Web application, your client application development process may take place entirely in the context of the server, as a set of pageflows or other server-side artifacts, using a control.
ALDSP administrators can control access to deployed ALDSP resources through role-based security policies. ALDSP leverages and extends the security features of the underlying WebLogic platform. Roles can be set up in the WebLogic Administration Console. (See the ALDSP Administration Guide for detailed information about the DSP Console.)
Access policies for resources can be defined at any level — on all data services in a deployment, individual data services, individual data service functions, or even on individual elements returned by the functions of a data service.
For information on ALDSP security, see “Securing AquaLogic Data Services Platform Resources,” in the ALDSP Administration Guide. For complete information on WebLogic security, see Programming WebLogic Security on e-docs.
Data service performance is the result of the end-to-end components that make up the entire system, including:
Before creating a client application for a data service, it is recommended that you be aware of the performance of each underlying data source and benchmark the performance of the data services as you develop them. Use load-testing tools to determine the maximum number of clients that your deployed data services can support.
You can use ALDSP’s auditing capabilities to obtain performance profile information that you can use to identify and resolve performance problems if they occur. For detailed information on ALDSP audit capabilities see ALDSP Administration Guide.
The following tables provide classpath requirements for:
Client applications using the ALDSP Mediator API need one of the following classpath settings:
CLASSPATH=
<app-static-client>.jar <= this is generated static client jar
<ALDSP_HOME>/lib/sdo.jar
<ALDSP_HOME>/lib/ld-client.jar
<WL_HOME>/common/lib/apache_xbean.jar
<WL_HOME>/server/lib/weblogic.jar
CLASSPATH=
<ALDSP_HOME>/lib/sdo.jar
<ALDSP_HOME>/lib/ld-client.jar
<WL_HOME>/common/lib/apache_xbean.jar
<WL_HOME>/server/lib/weblogic.jar
Client applications using the ALDSP Native Web Services feature need one of the following classpath settings:
CLASSPATH=
<app-static-client>.jar <= this is generated static client jar
<ALDSP_HOME>/lib/sdo.jar
<WL_HOME>/common/lib/apache_xbean.jar
<WL_HOME>/server/lib/weblogic.jar
CLASSPATH=
<ALDSP_HOME>/lib/sdo.jar
<ALDSP_HOME>/lib/ld-client.jar
<WL_HOME>/common/lib/apache_xbean.jar
<WL_HOME>/server/lib/weblogic.jar
The JMX Mbean Management API needs the following classpath settings:
CLASSPATH=
<ALDSP_HOME>/lib/ld-server-core.jar
<ALDSP_HOME>/lib/ld-client.jar
<WL_HOME>/common/lib/apache_xbean.jar
<WL_HOME>/server/lib/weblogic.jar
The ALDSP JDBC API client needs the following classpath settings:
CLASSPATH=
<ALDSP_HOME>/lib/ldjbc.jar
<ALDSP_HOME>/lib/ld-client.jar
<WL_HOME>/server/lib/weblogic.jar
ALDSP 2.5 provided an interoperability JAR file (wls90interop.jar) that allowed WebLogic Server 9.2 clients to access ALDSP 2.x data services. After upgrading to ALDSP 3.0, you need to remove all uses of wls90interop.jar from both the WLS 9.2 based client CLASSPATH and the ALDSP 2.5 client CLASSPATH.