arrayexpress query interface gonzalo garc í a lara january, 2003 1 / 24
TRANSCRIPT
ArrayExpressArrayExpress Query Interface Query Interface
Gonzalo García Lara
January, 2003
1 / 24
2 / 24
What is the What is the Query InterfaceQuery Interface??
ARRAYEXPRESS
Q.I.
• View DB content in HTML
• Export DB content in XML
• Export Data Sets (to Expression Profiler)
3 / 24
Where is it?Where is it?
EBI Web Site
www.ebi.ac.uk/arrayexpress/query/entry
impressionmachine
Q.I.
4 / 24
Query Interface ServerQuery Interface Server
• Machine: impressionCompaq Alphaserver ES40, 4 CPUs, 8GB RAM
• Server: Tomcat 4.0.1 Open source servlet engine implemented in java
• Java Virtual Machine: version 1.2.2• 2 servers installed: Production and Test.
• Production server is monitered every 5 minutes
and restarted automatically if it is down
193.62.196.98
/ebi/microarray/l/tools/tomcat/prod
/usr/opt/java122/bin
6 /
TECH NOTE:
Web ServerWeb Server Application server
Servlet Engine
Web server
5 / 24
FILESYSTEM
HTTP
HTTP
HTTP (HTML)
picking a file
6 /
TECH NOTE:
Servlet EngineServlet Engine Application server
Servlet Engine
Web server
6 / 24
HTTP
HTTP (HTML)
java computationin a single machine
Servlets
6 /
TECH NOTE:
Application ServerApplication Server Application server
Servlet Engine
Web server
7 / 24
HTTP
HTTPHTTP (HTML)
distributed computation
GATE
Enterprise Java Beans
8 / 24
Static ServerStatic Server
• MAGE-ML Files download
• Expression matrices
• Spreadsheets describing Array Designs.
9 / 24
Dynamic ServerDynamic Server
QueryFormServlet ResultListServlet MAGEModelServlet
Compliant with the 2.3 Servlet Specification
10 / 24
OperationOperation
Nwww.ebi.ac.uk/arraye
TOMCAT ORACLE
5
1. Wait request from client2. Ask data to the database3. Retrieve data4. Render data in HTML form5. Return result to client
4 3
2
1
expressionimpression
11 / 24
Internal ArchitectureInternal Architecture
TOMCAT
servlets DBPool
CastorVelocity ORACLE
HTTP
HTTP
(HTML)
OQL
OQL
java objects
SQL*NET
JDBC
SQL
12 / 24
““Manual” Manual” SoftwareSoftware
• Concurrent Access to the Database: module DBPool
• Servlets
• Supporting classes
13 / 24
Automatically generated SWAutomatically generated SW
• Oracle Database Schema
• O-R mapping (oracle java)
• Java classes to model MAGE objects
• Velocity templates used to produce HTML
XMI-DDL.tcl
14 / 24
javaclasses
O-Rmapping
Automatic Generation IAutomatic Generation I
MAGE.xmi
Description of the MAGE Object Model
AE
DatabaseSchema
VelocityTemplates
15 / 24
MAGE.xmi AE
DatabaseSchema
VelocityTemplates
javaclasses
O-Rmapping
Automatic Generation IIAutomatic Generation II
MAGE.xmiabridged
Abridge.MAGE.xmi.xsl
MAGE-OMmodel
in HTML
Particular XSL scriptsDescription of the MAGE Object Model
6 /
TECH NOTE:
XSL TransformationXSL Transformation
16 / 24
XML Document
XSL Stylesheet
XSL Transformation
Engine
xalan
XML,HTML,or textDocument
Another way to process XML files
SOURCE DOCUMENT
TRANSFORMATION SPECIFICATION
OUTPUT DOCUMENT
6 /
TECH NOTE:
XSL ExampleXSL Example
17 / 24
<mage-class name="Contact" superclass="Identifiable”> <subclasses> <subclass>Organization</subclass> <subclass>Person</subclass> </subclasses> <attributes> <field name="URI" type="String"/> <field name="address" type="String"/> <field name="phone” type="String"/></attributes> <associations> <link name="roles" type="composite" target-class="OntologyEntry"/> </associations></mage-class>
Snippet of a source XML document
6 /
TECH NOTE:
XSL ExampleXSL Example
18 / 24
<xsl:template match="mage-class">
<xsl:variable name=”SUBCLASS_NO" select="count( ./subclasses/subclass )" />
<xsl:if test="$SUBCLASS_NO > 0"> <tr> <td align="left"> <xsl:value-of select="@name" /> </td> <td align="center"> <xsl:value-of select="$SUBCLASS_NO" /> </td> </tr> </xsl:if>
</xsl:template>
XSL Stylesheet snippet to produce HTML table rows
References to XMLelements or attributesin source document
HTML code
6 /
TECH NOTE:
XSL ExampleXSL Example
19 / 24
<tr> <td align="left"> BioAssay </td> <td align="center"> 3 </td> </tr> <tr> <td align="left"> Contact </td> <td align="center"> 2 </td> </tr>
Snippet of resulting HTML code
Data extracted fromthe source XML document
BioAssay
Contact
3
2
Snippet of resulting HTML file
20 / 24
Can XSL be used to process MAGE-ML?Can XSL be used to process MAGE-ML?
• BAD NEWS:- It works on top of SAX or DOM; cannot be faster.- It is pretty tedious.
• GOOD NEWS:- It is a true XML scripting language.- Automation of repetitive tasks (splitting files,
information extraction)
21 / 24
Other tasksOther tasks
• Performance tunning, e.g. Memory consumption.
• User session tracking
• Multithreading problems
22 / 24
FutureFuture
1. Web Server2. Servlet Engine3. Application Server
Current system is in a rather “2.5” status
EJB ServersTomcat(s)
EBI Apache Servers
EBI Systems Microarray responsability
23 / 24
Some useful linksSome useful links
Tomcat Servlet Enginehttp://jakarta.apache.org/tomcat
Castor Object-Relational mappinghttp://castor.exolab.org
Velocity HTML generationhttp://jakarta.apache.org/velocity
Xalan XSL Transformation Enginehttp://xml.apache.org/xalan-j/index.html
24 / 24
QuestionsQuestions
?