S U N D A R R A J A N

Google Search Engine

Sunday, November 22, 2009

Introduction to ALDSP and XQuery – Part 2


Before getting in detailed about logical and physical data service, let us understand what is data service and why we need it?

Data Service: its acts as a separate layer for accessing data. It’s a query based layer that facilitates the ability of calling applications to access and manage data. Why we need data service?

Data is everywhere now; we are developing application to maintain the data. That was the reason for the evolution of data base management system. In earlier days, we use to maintain data in the files format. Now we have ORDBMS, and in earlier days we use to do manual coding in C / Java for fetching / managing data. Now we have separate service called DSP – Data service platform

DSP : Data Services Platform (DSP) is the AquaLogic component dedicated to developing and deploying integrated data services. Data services give consumers an easy-to-use, uniform model for accessing heterogeneous, distributed data.DSP significantly simplifies the task of creating and deploying reusable data services. It provides tools and frameworks for rapidly generating physical data services based on existing data sources and for creating view-like logical data services.

AL - DSP uses Service Oriented Architecture and XML Query language. As I described in my previous post, ALDSP has two types of DS – Physical and Logical DS.
Both file ends with extension “.ds” then how the compiler differentiates the physical and logical ds?

In ALDSP (please note I am talking about 3.0 version for ALDSP, wherever I use ALDSP its refer to ALDSP – version 3.0), we have something called annotations. It’s something like meta data that we define in any scripting language.


Example: If we open our physical or logical ds we can see the below annotation tag in the starting of the file.


(:: pragma xds < x:xds xmlns:x=”urn: annotations .ld.bea.com”   > ::) 

The above tag is an example for physical DS annotation. Find below for the logical DS


(:: pragma xfl < x:xfl xmlns:x=”urn: annotations .ld.bea.com”   > ::)


Did you find the difference between the two, yes it’s XDS and XFL.For physical is XDS, which means the functions defined in this ds may expose to the web.

For logical, it’s XFL, which means this ds contains only library functions, which can be utilized by other physical / logical ds. Now we are clear about the physical and logical ds, but a physical ds may have both exposed function and non exposed function right?

Yes, physical ds can have both methods which are exposed to web and also a simple utility function. Like public and private methods. Then, how the complier finds the difference between these two? Do we have any change in the method declaration syntax?

NO, we don’t have any change in the method declaration. Both public and private methods have same syntax.

Again annotation helps the compiler to find out the difference between the two.
The following annotation is used before the function starts.


(:: pragma function < f:function kind= “read” visibility= ” public ” isPrimary= ” true ” xmlns:f= “urn:annotations.ld.bea.com” > ::)


In the above annotation, if the visibility is public, which means that this method visible to the world. We can hit this method using SOAP.

Also a physical ds can have more than 1 public functions. And we can define the default function which needs to be executed if a physical ds is called. This can be achieved by isPrimary=”true”.

If is Primary is true which means that this function is default function in this physical ds.As we all know, we can have only one default function in a ds.

In my next post I will write more about XQuery

Is this bolg useful?

Rate

S U N D A R R A J A N

Followers