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

Saturday, November 7, 2009

My First project @ Cognizant – ALDSP and XQuery

My First project @ Cognizant – ALDSP and XQuery

On 23rd September 2009, I joined Cognizant, after the first day induction program, I was asked to work on the project which was already started. In that project, project lead gave me a list of technologies which are going to be used.  I was offered with the backend part which was considered as tough part in the project

ALDSP and Spring Batch


Backend part – this project was designed in such a way that, batch will generate image and xhtml files ( I was not there when the design decisions were made. Before I join cognizant all these decisions were made).

I was really happy to know that, I got a chance again to work using my favorite framework – Spring. But there was couple of new technologies involved with spring batch. I always want to be a good learner, I try to do so. I have started learning ALSDP (a bea weblogic product). But un – fortunately / fortunately the basic setup / platform was already developed.

I started learning ALSDP, now I am really confident that I can convert any complex SQL query to XQuery and I can do any kind of data manipulation in XQuery. Now I am writing this post to let all the beginners to have the basic understanding about ALDSP and XQuery.


Introduction to ALDSP and XQuery

As I told before ALDSP is a Bea weblogic product, it’s helps us to create web service easier.  ALDSP – Aqua Logic Data Service Platform is a tool to develop web service and it uses XQuery language to fetch data from the database.

It has two types of DS files ( logical and physical data service).  

Physical – this DS acts as a physical table / view. We can create this DS from a table or view or stored procedure or SQL query.

Logical – We will have all the data manipulation process here. Logical DS is further divided into two types.
 1. Entity data service – here we should have functions which is getting exposed as a web service.
2.  Library data service – here we should have functions which is not getting exposed as a web service. All the function written here will acts as a reusable methods. This DS can be imported in the various entity data service.


Best Practice
DO’s
1.       All the DS files should have schema (xsd) associated with it
2.       Physical DS should only have the functions like create and table / view function.


Don’t (usually I will concentrate more on the Don’t part. Whatever be the technology, if we avoid all the don’ts, we will definitely have a standard code)


  1. Physical DS should not have any user defined functions.  
  2.  Entity DS should not have any functions which are not getting exposed as a web service.
  3.  Logical DS should not have any functions which are getting exposed as a web service
  4.  Any web service functions should not be without a schema defined. 
I will keep writing more about ALDSP and XQuery on my upcoming posts.

Linux up 60% YoY, Windows down 4.02%


I was thinking what to write…… Then I thought I can write something about my favorite LINUX. I remember there was statistics release on April – 2009. I know it pretty old news, but still I thought I can post this here….
On April – 2009, there was a statistics released by hitslink, according to that GNU/LINUX has hit 1% market share during April, 2009.
A year back Linux had market share of 0.63% (April 2008). It’s an increase of over 60% year over year for GNU/LinuxYear over year, Windows had a decrease of 4.02% (from 91.58% to 87.9%).  Still going down….

Click here to see the market share statistics
Click here to see the W3schools statistics on OS Platform

Is this bolg useful?

Rate

S U N D A R R A J A N

Followers