Andrea Westerinen Software Architect Server and Tools Division

  • Slides: 26
Download presentation
Andrea Westerinen Software Architect, Server and Tools Division Service Modeling Language Understanding the Platform

Andrea Westerinen Software Architect, Server and Tools Division Service Modeling Language Understanding the Platform

Model-Based Management Need: 1. Language for model defn - SML 2. Model defn with

Model-Based Management Need: 1. Language for model defn - SML 2. Model defn with constraints – Model Library 3. Infrastructure to make it real – MS Runtime and model library SML Runtime Common Models Real-World System Model Instances Discovery updates SDM instances User Change Validate Change Request Model Updated Synchronization updates real-world systems

What is the Language? • Service Modeling Language (http: //www. serviceml. org) • An

What is the Language? • Service Modeling Language (http: //www. serviceml. org) • An XML Schema based language providing constructs for modeling the elements in complex IT services and systems, their relationships and constraints • • Profile of XML Schema 1. 0 is used for defining structural aspects Profile of Schematron is used for defining constraints • Schematron is an ISO/IEC standard (http: //standards. iso. org/ittf/Publicly. Available. Standards/c 040833_ISO_IEC_19757 -3_2006(E). zip) • SML Interchange Format (SML IF) defines an XML serialization format • Defines a container XML document for all definitional and/or instance documents of a model • Designed to facilitate the exchange of SML model data, preserving content and relationship data

What is Added to XML Schema? Inter-Document References and Their Constraints • • sml:

What is Added to XML Schema? Inter-Document References and Their Constraints • • sml: ref – A complex type with open content model for representing references SML defines URI and EPR schemes (using an sml: uri element and a wsa: Endpoint. Reference element) • sml: acyclic: A reference cannot result in cycles • Scenario: A reference that represents installation dependencies between software applications • sml: target. Type and sml: target. Element: Constrains the reference’s target to a specific type or element • Scenario: The target of a installation dependency reference must be of type Appl. Type or element Appl • sml: key, sml: unique, and sml: keyref: Extends xs: key, xs: unique, and xs: keyref to inter-document references • Scenario: A data center document has references to documents corresponding to servers in the data center, and the modeler wants to ensure that all servers in a data center have unique names

What is Added to XML Schema? Schematron Rules pattern – ordered set of related

What is Added to XML Schema? Schematron Rules pattern – ordered set of related rules rule – defines context for a set of asserts and reports • Schematron is an ISO/IEC standard for defining assertions on a set of XML documents • Uses XPath 1. 0 as the default query binding but other languages such as XPath 2. 0, XQuery, XSLT, etc. supported • assert SML augments XPath 1. 0 with various extension functions such as deref() and conventions: • “Laws of physics” embedded in the xs: appinfo child element of a type definition or global-element definition • Other Schematron documents (evaluationspecific, “temporary” rules) in definitional section of SML IF report • Note that basic XSD facets are still very useful and performant!

Schematron Example (1 of 2) <xs: complex. Type name="IPAddress. And. Prefix. Type" tns: version="1.

Schematron Example (1 of 2) <xs: complex. Type name="IPAddress. And. Prefix. Type" tns: version="1. 0. 0. I 20070226" tns: experimental="true"> <xs: annotation> <xs: documentation>Data defining an IP address (either IPv 4 or v 6). </xs: documentation> <xs: appinfo> <sch: schema> <sch: ns uri="http: //schemas. microsoft. com/sdm/modellib/core/2005/09" prefix="core"/> <sch: ns uri="http: //schemas. microsoft. com/sdm/functions/2006/02" prefix="sdmfn"/> <sch: pattern id="Valid. IPPrefix. Length"> <sch: rule context=". "> <sch: report test="count(IPv 4 Address)=1 and IPPrefix. Length > 32" sdm: severity="error"> The instance with id <sch: value-of select="string(ancestor: : *[sdmfn: is. Element(. , '*', 'core: Base. Type')]/core: Client. Instance. Id)"/> has an IPv 4 address with a prefix length greater than 32. </sch: report> </sch: rule> <sch: rule context=". "> <sch: report test="count(IPv 6 Address)=1 and IPPrefix. Length > 128" sdm: severity="error"> <!– Similar to above --> </sch: report> </sch: rule> </sch: pattern> </sch: schema> </xs: appinfo> </xs: annotation> …

Schematron Example (2 of 2) <xs: sequence> <xs: choice> <xs: element name="IPv 4 Address"

Schematron Example (2 of 2) <xs: sequence> <xs: choice> <xs: element name="IPv 4 Address" type="tns: IPv 4 Address. Type" nillable="true"/> <xs: element name="IPv 6 Address" type="tns: IPv 6 Address. Type" nillable="true"/> </xs: choice> <xs: element name="IPPrefix. Length" type="xs: short" nillable="true" min. Occurs="0"/> </xs: sequence> </xs: complex. Type> <xs: simple. Type name="IPv 4 Address. Type" tns: version="1. 0. 0. I 20070226" tns: experimental="true"> <xs: restriction base="xs: string"> <xs: pattern value="(d{1, 3}. ){3}d{1, 3}"/> </xs: restriction> </xs: simple. Type> <xs: simple. Type name="IPv 6 Address. Type" tns: version="1. 0. 0. I 20070226" tns: experimental="true"> <xs: restriction base="xs: string"> <xs: pattern value="([0 -9 a-f. A-F]{1, 4}: ){7}[0 -9 a-f. A-F]{1, 4}"/> <xs: pattern value="[0 -9 A-Fa-f]{1, 4}((: |: : )[0 -9 A-Fa-f]{1, 4}){0, 6}(: : |((: |: : )[0 -9 A-Fa-f]{1, 4}))"/> <xs: pattern value="[0 -9 A-Fa-f]{1, 4}((: |: : )[0 -9 A-Fa-f]{1, 4}){0, 5}: (d{1, 3}. ){3}d{1, 3}"/> </xs: restriction> </xs: simple. Type>

What is the Model Definition? • A model library or ontology • An abstraction

What is the Model Definition? • A model library or ontology • An abstraction of the entities that (may) exist in the managed environment, their states and their relationships • Defines the rules by which these entities may be combined, used, asserted and queried • Abstraction and rules together dictate how information is shared, reasoned against and used • Address today’s management environment problems • Result of individually designed, product-specific “models” • No need for translation of concepts • Reduction of errors of interpretation and omission

Goals of the Microsoft Model Library • Policy Role Mgmt Config Mgr Service Desk

Goals of the Microsoft Model Library • Policy Role Mgmt Config Mgr Service Desk … Security Visual Studio • Ops Mgr • Group Policy, Config Mgr Visual Studio + Dev Tools Policy, Desired Config Role Mgmt Tool Software/ Functional Roles Service Desk • Code/ Business Core Concepts Implementation (Hardware, Software, (Licensing, Data Softw. Library) relationships…) Security Products (Credentials, Permissions, …) Health, Service Level Creation/communication of knowledge and content about hardware, software, data and business processes • Designed for IT/business management vs Ops Mgr + Monitoring instrumentation definition Consistent semantics for ease of use and reuse of management data and knowledge Management of heterogeneous business environments with the perspectives of time and intent Unification of the management tool technologies within Microsoft • Publication and consumption of a single set of semantics, addressing all stages of the development, deployment and operations lifecycle • Definition of a middle ground between standard semantics and domain-specific languages

Contents of the Model Library • Schema Constraint Defns • Also includes: Patterns XML

Contents of the Model Library • Schema Constraint Defns • Also includes: Patterns XML Schema + Schematron Docs Patterns for Use and Extension Guidelines And Docs • • A set of XML types/elements representing what could, does or did exist in the real world and its related data and constraints Patterns/rules by which these elements are defined, used and extended Supporting guidelines and docs Validation tooling Tooling English and Instance Docs, Tools • • • Communities, Standards Establishing knowledgeable communities within Microsoft and across our partner and customer base Standardizing and evangelizing the Model Library

Model Design Based on Separation of “Aspects” • • Basic entity definition • Application/software

Model Design Based on Separation of “Aspects” • • Basic entity definition • Application/software systems, modules, constraints, … • Computers and their assembly from deployed hardware/software • Security entities (classifications, roles, permissions) • Data and repositories (what and where) • Interfaces, scripts, jobs • Communication entities (endpoints and links) • Settings/knobs, and health and statistics data • Business contracts (software licenses, warranties, SLAs, …) • … Entities defined as separate types (i. e. , independently instantiated and referenced, versus embedded) if: • Instance data applicable to (reused for) multiple entities • Lifetimes or security of entities are different

References and Relationships • Equal focus on reference/relationship semantics as on core elements •

References and Relationships • Equal focus on reference/relationship semantics as on core elements • Assignment • Functional Dependency and Hosting • Including meta-data related to propagation of health, maintenance, … • Where Hosting has additional lifetime implications • Aggregation and Composition (Parent/Child specializations) • Where Parent/Child references have lifetime implications • … • • • SML defines references (with cardinalities as min/max. Occurs) Model Library adds “inverse. Of. Reference” meta-data Reference-oriented model supports “relationships” via: • Explicit inverse. Of meta-data -and/or • Definition of explicit relationship types where the relationship type contains the individual references (I. E. , a UML “association class”)

Example of Multiple “Aspects” – Software Modeling Application/ Software Systems IT and Business Architect,

Example of Multiple “Aspects” – Software Modeling Application/ Software Systems IT and Business Architect, Developer Software Structure and Implementation Technology “Types” Data capture from Visual Studio Increasing # of instances IT Operations Deployable Instances (Planning and Packaging) Data capture from packaging tools and forensically Deployed Instances (Config and Deployment) Running Instances (Activation, Testing, Mgmt) Data capture from Ops. Mgr and Config. Mgr

Model Library Concepts • Business Requirements • Mission and Goals • Function • Capabilities

Model Library Concepts • Business Requirements • Mission and Goals • Function • Capabilities • Business Processes • Roles • Rules • Actions, Flows • Scenarios • Conceptual Data • Entities • Relationships • Rules • Vocabulary • Contracts • SLA’s • Information Flow • Legal Reqmts • Single and Composite Application Development • System Context • Applications, Modules • Software. Item, Hardware. Item, Item. Catalog • Endpoints, Connections • Components/Manifest (Vendor, Version, …) • Req’ed Resources • Configuration • Data and Repositories • Deployed. Software • Scheduling • Settings • Hosting System/Software • Deployment Reqmts • Constraints • Configurations • Licensing Implications • Health data • Connectivity • Policy • Licensing, Product Key • Security • Activation Data, … • Transactional • Implementation Details • Taking into account • Deployment • Test Cases • Networks • Operational • XSD Schemas • Physical Servers • Code • Data Center Design • Database Designs • Forms • Operation and Monitoring • Configurations • Functional. Entities Dev artifacts of today • Events • Health and Performance Scattered over the enterprise • SLA’s Today

Challenges Addressed in the Model Library Design • Flexibility vs patterns • Model complexity

Challenges Addressed in the Model Library Design • Flexibility vs patterns • Model complexity • Real world vs instance identity • Multiple facets of an entity • Incremental discovery • Library evolution and versioning • Capturing current, future and historical data • …

Use and Extension of the Model Library • • • Developers use and extend

Use and Extension of the Model Library • • • Developers use and extend the model types/elements and define instances + instrumentation • If constructs exist in the Model Library or extension schemas – Use directly • Otherwise, extend in team-specific schema or via extension to Model Library • Also need mapping to/from instrumentation levels such as CIM and SNMP For example, dev team A can use a Deployed. Software element declaration “asis” and extend the Setting. Data. Type to define specific “knobs” Ops and admins focus on model instances as accessed through tools, scripts and CLI Read and operate against model instances, define new instances +update values For example, operator “Joe” reviews health state and stats of an application and updates the values of the “configurable knobs” to tune it • Updates are validated against constraints (Schematron rules) before being put into the “real world”

What is the Infrastructure? SML Client Application SML Client API Sync Discovery WMI Registry

What is the Infrastructure? SML Client Application SML Client API Sync Discovery WMI Registry File Script. NET assembly SQL IIS metabase Environment variables AD MSI Certificate +… SML Runtime Document Collection Organizes documents in a file-system like hierarchy and provides path-based addressing SQL-store session SQL 2005 Stores SML instances as XML data in SQL Server

SML Client APIs • Enable applications to access, create, and modify documents in a

SML Client APIs • Enable applications to access, create, and modify documents in a document collection • Add, retrieve, delete/update documents • Execute queries • W 3 C-style validation of documents • Schematron and SML-specific constraint validation • Test update: Verifies if the pending updates can be successfully applied to the document collection but does not update it • Commit changes: Validates that updates can be applied and then commits them • Based on XLinq • A clean and simple XML API for. NET languages • Part of the Language Integrated Query (LINQ) extensions, available in C# 3. 0 and VB 9. 0

More Detail on the SQL Store (1 of 2) SML Client Process SQL Session

More Detail on the SQL Store (1 of 2) SML Client Process SQL Session Cache SQL-based SML Store SML Client Process SQL Session Cache SQL-based SML Store

More Detail on the SQL Store (2 of 2) • Sessions provide mechanism for

More Detail on the SQL Store (2 of 2) • Sessions provide mechanism for client to interact with the SML SQL Store • Loosely coupled client-side cache of documents (documents explicitly retrieved, updates not automatic, cache not updated to stay in sync) • Allows the client to query SML store, create new documents, and modify documents • Supports change tracking • Supports on-demand transactional updates to SML store • At any time, the SML client can • Revert the pending updates made to the cache • Submit a test update to verify if the pending updates can be successfully applied to the SML store • Submit an update request to apply the pending updates to the SML Store • Transactional update using optimistic concurrency control

Use of SML in Microsoft Today • Server Manger tool in Windows Server “Longhorn”

Use of SML in Microsoft Today • Server Manger tool in Windows Server “Longhorn” • SML models of “in the box” server roles are used for installation, configuration, and on-going management of these roles via Document Collection processing • Desired Configuration Monitoring (DCM) feature in SCCM (Config. Mgr) 07 • SML models are used to define and verify the desired configuration of machines via Document Collection processing • Configuration Management Database in Service Desk v 1 • Uses the SML-based Microsoft Model Library and the SQL store for defining and storing the past, present, and future planned configuration of IT assets in an enterprise • Much other work in development

Possible Use of SML in Microsoft Tomorrow

Possible Use of SML in Microsoft Tomorrow

Workshop

Workshop

Workshop Approach • Introductions and a few words about what you want to get

Workshop Approach • Introductions and a few words about what you want to get out of this workshop • If you want to remain in contact, just email andreaw@microsoft. com • 3 -4 groups to discuss issues in managing and integrating development, deployment, and operations • What are the problems? • What is the necessary data? • What is the ideal world? • (Example on the following slides, feel free to change as you see fit) • Prioritize the lists and discuss how we could address them • More complete analysis will be posted to the AIC blog after the conference

Example - Application and Deployed Software Structure Catalog Awards Cart Golf. Catalog. Admin Golf.

Example - Application and Deployed Software Structure Catalog Awards Cart Golf. Catalog. Admin Golf. Catalog. DB Golf. Catalog. Service Golf. Shop Golf. Store Deployable Golf. Catalog Service Deployable Golf. Shop IIS Secure. App. Server SQLServer Deployment: Golf. Store USSales. Web. Hosting Windows SQLServer Public. Web. Server Windows Business. Data. Server USSales. Web. Hosting Deployable Golf. Catalog DB Windows

Loadalancer/Firewall Example - Logical, Physical and Environmental Structures Ph ys ic al En (P

Loadalancer/Firewall Example - Logical, Physical and Environmental Structures Ph ys ic al En (P viro ow nm er, en C t oo lin g, Pod Mngt & NW … ) Cluster 1 is the Public. Web. Server Cluster 2 hosts the Secure. App. Server and Business. Data. Server po d s w ith se rve rs, ne Cluster 2 allocated on demand from Pods tw ork , s tor ag e SLAs guarantee uptime, availability and repair times for the computers and enclosures from the manufacturer