Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "CosmosResourceModelingComponent"

(completed SML-IF import/export wizards)
(Resource Modeling)
 
(46 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[COSMOS|COSMOS Main Page]] > [[ COSMOS#Architecture | Architecture]] >
+
[[COSMOS|COSMOS Main Page]] >  
  
 
= Resource Modeling =
 
= Resource Modeling =
  
For information regarding SML look [http://www.serviceML.org here].
+
<font color=red>Note: this content is mostly deprecated, but gives some insight to the original intent of the Resource Modeling component.  This material should be rewritten to provide a new overview of the component, and should be linked from the www.eclipse.org/cosmos.</font>
 +
 
 +
For more documents on the Resource Modeling component, see the category linked at the bottom.
  
 
== Next Meeting ==
 
== Next Meeting ==
  
Friday 2/9/07 @ 11am EST/8am PST.
+
Friday 4/26/07 @ 2 pm EST.
 
Call in:
 
Call in:
 
     US/Canada:  +1.866.432.9903    United Kingdom:  +44.20.8824.0117
 
     US/Canada:  +1.866.432.9903    United Kingdom:  +44.20.8824.0117
 
     India:      +91.80.4103.3979  Germany:          +49.619.6773.9002
 
     India:      +91.80.4103.3979  Germany:          +49.619.6773.9002
 
     Japan:      +81.3.5763.9394    China:            +86.10.8515.5666
 
     Japan:      +81.3.5763.9394    China:            +86.10.8515.5666
Meeting ID:              2217320
+
Meeting ID:              2212212
  
 
If we need web conferencing:
 
If we need web conferencing:
http://meetingplace.cisco.com/join.asp?2217320
+
http://meetingplace.cisco.com/join.asp?22122121
  
 
[[Meeting Minutes]]
 
[[Meeting Minutes]]
  
== Project Scope ==
+
== Scope and Mission ==
* Import from SML-IF
+
 
** Import an SML-IF document to an existing document repository. The open source implementation of the document repository will be a file system structure.
+
In most tools that monitor resources there is an awareness of some of the more static features of a resource; for example the physical location and the IP address, in addition to the actual data being extracted from the resource is often known. Yet each tool has its own representation of this information. With the growing presence of distributed and componentized applications this information also includes the overall topology of the application. This is redundant information between the tool used to debug a performance bottleneck and the tool that is used to deploy components of the application, or the tool that is doing load testing and monitoring of the application.  The Resource Modeling sub project goal is to address this redundancy by helping to build a canonical representation of these resources.
* Export to SML-IF
+
 
** Create an SML-IF instance from existing document repositories. The open source implementation of the document repository will be a file system structure.
+
The COSMOS Resource Modeling sub-project aims to provide support for building a common model to represent the information being shared in a system management scenario. The project is proposing to use SML as the xml schema language to define this common model. The SML-IF interchange format will be used to share model components between the tools involved in a system management activity.  
* SML and SML-IF validation
+
 
** Provide a common interface for handling and reporting errors
+
 
** SML validation
+
To that extent, the COSMOS Resource Modeling sub-project is focused on the following deliverables:
*** Provide a common interface for handling and reporting errors
+
* Tooling for validating SML instances and SML-IF documents
*** A default implementation for the XML validation phase
+
* Tooling for importing/exporting SML-IF documents to and from predefined repositories.
*** A default implementation for the SML extension validation phase
+
* Tooling for creating SML template documents
*** A default implementation for the Schematron validation phase, which will include displaying results to a predefined output based on report/assertion conditions
+
* Tooling for creating domain models based on existing SML templates
*** Create a default validation scheme for the SML extensions: sml:acyclic, sml:targetElement, sml:targetType, sml:key, sml:unique, and sml:keyref
+
 
** SML-IF validation
+
For information regarding SML look [http://www.serviceML.org here].
*** A default implementation for the XML validation phase
+
 
*** A default implementation for the Schematron validation phase in the context of an SML-IF document; includes displaying results to a predefined output based on report/assertion conditions
+
== Integration with other Eclipse projects ==
** Apply the SML validation extension in the context of an SML-IF document: sml:acyclic, sml:targetElement, sml:targetType, sml:key, sml:unique, and sml:keyref
+
 
** An implementation of RFC 3986 to resolve inter-document references within an SML-IF document
+
The Resource Modeling workgroup is proposing to investigate which Eclipse projects are offering XML editors or schema validation and work together to create a common scenario to make Cosmos and these projects interact and complement each other.
** Verify that the SML and SML-IF validation implementations cover the test cases of the SML workshop scenario
+
 
 +
WTP has been identified as one of the projects offering xml schema and instance validation. The action is available for any document with the extension XML and XSD (right click and select Run Validate or Validation XML File action). A good usability scenario would require extending these actions with SML extra validation and not providing new validate actions on an xml or xsd resource. Since this may require working with the WTP team to define a common scenario and the set of extensions required to hook in SML validation, this may not be a viable delivery for the first release of Cosmos. This should not stop us from starting the collaboration with WTP (and any other projects) with the goal of identifying required API and extension points for making this happen.
 +
 
 +
== Project Deliverables ==
 +
 
 +
=== Tooling for validating SML instances and SML-IF documents ===
 +
 
 +
* Target date for this item: March 07.
 +
 
 +
 
 +
The validator should be fully functional by the end of the COSMOS 1.0 , June 07
 +
 
 +
* Provide a common interface for handling and reporting errors  
 +
* SML validation  
 +
** Provide a common interface for handling and reporting errors  
 +
** A default implementation for the XML validation phase  
 +
** A default implementation for the SML extension validation phase  
 +
** A default implementation for the Schematron validation phase, which will include displaying results to a predefined output based on report/assertion conditions  
 +
** Create a default validation scheme for the SML extensions: sml:acyclic, sml:targetElement, sml:targetType, sml:key, sml:unique, and sml:keyref  
 +
* SML-IF validation  
 +
** A default implementation for the XML validation phase  
 +
** A default implementation for the Schematron validation phase in the context of an SML-IF document; includes displaying results to a predefined output based on report/assertion conditions  
 +
* Apply the SML validation extension in the context of an SML-IF document: sml:acyclic, sml:targetElement, sml:targetType, sml:key, sml:unique, and sml:keyref  
 +
* An implementation of RFC 3986 to resolve inter-document references within an SML-IF document  
 +
* Verify that the SML and SML-IF validation implementations cover the test cases of the SML workshop scenario
 +
 
 +
 
 +
 
 +
=== Tooling for importing/exporting SML-IF documents to and from predefined repositories ===
 +
 
 +
* Target date for this item : March 07
 +
 
 +
 
 +
An SML-IF document can be formed from a project by selecting export from the context menu of one or more resource that appears under a project. The operation will determine the genic or phenic documents based on a registered content type that describes each type of the document. The user will have the option of changing the document type (i.e. genic/phenic) if a unit’s type is incorrectly assigned. The export operation will be integrated with Eclipse’s export wizard under the category: “Service Model Language”.
 +
 
 +
The user can also import an SML-IF model into its units using the import operation. The import operation will simply divide up an SML-IF document into individual genic and phenic documents and store them in a desired target folder. The import operation will be integrated with Eclipse’s import wizard under the category: “Service Model Language”.
 +
 
 +
Ideally an import operation followed by an export operation should generate a file that is
 +
semantically equivalent to the original file imported. Unfortunately there is some loss of data when an SML-IF document is broken into its respective SML model units. For example, the aliases associated with a document or schematron rule bindings are not preserved in SML model units. To preserve this information, a meta-data file is generated with every SML-IF document import. Using the meta-data, the user can perform an export operation that will result in a file that is semantically equivalent to the
 +
original SML-IF document imported. Validation can be done at a project, folder, or a unit level. To validate an entire model the user can select validate from the context menu of a project. Alternatively the user can validate a subset of the model by selecting validate from the context menu of a parent folder or a set of model units.
 +
 
 +
A more detailed document describing import and export implementation and extension points is attached below.
 +
http://wiki.eclipse.org/images/a/ae/SML-Validation-v7.pdf
 +
 
 +
 
 +
 
 +
 
 +
=== Tooling for creating SML template documents ===
 +
 
 +
* Target date for this item: post June 07
 +
 
 +
 
 +
An SML template document is an SML instance defining a common pattern that can be re-used and adapted in different domain models.
 +
The project is proposing to offer an extendable tool which allows users to easily create SML templates. The tool will be based on GEF and will provide drag and drop capabilities for creating templates.
 +
 
  
= SML/SML-IF Validation & Editor =
 
== Design ==
 
The following attached document describes the validation of SML/SML-IF documents.  It also includes description
 
of embedded editors in Eclipse: [[Media: SML-Validation-v7.pdf]]
 
  
== Implementation (in progress) ==
 
The following attached zip file is a copy of the source files:  [[Media:Backup-v2.zip]]
 
(your browser may not pick up the latest copy if a previous attachment has been cached)
 
  
==== Nov 21st/2006 update ====
+
=== Tooling for creating domain models based on existing SML templates ===
An informal meeting between Valentina, Sheldon, and I (Ali) resulted in the following design decisions:
+
  
<ul>
+
* Target date for this item: post June 07
<li>Sheldon already has a prototype of performing the first and last phase of the validation (i.e. XML validation against a schema and schematron).  The schematron validation phase is based on version 1.5.  This phase uses the skeleton1-5.xsl( http://xml.ascc.net/schematron/1.5/) reference implementation to extract the schematron from the schema. 
+
</li>
+
<li>
+
I have completed the validation output, which will be dependent on the environment where the validation process will be performed.  In Eclipse the validation output will be a set of markers that will be written to the problems view.  In the standalone mode the user will have the option of either logging to a file or system output.
+
</li>
+
<li>
+
The second phase of the validation process was discussed.  Some SML extensions require their own data structure to perform the validation.  For example:
+
  <ul>
+
    <li>
+
    sml:acyclic will require a directed graph where nodes represent documents and edges represent the source and target element from/to the document that contains them.
+
    </li>
+
    <li>
+
    sml:targetType will require an inheritance tree representing the relationship between the different element types.
+
    </li>
+
  </ul>
+
<li>
+
Sheldon is working on a general SAX parser that will allow a set of content handlers to be registered to construct the different data structures required as part of the validation.  This will allow us to generate multiple data structures by parsing the XML document once.  Each data structure is registered with a class so that it can be retrieved and used by other SML extensions.
+
</li>
+
<li>
+
I'm currently working to generate the directed graph needed as part of the sml:acyclic validation.
+
</li>
+
<li>
+
Valentina is continuing with her tasks (validation of SML identity constraints: key, keyref, and unique)
+
</li>
+
</ul>
+
  
==== Nov 23rd/2006 update ====
 
<p>
 
Sheldon has completed the generic parser that allows multiple data structures to be created through one pass of an XML document.  The structures are registered and retrieved via a unique ID.  Also, the validator factory classes were revised after I discussed them with Sheldon.
 
</p>
 
  
<p>
+
The project is proposing to offer an extendable tool which allows users to easily create SML instances based on SML templates. The tool will be based on GEF and will provide drag and drop capabilities for building the instances. The SML instances will be possibly created using SML templates, built using the SML templates builder.
I have completed the data structure builder for the directed reference graph that will be used as part of validating the acyclic extension.  A structure is also created to determine the types that are declared as acyclic. A partial implementation of the acyclic validator is checked in.  Here's how it performs the validation:
+
</p>
+
<code>
+
for every element i declared as acyclic  <br/>
+
&nbsp;&nbsp;G = obtainReferenceGraph(i);<br/>
+
&nbsp;&nbsp;backEdge = DFS(G);<br/>
+
&nbsp;&nbsp;if (backEdge == null)<br/>
+
&nbsp;&nbsp;&nbsp;&nbsp;no cycle found;<br/>
+
&nbsp;&nbsp;else    <br/>
+
&nbsp;&nbsp;&nbsp;&nbsp;use backEdge and tree edges to report the cycle detected;<br/>
+
&nbsp;&nbsp;&nbsp;&nbsp;report error;<br/>
+
</code>
+
  
==== Nov 28th/2006 update ====
+
The tool should be extendable to allow registration of third parties SML templates.
  
The DataBuilder was updated to include a concept of validating the data strucutre that is generated.  JUnits were created to cover all 5 acyclic scenarios of the interop workshop:
+
== Open Issues ==
<ul>
+
<li> InValidCycles.xml, ValidCycles1.xml, and ValidCycles2.xml are handled by test cases under org.eclipse.cosmos.rm.validation.tests\junits\TestAcyclicValidator.testsuite </li>
+
<li> InValidDerivation.xml and ValidDerivation.xml are covered by test cases under org.eclipse.cosmos.rm.validation.tests\junits\TestTypeInheritanceDataBuilderImpl.testsuite
+
</li>
+
</ul>
+
  
An abstract class was created for all property extractor data builders (i.e. data builder that extract an attribute name from an element that meets a set of criteria).
+
The SML, SML-IF standards are in an emerging phase so they are not completely defined yet. This will require for the Resource Modeling sub-project, as well as the COSMOS project as a whole, to continue synchronizing with the latest specifications.
 +
For example, the SML and SMLIF validators will need to be updated as soon as the specification changes.
  
==== Dec 4th/2006 update ====
+
== Useful links ==
An informal meeting was held between Valentina, Sheldon, and I (Ali) to provide a status update.  There was a discussion about how the key/unique sml extensions should be validated.  There appears to be a need to store the DOM fragments of some of the documents in order to perform key/unique extension validation.  Sheldon questioned the current approach of doing SAX and DOM parsing.  The design was justified after realizing that the hybrid parsing method is needed to satisfy the needs of all sml extension validators.  A high level algorithm was derived to perform the key/unique extension validations.  Valentina will look into APIs available to evaluate XPath expressions, which is required as part of the derived algorithm.  There were concerns raised by Valentina about not taking namespaces into account while building the required data structures.  Since then, I have updated some of the data builders to build namespace aware structures.  Sheldon is doing the same for the data structures required by his validators.
+
  
==== Dec 13th/2006 update ====
+
=== SML and SMLIF specifications ===
Added APIs to be able to evaluate XPointer expressions.  The supported expressions are:
+
* http://serviceml.org/
<ul>
+
<li>Full Expression</li>
+
<li>Child Sequence</li>
+
<li>Bare Name</li>
+
</ul>
+
  
Only two schemes are supported for full expressions: xmlns and xpointer.  The default functions of xpointer are not implemented (since they are not allowed in SML documents)I have added JUnits to exercise the XPointer APIs.  The xpointer scheme is using Xalan to evaluate the XPath expression.  We will eventually need legal clearance for using Xalan (or any other equivalent API) in COSMOS.
+
=== SMLIF validation design document ===
 +
The following attached document describes the validation of SML/SML-IF documents.  It also includes description of embedded editors in Eclipse
 +
* [[Media: SML-Validation-v7.pdf]]
  
==== Dec 14th/2006 update ====
+
Link to a detailed overview of the SML validation implementation
Finished implementing the XPath extension function, <i>deref()</i>.  To use the deref function the client code must use ISMLCommonUtil.xpath and set the correct namespace context before compiling an expression.  The xpath instance variable has a registered XPath function resolver which invokes the deref implementation when it is detected.  Here's an example of how to use the function:
+
* [[Implementation details]]
<br/>
+
  
<code>
+
=== Download page ===
SMLCommonUtil.xpath.setNamespaceContext(<i>&lt;A namespace context&gt;</i>); <br/>
+
XPathExpression xpathExp = SMLCommonUtil.xpath.compile("smlfn:deref(tns:EnrolledStudents/tns:EnrolledStudent)"); <br/>
+
NodeList nodeList = (NodeList)xpathExp.evaluate(<i>&lt;Context node&gt;</i>, XPathConstants.NODESET);
+
</code>
+
<br/><br/>
+
  
See the internal documentation of org.eclipse.cosmos.rm.validation.internal.reference.DerefXPathFunction for more details.  The JUnit test that exercises this class is under org.eclipse.cosmos.rm.validation.internal.reference.TestDrefXPathFunction.
+
You can download the SML validator and the SMLIF editor from this link
<br/><br/>
+
* http://www.eclipse.org/cosmos/downloads/
The builder used to construct the DOM nodes for phenic documents is now constructed as part of the SAX parsing.  The builder used to construct a DOM document by parsing the document once and walk through the DOM document to extract what was needed.  The new builder avoids the parsing and traversal of the DOM document.
+
  
==== Jan 3rd/2007 update ====
 
With the exception of the 'rule' scenarios, all other workshop interop scenarios are now covered with JUnits.  The main validator can also be executed as a standalone Java application using the following syntax:
 
<p>
 
org.eclipse.cosmos.rm.validation.internal.core.MainValidator ([option][option argument(s)])* &lt;path to XML document&gt;, where available option and arguments are:
 
<ul>
 
<li> -xml &lt;a fully qualified class name&gt; </li>
 
<li> -sml &lt;fully qualified class names separated by a comma&gt; </li>
 
<li> -schematron &lt;a fully qualified class name&gt; </li>
 
<li> -ouptut &lt;path to the output file&gt; </li>
 
</ul>
 
</p>
 
It's recommended to run the class in Eclipse to avoid manually adding the required jar files to the classpath.
 
  
==== Jan 30th/2007 update ====
 
The SML-IF editor is complete.  See the [[CosmosResourceModelingComponent#Implementation (in progress) | implementation]] section to download a copy of the projects.  Defects can be reported using [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Cosmos  COSMOS bugzilla].
 
  
==== Feb 12th/2007 update ====
 
The SML-IF import/export wizards are complete.  See the [[CosmosResourceModelingComponent#Implementation (in progress) | implementation]] section to download a copy of the projects.  As before, defects can be reported using [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Cosmos  COSMOS bugzilla].
 
  
 
[[ COSMOS#Architecture | back to home]]
 
[[ COSMOS#Architecture | back to home]]
 +
[[Category:COSMOS_Resource_Modeling]]

Latest revision as of 14:28, 19 March 2009

COSMOS Main Page >

Resource Modeling

Note: this content is mostly deprecated, but gives some insight to the original intent of the Resource Modeling component. This material should be rewritten to provide a new overview of the component, and should be linked from the www.eclipse.org/cosmos.

For more documents on the Resource Modeling component, see the category linked at the bottom.

Next Meeting

Friday 4/26/07 @ 2 pm EST. Call in:

   US/Canada:  +1.866.432.9903    United Kingdom:   +44.20.8824.0117
   India:      +91.80.4103.3979   Germany:          +49.619.6773.9002
   Japan:      +81.3.5763.9394    China:            +86.10.8515.5666

Meeting ID: 2212212

If we need web conferencing: http://meetingplace.cisco.com/join.asp?22122121

Meeting Minutes

Scope and Mission

In most tools that monitor resources there is an awareness of some of the more static features of a resource; for example the physical location and the IP address, in addition to the actual data being extracted from the resource is often known. Yet each tool has its own representation of this information. With the growing presence of distributed and componentized applications this information also includes the overall topology of the application. This is redundant information between the tool used to debug a performance bottleneck and the tool that is used to deploy components of the application, or the tool that is doing load testing and monitoring of the application. The Resource Modeling sub project goal is to address this redundancy by helping to build a canonical representation of these resources.

The COSMOS Resource Modeling sub-project aims to provide support for building a common model to represent the information being shared in a system management scenario. The project is proposing to use SML as the xml schema language to define this common model. The SML-IF interchange format will be used to share model components between the tools involved in a system management activity.


To that extent, the COSMOS Resource Modeling sub-project is focused on the following deliverables:

  • Tooling for validating SML instances and SML-IF documents
  • Tooling for importing/exporting SML-IF documents to and from predefined repositories.
  • Tooling for creating SML template documents
  • Tooling for creating domain models based on existing SML templates

For information regarding SML look here.

Integration with other Eclipse projects

The Resource Modeling workgroup is proposing to investigate which Eclipse projects are offering XML editors or schema validation and work together to create a common scenario to make Cosmos and these projects interact and complement each other.

WTP has been identified as one of the projects offering xml schema and instance validation. The action is available for any document with the extension XML and XSD (right click and select Run Validate or Validation XML File action). A good usability scenario would require extending these actions with SML extra validation and not providing new validate actions on an xml or xsd resource. Since this may require working with the WTP team to define a common scenario and the set of extensions required to hook in SML validation, this may not be a viable delivery for the first release of Cosmos. This should not stop us from starting the collaboration with WTP (and any other projects) with the goal of identifying required API and extension points for making this happen.

Project Deliverables

Tooling for validating SML instances and SML-IF documents

  • Target date for this item: March 07.


The validator should be fully functional by the end of the COSMOS 1.0 , June 07

  • Provide a common interface for handling and reporting errors
  • SML validation
    • Provide a common interface for handling and reporting errors
    • A default implementation for the XML validation phase
    • A default implementation for the SML extension validation phase
    • A default implementation for the Schematron validation phase, which will include displaying results to a predefined output based on report/assertion conditions
    • Create a default validation scheme for the SML extensions: sml:acyclic, sml:targetElement, sml:targetType, sml:key, sml:unique, and sml:keyref
  • SML-IF validation
    • A default implementation for the XML validation phase
    • A default implementation for the Schematron validation phase in the context of an SML-IF document; includes displaying results to a predefined output based on report/assertion conditions
  • Apply the SML validation extension in the context of an SML-IF document: sml:acyclic, sml:targetElement, sml:targetType, sml:key, sml:unique, and sml:keyref
  • An implementation of RFC 3986 to resolve inter-document references within an SML-IF document
  • Verify that the SML and SML-IF validation implementations cover the test cases of the SML workshop scenario


Tooling for importing/exporting SML-IF documents to and from predefined repositories

  • Target date for this item : March 07


An SML-IF document can be formed from a project by selecting export from the context menu of one or more resource that appears under a project. The operation will determine the genic or phenic documents based on a registered content type that describes each type of the document. The user will have the option of changing the document type (i.e. genic/phenic) if a unit’s type is incorrectly assigned. The export operation will be integrated with Eclipse’s export wizard under the category: “Service Model Language”.

The user can also import an SML-IF model into its units using the import operation. The import operation will simply divide up an SML-IF document into individual genic and phenic documents and store them in a desired target folder. The import operation will be integrated with Eclipse’s import wizard under the category: “Service Model Language”.

Ideally an import operation followed by an export operation should generate a file that is semantically equivalent to the original file imported. Unfortunately there is some loss of data when an SML-IF document is broken into its respective SML model units. For example, the aliases associated with a document or schematron rule bindings are not preserved in SML model units. To preserve this information, a meta-data file is generated with every SML-IF document import. Using the meta-data, the user can perform an export operation that will result in a file that is semantically equivalent to the original SML-IF document imported. Validation can be done at a project, folder, or a unit level. To validate an entire model the user can select validate from the context menu of a project. Alternatively the user can validate a subset of the model by selecting validate from the context menu of a parent folder or a set of model units.

A more detailed document describing import and export implementation and extension points is attached below. http://wiki.eclipse.org/images/a/ae/SML-Validation-v7.pdf



Tooling for creating SML template documents

  • Target date for this item: post June 07


An SML template document is an SML instance defining a common pattern that can be re-used and adapted in different domain models. The project is proposing to offer an extendable tool which allows users to easily create SML templates. The tool will be based on GEF and will provide drag and drop capabilities for creating templates.



Tooling for creating domain models based on existing SML templates

  • Target date for this item: post June 07


The project is proposing to offer an extendable tool which allows users to easily create SML instances based on SML templates. The tool will be based on GEF and will provide drag and drop capabilities for building the instances. The SML instances will be possibly created using SML templates, built using the SML templates builder.

The tool should be extendable to allow registration of third parties SML templates.

Open Issues

The SML, SML-IF standards are in an emerging phase so they are not completely defined yet. This will require for the Resource Modeling sub-project, as well as the COSMOS project as a whole, to continue synchronizing with the latest specifications. For example, the SML and SMLIF validators will need to be updated as soon as the specification changes.

Useful links

SML and SMLIF specifications

SMLIF validation design document

The following attached document describes the validation of SML/SML-IF documents. It also includes description of embedded editors in Eclipse

Link to a detailed overview of the SML validation implementation

Download page

You can download the SML validator and the SMLIF editor from this link



back to home

Back to the top