468,537 Members | 1,926 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,537 developers. It's quick & easy.

Retic EAI Server 0.3.2 Released - SQLTreeSource included.

I've released a new version of Retic with new components :

- Pipes : XPathPipe and FlatToXMLPipe
- Source : SQLTreeSource (permits to build complex XML
documents from several SQL requests).

The Designer is now fully working and supports all components
of the current Retic release.
It is available on sourceforge : http://sourceforge.net/projects/retic
================================================== ===========
Retic is an EAI Server.
The aim is to permit applications to communicate, even if they
don't speak the same language (which means transport protocols
as well as data structures).
This is done by building adaptors. An adaptor is composed of :
- One source
- Several pipes (process data transformations)
- Several sinks (destination of data)
- Several loggers (using the logging module of python 2.3)

================================================== ===========
Sometimes (well, might even be more than that) you need to get
more than a bunch of rows from a table translated to XML. You
need a whole structured XML document with a complex and deep
architecture. The SQLTreeSource is what you need then. It
permits to describe an XML tree, each node being the result of
an SQL statement. Here's an example :

<source name="SQLTreeSource" type="SQLTreeSource" dbType="odbc"
dsn="localhost_mysql" user="root" password="" rootTag="XPWeb"
encoding="ISO-8859-1" msgSize="0" polls="1" pollPeriod="0">
<query SQL="select * from iterations" recTag="iteration">
<query SQL="select * from stories"parentLink="id"
childLink="iteration_id" recTag="story">
<query SQL="select * from tasks"
parentLink="id,iteration_id" childLink="story_id,iteration_id"recTag="task"/>
Here is the XML output of the source described above :

<?xml version="1.0" encoding="ISO-8859-1"?>
<description>Mise en recette Valo
<name>Evironnement de tests unitaires</name>
<description>Création d'un environnement de tests
unitaires et de non-régression.</description>
<name>Scripts de création des données
<description>Ecriture des scripts de
création de base</description>
<name>Environnement $U - Session et
<description>Création des sessions et
uprocs propres aux tests.</description>

This is an extraction of my XPWeb database (THE Extreme
Programming management tool - http://xpweb.sourceforge.net ).
Three tables are accessed here : iterations, stories and tasks.
Iterations may have several stories, which may have several
tasks. What I wanted here is to extract all my iterations with
their stories and tasks into a single XML document.

<query SQL="select * from iterations" recTag="iteration">

This permits to get all iterations at the second level (the
first being the root one whose name is defined in the rootTag
attribute of the source component) of the document. Each
iteration will be written to XML, embraced by an <iteration> tag
Providing a new subquery this way :

<query SQL="select * from iterations" recTag="iteration">
<query SQL="select * from stories" parentLink="id"
childLink="iteration_id" recTag="story"/>

Permits to define a new sublevel under iteration, writing the
stories inside <story> tags.
parentLink and childLink permit to assign the stories to their
iteration (we don't want all stories to be repeated under each
iteration). Here, we make a link between the fields :
iterations.id and stories.iteration_id
At execution time, the SQL statement is modified to include
the link.
(for example : select * from stories where iteration_id = 4)
Now, let's add a subquery to stories :

<query SQL="select * from iterations" recTag="iteration">
<query SQL="select * from stories" parentLink="id"
childLink="iteration_id" recTag="story">
<query SQL="select * from tasks" parentLink="id"
childLink="story_id" recTag="task"/>

Here, we've added a new sublevel, which will come under
stories. It will write all tasks for each stories (with a link
between stories.id and tasks.story_id).
Simple, isn't it ?
Note : Although it is not said yet in the doc, supported databases are :
mysql, odbc (not mxOdbc), sybase, dcoracle2, cx_oracle (dbtype in the
config file must take one of those values spelled exactly this way). Of
course, they'll only work if corresponding db modules are correctly
installed. I've tested mysql and odbc but couldn't yet test the others
(feedback is welcome !!).
Upcoming components are :

- xmlBlasterSource (already developped - will be shipped in the next
release this week)
- JabberSink (already developped - will be shipped in the next release this
- httpSink
- SoapSource
- SoapSink
- xmlBlasterSink
- MQSeries source and sink (if I manage in compiling it with python 2.3 and
MinGw32 under win32 - help appreciated - Compile is ok but I get an error
at import : blablabla : Memory could not be read)
- Support for other popular databases (DB/2, PostgreSQL, etc...)

================================================== ===========
Have fun !!

PS : One last thing ==> Tell me if you're interested by Retic (good formy

Jul 18 '05 #1
0 1286

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Alexander DEJANOVSKI | last post: by
reply views Thread by Brian Lloyd | last post: by
reply views Thread by phil hunt | last post: by
10 posts views Thread by Thomas Heller | last post: by
reply views Thread by Alexander DEJANOVSKI | last post: by
15 posts views Thread by Anthony Baxter | last post: by
4 posts views Thread by David Fraser | last post: by
5 posts views Thread by Mark_S | last post: by
28 posts views Thread by prunoki | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.