1 ActiveXML peer Anca Ghitescu R&D Engineer - GEMO 19/05/2008.
-
Upload
francine-fisher -
Category
Documents
-
view
212 -
download
0
Transcript of 1 ActiveXML peer Anca Ghitescu R&D Engineer - GEMO 19/05/2008.
1
ActiveXML peer
Anca GhitescuR&D Engineer - GEMO
19/05/2008
2
Agenda
• ActiveXML peer– ActiveXML documents– Architecture– Activation: chain of execution– ActiveXML materializers– ActiveXML services– Continuous service calls– AXML syntax– Software components
3
ActiveXML documents
- XML documents with
embedded calls to web services*sc = service call
- When activated, these documents are enriched with data coming as results of service calls
4
ActiveXML example
• Before activation <example xmlns:axml="http://futurs.inria.fr/gemo/axml/"> <axml:sc axml:id="temperature"> <axml:ws-soap endpoint="http://webservices.daehosting.com/services/TemperatureConversions.wso"> <CelciusToFahrenheit><nCelcius>10</nCelcius></CelciusToFahrenheit> </axml:ws-soap> </axml:sc></example>
• After activation
<example xmlns:axml="http://futurs.inria.fr/gemo/axml/"> <axml:sc axml:id="temperature"> ... </axml:sc> <m:CelciusToFahrenheitResult >50</m:CelciusToFahrenheitResult></example>
5
Architecture of ActiveXML system
• Peer-to-peer network: a collection of ActiveXML peers
• A peer: client/server functionality
• As client: – Materializes service calls inside the
document– Processes the results
• As server: axml specific web services– Materialization Service– Algebra Operators: Send, Receive,
NewNode– Continuous Query Service
• Repository for AXML documents
6
Activation: Chain of execution
Activate the document version.xml@peer1 and get the data from peer2
example
sc [id="version";http://peer2/services/Version]
getVersion
version.xml@peer1 before activation
example
version 1.3
sc result
getVersion
version.xml@peer1 after activation
Client
Server
Materialization Service
version.xml
peer1
Client
ServerVersion
peer2
1. load document
Web Interface
2. call activate
3. use InOut MaterializerMaterializers 5. get response
4. call service
6. append data
7
ActiveXML services
• Generic Query Service: applies a query over (continuous) data • Streaming Service: streams data from a file stored in the
database• Continuous Service: calls a service continuously• Optimax Service: rewrites axml documents based on rules
• Materialization Service: activates service calls inside axml documents
• Algebra Services: enable distributed data management– NewNodeOperator: installs axml data on remote peers– SendOperator: sends data (continuously)– ReceiveOperator: receives data
8
ActiveXML Materializers
• Calling different services and processing the results• They might need to be specified into axml documents
depending on called services– DefaultOutOnlyMaterializer / DefaultOutInMaterializer – MaterializerForContinuousQuery: calls
GenericQueryService with parameters coming as results of other service calls (streams)
– MaterializerForContinuousSC: calls continuously a web service, each time a new parameter value arrives.
– MaterializerForSC: eliminates the sc declaration from active parameters of a service call and calls the parent web service
– MaterializerForRECEIVE / MaterializerForSEND
9
Continuous service calls• A service is called with parameters coming from a stream• A stream might represent the results of another service call • ReceiveOperator is called to stream back the results
continuousQuery
declaration
sc [GenericQueryService;MaterializerForContinuousQuery]
let $a:= <param id="stream">for $r in $a/* return $r
param [id="stream"]
example
sc [StreamService] data1 data2
result1 result2
10
AXML example: continuous query<example xmlns:axml="http://futurs.inria.fr/gemo/axml/">
<axml:sc axml:id="continuousFILTER">
<axml:return materializer=
"fr.inria.gemo.axml.model.sc.materialization.MaterializerForContinuousQUERY">
<axml:append/>
</axml:return>
<axml:ws-soap endpoint="http://localhost:6969/MyPeer/services/GenericQueryService">
<q:continuousQuery xmlns:q="http://futurs.inria.fr/gemo/axml/service/Query">
<q:declaration>
let $book := <q:param name="book"/>
for $b in $book/* return if(xs:integer($b/year) gt 2003) then $b else ()
</q:declaration>
<q:param name="book">
<axml:sc axml:id="bookStreamer">
...
</axml:sc>
<STREAM_DATA/>
</q:param>
</q:continuousQuery>
</axml:ws-soap>
</axml:sc>
</example>
11
Generic Query Service
• Execute a query• Execute a continuous query (stream parameters)• Apply a public query defined in another document (as a
function)
12
Optimax Service
• Optimizer for AXML documents• Rewrites the documents with the help of Algebra operators
(Send, Receive, NewNode)• Rewriting based on strategy and statistics
13
AXML syntax
• XML schemas– the syntax of axml documents– the definition of axml services– the communication headers for SOAP messages
• A sc is uniquely identified by (peerID, docID, nodeID)• Activation order
– default: depth first – afterActivated, afterTerminated
14
• Web server: Tomcat 5.5• Axis2 Web service engine• Repository: eXist XML database• ActiveXML engine• Web interface:
– GWT (Google Web Toolkit)– XForms
• SOAP Alerter
Software Components
15
Miscellaneous
• www.activexml.net• Documentation• Regression Tests• SVN repository:
http://forge.objectweb.org/projects/activexml/
16
Merci!