You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Luciano Resende <lu...@gmail.com> on 2007/07/15 23:36:27 UTC

DAS Programming model for multiple implementations Fwd: [jira] Updated: (TUSCANY-1431) DAS with XQuery based data access support

Hi Amita

   I was taking a quick look in your proposed changes in the DAS API
that is in my sandbox, could you please elaborate your thoughts around
the programming model proposed here [1] ? Have you looked at the
implications of these changes on other DAS implementations, such as
LDAP DAS ?

[1] http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg14428.html

---------- Forwarded message ----------
From: Amita Vadhavkar (JIRA) <tu...@ws.apache.org>
Date: Jul 15, 2007 10:56 AM
Subject: [jira] Updated: (TUSCANY-1431) DAS with XQuery based data
access support
To: tuscany-dev@ws.apache.org



     [ https://issues.apache.org/jira/browse/TUSCANY-1431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Amita Vadhavkar updated TUSCANY-1431:
-------------------------------------

    Attachment: 1431_xquery.patch
                1431_api.patch

this is just a work in progress, where config (xquery specific) is created and
some basic classes are in progress. trying and checking different XQuery
implementations available - like Saxon, DB2 Express etc. Next patch will have
some work on that.  Please give suggestions based on patch and
http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg19983.html
Thanks,
Amita

> DAS with XQuery based data access support
> -----------------------------------------
>
>                 Key: TUSCANY-1431
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1431
>             Project: Tuscany
>          Issue Type: New Feature
>          Components: Java DAS XQuery
>    Affects Versions: Java-DAS-Next
>            Reporter: Amita Vadhavkar
>         Attachments: 1431_api.patch, 1431_xquery.patch
>
>
> place for submitting incremental patches for the ground work of XQuery DAS

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: DAS Programming model for multiple implementations Fwd: [jira] Updated: (TUSCANY-1431) DAS with XQuery based data access support

Posted by Amita Vadhavkar <am...@gmail.com>.
I have applied the patch for 1431 (Jul 16) on latest on sandbox and checked
that it is working. Below are the details of the changes made in the patch.

Changes -
---------
1) topmost pom.xml - ldap module commented out for time being. But the
changes are towards making tuscany-das-api more generic. When latest LDAP
impl is available in sandbox, can check effect of the changes on it.

Module - tuscany-das-api
----------------------------
1) Command - changed
added setDataSourceConnection - to make Command aware of the connection it
needs to
use to execute the underlying query

2) DasFactory - changed
Different implemnetations of DAS will use different Configs and so there is
no need to have Config
at api level, but it needs to be defined and used at impl level. From this
point, removed Config.xsd
from api. Removed from DasFactory any refs to Config and replaced with
Object. It is responsibility of
individual impls to use their specific Config at runtime and do checks if
needed to ensure the Config
is appropriate as per the requirement of impls. For this, in
tuscany-das-api, changed createDAS()
methods.

DAS connects to DataSource which can be database , file system, directory
system,...So, DAS api should
be generic enough to acept different types of DataSource Connections (can be
java.sql.Connection, can
be custom File System Connections and so forth.). DASFactory APIs in api
module thus need to support
generic Data Source Connection. From this point of view, introduced
Interface DataSourceConnection
and used it in tuscany-xquery-impl into 2 different connections viz.
DatabaseConnection,
FileSystemConnection. For this, in tuscany-das-api, changed createDAS()
methods.

3) ConfigHelper - removed
As there is no need to have Config at tuscany-das-api, there is no need to
have ConfigHelper either
at this level. Also, as different impls Configs will differ, having some
common refactoring
in tuscany-das-api level ConfigHelper may not give lot of advantages.

4) DataSourceConnection - added
For reasons discussed in 1), 2)

5) ImplementationFactory - added
If the particular DAS impl (say XQuery) supports different implementations
for underlying query
format (e.g. RDB DAS - may support JDBC, XQuery DAS - may support Saxon impl
of XQuery, DB2 Express
for XQuery All these may not be XQJ compliant (e.g. Saxon may be compliant,
but DB2 Express may not
be. So, ImplementationFactory is the way to plugin required impl support
(only 1 in 1 runtime) -
like Saxon OR DB2 Express

6) DAS - changed
added setImplementationFactory(ImplementationFactory) - hook to specify -
e.g. say for XQuery DAS -
are we using Saxon/DB2 Express/...

7) pom.xml - changed
added dependecy for log4j,stax and ensured JDK 1.5 usage for -source,
-target

8) config.xsd - removed
config should exist on impl level and not api level

Module - tuscany-das-xquery
----------------------------
1) ConfigHelper - added
To provide helper methods for Config specific to tuscany-das-xquery

2) XQueryDB2FactoryImpl, XQuerySaxonFactoryImpl - added
implements ImplementationFactory from tuscany-das-api

3) XQueryServiceProvider, XQueryServiceLoader - added
use Service Provider approach to handle support for different XQuery
Implemntations like
Saxon-B, DB2 Express. Based on the XQuery Implementation Service Provider
name, required
implementation will be supported/used at runtime

4) MappingWrapper - added
Wrapper over Config

5) XQueryDASFactoryImpl - changed
extends DASFactory from tuscany-das-api.

6) XQueryDB2CommandImpl , XQuerySaxonCommandImpl
command implementations specific to XQuery Impl (this can be refactored if
reqd in generic class and subclasses)

7) ConfigUtil - added
Util to support impl specific Config

8) CommandHelper - added
Depending on ImplementationFactory being used, this will provide instance of
Command to be used
for query execution. e.g. for Saxon, the CommandImpl will be specific to
XQJ, For DB2 Express,
CommandImpl will be specific to some custom APIs from DB2 Express.

9) config.xsd - Config specific to XQuery DAS

10) pom. xml - to ensure JDK 1.5 source and target usage

11) services/org.apache.tuscany.das.ImplementationFactory - added
To support Service Provider Framework for different XQuery Implementations.
file with only 1 string mentioning which XQuery
implementation is being used - e.g. DB2 Express, Saxon (can not say XQJ
because, as XQJ is still
evolving, there can be descrepancies between Saxon and latest XQJ specs)

12) BooksCfg.xml - added
example Config to demo Saxon XQuery Impl
books - xml, xsd, dtd - example files

13) DatabaseConnection, FileSystemConnection - added
inherit from DataSourceConnection

14) XQueryDASImpl - added
DASImpl for XQuery

Module - tuscany-das-xquery
---------------------------
Unit Tests
----------
1) XQueryDASFactoryTestCase.testDiscoverDASFactoryInstance
2) XQueryDASFactoryTestCase.testGetDASInstance
3) XQueryDASFactoryTestCase.testDiscoverXQueryImplementationFactory
4) XQueryDASFactoryTestCase.testGetCommand
5) XQueryDASFactoryTestCase.testExecuteCommand

Note: In order to run the test cases saxon jars need to be present in
classpath (saxon8 and saxon8-xqj)

Regards,
Amita

On 7/16/07, Ole Ersoy <ol...@gmail.com> wrote:
>
> Hi,
>
> I reviewed Luciano's sandbox code a while back, and will integrate it once
> I have tested all the CRUD operations / the classes that are the
> workhorses..., so any changes will have minimal impact on the LDAP DAS at
> them moment.
>
> Cheers,
> - Ole
>
>
>
>
> Luciano Resende wrote:
> > Hi Amita
> >
> >   I was taking a quick look in your proposed changes in the DAS API
> > that is in my sandbox, could you please elaborate your thoughts around
> > the programming model proposed here [1] ? Have you looked at the
> > implications of these changes on other DAS implementations, such as
> > LDAP DAS ?
> >
> > [1] http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg14428.html
> >
> > ---------- Forwarded message ----------
> > From: Amita Vadhavkar (JIRA) <tu...@ws.apache.org>
> > Date: Jul 15, 2007 10:56 AM
> > Subject: [jira] Updated: (TUSCANY-1431) DAS with XQuery based data
> > access support
> > To: tuscany-dev@ws.apache.org
> >
> >
> >
> >     [
> >
> https://issues.apache.org/jira/browse/TUSCANY-1431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> >
> > ]
> >
> > Amita Vadhavkar updated TUSCANY-1431:
> > -------------------------------------
> >
> >    Attachment: 1431_xquery.patch
> >                1431_api.patch
> >
> > this is just a work in progress, where config (xquery specific) is
> > created and
> > some basic classes are in progress. trying and checking different XQuery
> > implementations available - like Saxon, DB2 Express etc. Next patch will
> > have
> > some work on that.  Please give suggestions based on patch and
> > http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg19983.html
> > Thanks,
> > Amita
> >
> >> DAS with XQuery based data access support
> >> -----------------------------------------
> >>
> >>                 Key: TUSCANY-1431
> >>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1431
> >>             Project: Tuscany
> >>          Issue Type: New Feature
> >>          Components: Java DAS XQuery
> >>    Affects Versions: Java-DAS-Next
> >>            Reporter: Amita Vadhavkar
> >>         Attachments: 1431_api.patch, 1431_xquery.patch
> >>
> >>
> >> place for submitting incremental patches for the ground work of XQuery
> >> DAS
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: DAS Programming model for multiple implementations Fwd: [jira] Updated: (TUSCANY-1431) DAS with XQuery based data access support

Posted by Ole Ersoy <ol...@gmail.com>.
Hi,

I reviewed Luciano's sandbox code a while back, and will integrate it once I have tested all the CRUD operations / the classes that are the workhorses..., so any changes will have minimal impact on the LDAP DAS at them moment.

Cheers,
- Ole




Luciano Resende wrote:
> Hi Amita
> 
>   I was taking a quick look in your proposed changes in the DAS API
> that is in my sandbox, could you please elaborate your thoughts around
> the programming model proposed here [1] ? Have you looked at the
> implications of these changes on other DAS implementations, such as
> LDAP DAS ?
> 
> [1] http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg14428.html
> 
> ---------- Forwarded message ----------
> From: Amita Vadhavkar (JIRA) <tu...@ws.apache.org>
> Date: Jul 15, 2007 10:56 AM
> Subject: [jira] Updated: (TUSCANY-1431) DAS with XQuery based data
> access support
> To: tuscany-dev@ws.apache.org
> 
> 
> 
>     [ 
> https://issues.apache.org/jira/browse/TUSCANY-1431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel 
> 
> ]
> 
> Amita Vadhavkar updated TUSCANY-1431:
> -------------------------------------
> 
>    Attachment: 1431_xquery.patch
>                1431_api.patch
> 
> this is just a work in progress, where config (xquery specific) is 
> created and
> some basic classes are in progress. trying and checking different XQuery
> implementations available - like Saxon, DB2 Express etc. Next patch will 
> have
> some work on that.  Please give suggestions based on patch and
> http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg19983.html
> Thanks,
> Amita
> 
>> DAS with XQuery based data access support
>> -----------------------------------------
>>
>>                 Key: TUSCANY-1431
>>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1431
>>             Project: Tuscany
>>          Issue Type: New Feature
>>          Components: Java DAS XQuery
>>    Affects Versions: Java-DAS-Next
>>            Reporter: Amita Vadhavkar
>>         Attachments: 1431_api.patch, 1431_xquery.patch
>>
>>
>> place for submitting incremental patches for the ground work of XQuery 
>> DAS
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org