The LC (Last Call) versions of the SML specifications were published at the W3C website today. This is an important milestone in the journey towards getting the specifications approved as a W3C Recommendation, but a lot of work still remains to be done. The LC versions are available at the following URLs:
SML specification
SML-IF specification
The SML WG is now soliciting public review of these specificiations, and seeking feedback and comments. The last date for submitting comments to the WG is March 26, 2008, and instructions for submitting the comments are available here. This is your chance to influence the SML standardization effort - please review the specifications and send your comments.
The first face-to-face meeting of the SML WG in W3C was held at Redmond last week. I found the meeting to be very useful and productive – the SML and SML IF specifications were thoroughly reviewed and several important issues were raised for consideration. The full list of issues and bugs found during the face-to-face is available here. Any issues/bugs that you would like to bring to the attention of the SML WG should be entered in Bugzilla (Instructions for using Bugzilla are available at the public web page of SML WG).
Yours truly also gave a presentation on SML to the members of the WG. It is available here.
| |
|
|
"SML promises common language for systems management" by Christina Torode discusses the SML standardization effort and the use of SML for IT services management. Technical leaders at Microsoft, IBM, and W3C were interviewed by Christina, and the article contains their thoughts and perspectives on SML. The article does have a minor error, but it is important to point it out. It labels SML as a "programming language" which is not correct. SML is simply an extension of XML Schema. It is not a programming language. | |
W3C has announced the formation of the Service Modeling Language WG. John Arwe (IBM) and I will be the co-chairs of this WG, and the charter of the WG is available here. This WG will be responsible for producing the W3C Recommendations for SML. The first face-to-face meeting of this WG will be held in “sunny” Redmond during June 11-13. Please consider joining this WG if you are interested in defining the W3C Recommendations for SML.
Building models that capture the desired state of modeled systems is an important use case for SML. In addition to using the schema-based constraints supported by XML Schema, SML models can also use SML’s schema-based constraints on inter-document references and Schematron-based constraints. I am going to discuss the use of Schematron-based constraints in this post.
You should use Schematron-based constraints if
1. You want to define constraints that can’t be expressed using schema-based constraints. E.g.,
a. Your model for a Computer contains two elements: FirewallEnabled and SecurityLevel, and you want to define a constraint that specifies that if SecurityLevel=”High” then FirewallEnabled=”true”
b. Your model for a DataCenter has references to the Computer instances in the data center, and you want to define a constraint that specifies that FirewallEnabled=”true” for all computers in a data center
SML supports this case by allowing Schematron constraints to be embedded in the xs:annotation/xs:appinfo child element of complex type and element definitions.
2. You want to define constraints outside of the schema documents, i.e., without creating new schema documents or modifying existing schema documents. The schema-based constraints in XML Schema and SML can only be defined in a schema documents, and these constraints apply to all instances of the type/element definition for which they are defined. To see this, consider the example where your ISV has provided you with an SML model of Computer, and you want to define constraints that represent your IT policies for computers used by Sales, Finance, HR, Engineering etc. These policies may change based on business and regulatory requirements, and you may want to apply multiple policies to the same computer. Even if you were willing to create new subtypes of Computer, you’ll run into the limitations of single inheritance and the resulting type explosion. SML supports this by allowing Schematron constraints to be defined in separate Schematron documents and binding these Schematron documents to one/more documents in an SML model. Note that in this specific example, you will have to create a new SML model that adds the new Schematron documents corresponding to your IT policies and bind these documents to the Computer instance documents for Sales, Finance, HR, etc.
3. You want to define a constraint with your own error message (possibly with insertion arguments). E.g., you want the following error message “Firewall is not enabled on Computer <name>”. SML doesn’t do anything special for this case – you get it for free with Schematron J
The ability to define Schematron constraints outside of schema and selectively/dynamically bind them to one/more documents in a model is very powerful since it allows new constraints to be applied to one/more documents in a model without the need to create new types. It allows you to define multiple and potentially overlapping subsets of documents in your model, and apply specific constraints to each subset. I expect that this feature will be extensively used in the IT service management scenarios where IT administrators want to define target different policies to different instances of the same type.
So how do you define these dynamic bindings in your SML model? The SML specification allows implementations to choose suitable mechanisms for dynamic binding, but does not mandate the use of any specific mechanism. The SML IF specification does define a standard mechanism for the interchange of dynamic binding information in a model, and I expect that most implementations will use the SML IF mechanism (or a mechanism which maps cleanly to the SML IF mechanism). To illustrate this mechanism, let’s assume that all Computer instances in our SML model have the following aliases (a document alias is basically a URI):
· Computer instances in Sales – alias begins with “/Instances/Computer/Sales”
· Computer instances in Finance – alias begins with “/Instances/Computer/Finance”
SML IF allows a document to have multiple aliases, so it is possible that a Computer instances may have two aliases - /Instances/Computer/Sales/commission.xml and /Instances/Computer/Finance/payout.xml
Further, let’s assume that the Schematron documents that capture the policies for Sales and Finance computers have the following aliases
· Sales policies - alias begins with “/Schematron/Sales”
· Finance policies - alias begins with “/Schematron/Finance”
The following XML fragment (based on SML IF) shows how these policies can be dynamically bound to computer documents
<ruleBindings>
<!-- Bind all constraints defined in Schematron documents
whose alias begins with /Schematron/Sales to all
computer documents whose alias begins with
/Instances/Computer/Sales-->
<ruleBinding>
<documentAlias>
/Instances/Computer/Sales
</documentAlias>
<ruleAlias>
/Schematron/Sales
</ruleAlias>
</ruleBinding>
<!-- Bind all constraints defined in Schematron documents
whose alias begins with /Schematron/Finance to all
computer documents whose alias begins with
/Instances/Computer/Finance-->
<ruleBinding>
<documentAlias>
/Instances/Computer/Finance
</documentAlias>
<ruleAlias>
/Schematron/Finance
</ruleAlias>
</ruleBinding>
</ruleBindings>
Once you have defined the above bindings in your SML model, you can apply the desired policies to a Computer document by assigning suitable aliases to it. The aliases can be defined when a new document is created, and the aliases can be added/removed during the life of a document. This does not require any changes to your SML model.
The member submission of SML to W3C has been noticed by the press. Here are some links for your reading pleasure. An important caveat before you click on these links: these articles focus on the current and future use of SML for IT services/systems management. You may want to read my previous post before reading these articles so that you do not confuse the SML language with its usage scenarios.
Microsoft heading to next, and most difficult, stage of developing management platform
Computer industry giants back new XML-based IT management spec
W3C looks at Service Modeling Language
IT vendors submit management spec to W3C
Modeling's The Next Big Project on W3C Runway
New Standard Seeks To Allow Services To Talk To Each Other
Group Submits Interoperability Spec to W3C
I frequently encounter the following questions (or their variants)
· How is SML related to CIM?
· How is SML related to DCML?
These questions stem from the misconception that SML is limited to the domain of IT services management. I do realize that some of my earlier posts may have contributed to this misconception by failing to clearly demarcate the use of SML in management-specific scenarios from the features of SML. SML is a domain-neutral language and the two SML specifications do not define any management-specific (or any other domain-specific) feature. SML is based on XML Schema 1.0, XPath 1.0, and Schematron and is as generic and domain-neutral as these XML standards. It defines the following features (all of which are generic and applicable across a variety of domains):
· Typed inter-document references
· Built-in constraints on inter-document references
· deref() – an XPath extension function for navigating inter-document references
· Identity constraints across inter-document references
· Mechanisms for binding Schematron constraints to types, element definitions, and instance documents
That’s it. There are no management specific models or interfaces (like CIM) or a standard schema for representing entities in a data center (like DCML). Sure, SML can be used to define models for entities in data center, web services, deployed software, network routers, etc., but none of this is defined in the SML specifications. The SML specifications focus on defining a what is a valid SML model, how should the constraints and Schematron rules be evaluated, and how the contents of an SML model can be packaged into a single XML document without any loss of fidelity for exchanging SML models across implementations. The domain-neutral nature of SML coupled with its strong alignment with existing XML standards was a major reason for submitting the SML specifications to W3C.
I am delighted to announce that W3C has acknowledged the member submission of the SML specifications and the SML and SML IF specifications are now publicly available at W3C’s web site. Note that this does not mean that these specifications have become W3C Recommendations. We have a lot of work ahead of us to charter and create an SML working group within W3C and start the process to put these specifications on recommendation track.
I am delighted to announce that the SML WG has completed its work and published the final drafts (version 1.0) of the SML and SML-IF specifications. Congratulations to all member organizations and their representatives for doing a remarkable job in finalizing the specs in a short span of eight months!
COSMOS – an open-source project for an SML-based systems management framework has been created at Eclipse. I am very excited about this project (yes that is correct, and I still work at Microsoft). This project will enable the open-source community to leverage the power of SML and it is a great example of how an emerging standard like SML can create better interoperability between vendor-proprietary and open-source software. A quick look at COSMOS’ project creation slide deck reveals that it will deliver a framework for creation, display, and validation of SML models, and a framework for discovering data from real-world resources, populating models with discovered data, and persistence of models.
In this post, I am going to use a very simple example to illustrate how SML can be used to capture desired configuration in an IT environment. Suppose that Alice - an IT administrator - wants to secure the deployment of payroll application in her datacenter. Alice determines that the best way to secure the deployment is to require that the firewall must be enabled on the machines on which the payroll application is deployed. She now wants to define this policy/rule in SML so that she can use the SML-based management tool from her favorite vendor to verify compliance.
Let’s assume that the operating system vendor has already defined the following types for operating system and application (Alice could define these, but we don’t want her to do too much work in this example). We’ll also assume that all types in this example are defined in a single XML namespace – represented by the alias ex – and use the alias sml for the SML namespace and the alias sch for the Schematron namespace.
<xs:complexType name="OperatingSystemType">
<xs:sequence>
<xs:element name="Name" type="xs:string"/>
<xs:element name="FirewallEnabled" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ApplicationType">
<xs:sequence>
<xs:element name="Vendor" type="xs:string"/>
<xs:element name="Version" type="xs:string"/>
<xs:element ref="ex:HostOSRef"/>
</xs:sequence>
</xs:complexType>
The ex:HostOSRef element represents the hosting relationship between an application and an operating system and is defined as follows:
<xs:element name="HostOSRef" type="sml:refType"
sml:targetType="ex:OperatingSystemType"/>
Note that the above definition uses the sml:targetType constraint to require that the type of the element targeted by an instance of ex:HostOSRef must be ex:OperatingSystemType.
Now Alice can use the above definitions to define a global element that represents the payroll application deployments in her data center and embed a Schematron constraint that requires the firewall to be enabled on the host operating system.
<xs:element name="SecurePayrollApplication" type="ex:ApplicationType">
<xs:annotation>
<xs:appinfo>
<sch:schema>
<sch:ns prefix="smlfn"
uri="http://schemas.serviceml.org/sml/function/2006/07"/>
<sch:pattern id="Firewall">
<sch:rule context=".">
<sch:assert test=
"smlfn:deref(HostOSRef)/ex:FirewallEnabled='true'">
Firewall is not enabled on the host operating system
</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>
</xs:appinfo>
</xs:annotation>
</xs:element>
By embedding the Schematron constraint in the definition of the SecurePayrollApplication, Alice has ensured that the constraint will be evaluated for all instances of SecurePayrollApplication, and the embedded error message will be generated when the test expression evaluates to false. Suppose that P is an element instance of SecurePayrollApplication and O is its host operating system instance. Then the assert expression gets evaluated for P as follows:
smlfn:deref(HostOSRef) – results in O
/ex:FirewallEnabled=’true’ is evaluated in the context of O
This post is devoted to summarizing the two key changes (aka “what’s new”) in the second draft of the SML specification.
Schema-less identification of references: Reference elements are now normatively identified by setting the sml:ref global attribute to true; an element is a reference element if and only if it has sml:ref=”true”. The sml:ref type in the first draft of the SML specification has been renamed to sml:refType and its definition has been changed to ensure that sml:ref=”true” for all elements whose type is sml:refType. The schema-based constraints on the target of references (such as sml:targetType) are still supported on elements whose type is sml:refType. This change enables efficient implementation of the deref() function without requiring access to the schema information (aka PSVI).
sml:targetRequired: This new global attribute can be used to specify that the target of a reference must always exist, i.e., the reference cannot dangle or be null. It provides a convenient shorthand notation for a common constraint which required a Schematron assert/report in the first draft of the specification.
The SML XSD has been updated to include the above changes.
Lewis Curtis explains the benefits of using SML for modeling the structure and policies for data centers in his recent blog post. This excellent post has two errors:
· It uses the term “System Modeling Language” instead of “Service Modeling Language”
· It conveys the impression that only Microsoft is promoting SML. Sure, Microsoft is promoting SML, but the effort to standardize SML is being driven by eleven industry leaders: BEA, BMC, CA, Cisco, Dell, EMC, HP, IBM, Intel, Microsoft, and Sun.
You'll notice that the SML WG has published a new specification together with a new version of the SML specification. This specification - called SML Interchange Format (SML IF) - defines a single XML document that can be used to exchange SML models across SML validators or between other consumers of SML models. A quick recap: An SML model is a set of XML documents - XML Schema documents that may use SML extensions, Schematron documents containing rules, and XML instance documents. The SML IF specification defines how all of these documents can be packaged in a single SML IF document without any loss of fidelity. The SML IF specification enables interoperability between different implementations of SML since all conforming implementations must be able to produce and consume SML IF documents. Note that there is no requirement that a model in SML IF document is complete or valid - incomplete/invalid models are allowed to enable scenarios where a producer sends an incomplete model to a consumer so that the consumer can integrate this model with some other model(s) to produce a complete model.
Configuration Management Database Federation (CMDBF) is an important scenario for the use of SML IF. Microsoft has announced its participation in the multi-vendor CMDBF WG and also announced the private beta of the Service Desk product. The CMDB in Microsoft's Service Desk is an SML validator with a persistent store for the models. The use of SML allows the Service Desk CMDB to define the structure of various configuration items, their relationships, and the policies/constraints that govern the desired state of these configuration items. The use of SML IF will enable rich interchange of configuration item data between two (or more) CMDBs since the SML IF will enable the exchange of relationships and policies/constraints in addition to the structure/data of the configuration items.
BTW, all test cases for the interop workshop are expressed as SML IF documents. So you have several examples of IF documents to help you ramp up on the specification.
The SML WG continues to make good progress and has announced that the SML Interop Workshop will be held on Jan 16-17 at Austin, Texas. The primary goal of the workshop is to conduct interop testing between different implementations of SML validators. The workshop is open to the community - anyone can participate provided that they bring an implementation of SML validator to the workshop and have executed the SML Interop Feedback Agreement. The WG has published the 2nd draft of the SML specification and the first draft of the SML interchange format (SML IF) specification that defines a format for interchange of SML models across validators. These specifications and the full details for the Interop Workshop are available at http://serviceml.org/