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

Andrea Westerinen Software Architect, Server and Tools Division

  • Upload
    chi

  • View
    25

  • Download
    3

Embed Size (px)

DESCRIPTION

Andrea Westerinen Software Architect, Server and Tools Division. Service Modeling Language Understanding the Platform. Model-Based Management. Real-World System. SML Runtime. Need: 1. Language for model defn - SML 2. Model defn with constraints – Model Library - PowerPoint PPT Presentation

Citation preview

Page 1: Andrea Westerinen Software Architect, Server and Tools Division

Andrea WesterinenSoftware Architect, Server and Tools Division

Service Modeling Language

Understanding the Platform

Page 2: Andrea Westerinen Software Architect, Server and Tools Division

Model-Based Management

Real-World System

Common Models

Model Instances

User Change Model Updated

Validate Change Request

SML Runtime

Discovery updates SDM instances

Synchronization updates real-world systems

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

Page 3: Andrea Westerinen Software Architect, Server and Tools Division

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/PubliclyAvailableStandards/c040833_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

Page 4: Andrea Westerinen Software Architect, Server and Tools Division

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:EndpointReference element)

• sml:acyclic: A reference cannot result in cycles• Scenario: A reference that represents installation dependencies between

software applications

• sml:targetType and sml:targetElement: Constrains the reference’s target to a specific type or element• Scenario: The target of a installation dependency reference must be of type

ApplType 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

Page 5: Andrea Westerinen Software Architect, Server and Tools Division

What is Added to XML Schema?Schematron Rules

• 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 XPath2.0, XQuery, XSLT, etc. supported

• 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 (evaluation-specific, “temporary” rules) in definitional section of SML IF

• Note that basic XSD facets are still very useful and performant!

assert

report

rule – defines context for a set of asserts and reports

pattern – ordered set of related rules

Page 6: Andrea Westerinen Software Architect, Server and Tools Division

Schematron Example (1 of 2)<xs:complexType name="IPAddressAndPrefixType" tns:version="1.0.0.I20070226" tns:experimental="true"> <xs:annotation> <xs:documentation>Data defining an IP address (either IPv4 or v6).</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="ValidIPPrefixLength"> <sch:rule context="."> <sch:report test="count(IPv4Address)=1 and IPPrefixLength &gt; 32" sdm:severity="error"> The instance with id <sch:value-of select="string(ancestor::*[sdmfn:isElement(., '*', 'core:BaseType')]/core:ClientInstanceId)"/> has an IPv4 address with a prefix length greater than 32. </sch:report> </sch:rule> <sch:rule context="."> <sch:report test="count(IPv6Address)=1 and IPPrefixLength &gt; 128" sdm:severity="error">

<!– Similar to above --> </sch:report> </sch:rule> </sch:pattern> </sch:schema>

</xs:appinfo> </xs:annotation> … …

Page 7: Andrea Westerinen Software Architect, Server and Tools Division

Schematron Example (2 of 2)

<xs:sequence> <xs:choice> <xs:element name="IPv4Address" type="tns:IPv4AddressType" nillable="true"/> <xs:element name="IPv6Address" type="tns:IPv6AddressType" nillable="true"/> </xs:choice> <xs:element name="IPPrefixLength" type="xs:short" nillable="true" minOccurs="0"/> </xs:sequence></xs:complexType><xs:simpleType name="IPv4AddressType" tns:version="1.0.0.I20070226" tns:experimental="true"> <xs:restriction base="xs:string"> <xs:pattern value="(\d{1,3}\.){3}\d{1,3}"/> </xs:restriction></xs:simpleType><xs:simpleType name="IPv6AddressType" tns:version="1.0.0.I20070226" tns:experimental="true"> <xs:restriction base="xs:string"> <xs:pattern value="([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}"/> <xs:pattern value="[0-9A-Fa-f]{1,4}((:|::)[0-9A-Fa-f]{1,4}){0,6}(::|((:|::)[0-9A-Fa-f]{1,4}))"/> <xs:pattern value="[0-9A-Fa-f]{1,4}((:|::)[0-9A-Fa-f]{1,4}){0,5}:(\d{1,3}\.){3}\d{1,3}"/> </xs:restriction></xs:simpleType>

Page 8: Andrea Westerinen Software Architect, Server and Tools Division

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

Page 9: Andrea Westerinen Software Architect, Server and Tools Division

Goals of the Microsoft Model Library

• Creation/communication of knowledge and content about hardware, software, data and business processes• Designed for IT/business management vs

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

Role MgmtService DeskPolicy

Visual Studio Security

Config Mgr

Ops Mgr

Core Concepts(Hardware, Software,

relationships…)

Code/Implementation

Data

Business (Licensing,

SoftwLibrary)

Security(Credentials,Permissions,

…)

Health,Service

Level

Policy,DesiredConfig

Software/Functional

Roles

GroupPolicy,Config

Mgr

RoleMgmtTool

VisualStudio + Dev Tools

ServiceDesk

SecurityProducts

Ops Mgr+

Monitoring

Page 10: Andrea Westerinen Software Architect, Server and Tools Division

Contents of the Model Library

• 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

• Also includes:• Establishing knowledgeable communities

within Microsoft and across our partner and customer base

• Standardizing and evangelizing the Model Library

Schema

Constraint

Defns

Guidelines

And Docs

Patterns

Patterns for Use and Extension

Tooling

XML Schema + Schematron Docs

English and Instance Docs, Tools

Communities, Standards

Page 11: Andrea Westerinen Software Architect, Server and Tools Division

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

Page 12: Andrea Westerinen Software Architect, Server and Tools Division

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/maxOccurs)• Model Library adds “inverseOfReference” meta-data• Reference-oriented model supports “relationships” via:

• Explicit inverseOf meta-data -and/or-• Definition of explicit relationship types where the relationship type contains

the individual references (I.E., a UML “association class”)

Page 13: Andrea Westerinen Software Architect, Server and Tools Division

Example of Multiple “Aspects” – Software Modeling

Application/Software Systems

Application/Software Systems

Software Structure and

Implementation

Software Structure and

Implementation

Deployed Instances

(Config and

Deployment)

Deployed Instances

(Config and

Deployment)

Running Instances

(Activation, Testing,

Mgmt)

Running Instances

(Activation, Testing,

Mgmt)

DeployableInstances(Planning

and Packaging)

DeployableInstances(Planning

and Packaging)

Increasing #

of instances

IT and Business

Architect, Developer IT Operations

Data capture from Visual Studio

Data capture

from packaging

tools and forensically

Data capture from

OpsMgr and ConfigMgr

Technology “Types”

Technology “Types”

Page 14: Andrea Westerinen Software Architect, Server and Tools Division

Model Library Concepts

•Business Requirements•Mission and Goals•Function•Capabilities

•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

•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•Endpoints, Connections•Req’ed Resources•Data and Repositories•Settings•Constraints•Health data

•Policy•Security•Transactional•Deployment •Operational

•Single and Composite Application Development

•System Context•Applications, Modules•Endpoints, Connections•Req’ed Resources•Data and Repositories•Settings•Constraints•Health data

•Policy•Security•Transactional•Deployment •Operational

•Implementation Details•Test Cases•XSD Schemas•Code•Database Designs•Forms•Configurations

•Implementation Details•Test Cases•XSD Schemas•Code•Database Designs•Forms•Configurations

•SoftwareItem, HardwareItem, ItemCatalog•Components/Manifest (Vendor, Version, …)•Configuration•Scheduling•Deployment Reqmts•Licensing Implications

•SoftwareItem, HardwareItem, ItemCatalog•Components/Manifest (Vendor, Version, …)•Configuration•Scheduling•Deployment Reqmts•Licensing Implications

•DeployedSoftware •Hosting System/Software•Configurations•Connectivity•Licensing, Product Key•Activation Data, …

•Taking into account•Networks•Physical Servers•Data Center Design

•DeployedSoftware •Hosting System/Software•Configurations•Connectivity•Licensing, Product Key•Activation Data, …

•Taking into account•Networks•Physical Servers•Data Center Design

•Operation and Monitoring•FunctionalEntities

•Events•Health and Performance •SLA’s

•Operation and Monitoring•FunctionalEntities

•Events•Health and Performance •SLA’s

Today

Dev artifacts of today

Scattered over the enterprise

Page 15: Andrea Westerinen Software Architect, Server and Tools Division

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

• …

Page 16: Andrea Westerinen Software Architect, Server and Tools Division

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 DeployedSoftware element declaration “as-is” and extend the SettingDataType 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”

Page 17: Andrea Westerinen Software Architect, Server and Tools Division

What is the Infrastructure?

SML Client Application

SML Runtime

DocumentCollection

SQL-storesession

SQL2005

Sync DiscoverySML ClientAPI

Organizes documents Organizes documents in a file-system like in a file-system like hierarchy and hierarchy and provides path-based provides path-based addressingaddressing

Stores SML Stores SML instances as XML instances as XML data in SQL Serverdata in SQL Server

WMI

Registry

File

Script

.NET assembly

SQL

IIS metabase

Environment variables

AD

MSI

Certificate

+ …

Page 18: Andrea Westerinen Software Architect, Server and Tools Division

SML Client APIs

• Enable applications to access, create, and modify documents in a document collection • Add, retrieve, delete/update documents• Execute queries• W3C-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

Page 19: Andrea Westerinen Software Architect, Server and Tools Division

More Detail on the SQL Store (1 of 2)

SML Client ProcessSML Client Process

SQL SessionSQL Session

SQL-basedSQL-basedSML StoreSML Store

CacheCache

SQL-basedSQL-basedSML StoreSML Store

SML Client ProcessSML Client Process

SQL SessionSQL Session

CacheCache

SQL SessionSQL Session

CacheCache

SQL SessionSQL Session

CacheCache

Page 20: Andrea Westerinen Software Architect, Server and Tools Division

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

Page 21: Andrea Westerinen Software Architect, Server and Tools Division

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 (ConfigMgr) 07

• SML models are used to define and verify the desired configuration of machines via Document Collection processing

• Configuration Management Database in Service Desk v1

• 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

Page 22: Andrea Westerinen Software Architect, Server and Tools Division

Possible Use of SML in Microsoft Tomorrow

OpsMgr (MOM)

ConfigMgr (SMS)

Operational data:events, alerts, perf

Asset data:managed

entities

Operational data:DSL (definitive software library)

Asset data:discovered computers

and software

SDOperational data:incidents, CRs

Asset data:CIs

VSOperational data:app code

Asset data:app definition

Core CMDB

Page 23: Andrea Westerinen Software Architect, Server and Tools Division

Workshop

Page 24: Andrea Westerinen Software Architect, Server and Tools Division

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 [email protected]

• 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

Page 25: Andrea Westerinen Software Architect, Server and Tools Division

USSalesWebHosting

IIS SQLServer

PublicWebServer Windows

IIS SQLServer SecureAppServer

BusinessDataServer Windows

SQLServer

Windows

GolfStore

GolfCatalog

GolfShop

Awards

Catalog

Cart

GolfCatalogServiceGolfCatalogDB

GolfCatalogAdmin

Deployment: GolfStore USSalesWebHosting

Deployable

GolfShopDeployable

GolfCatalog

DB

Deployable

GolfCatalog

Service

PublicWebServer

SecureAppServer

BusinessDataServer

Example - Application and Deployed Software Structure

Page 26: Andrea Westerinen Software Architect, Server and Tools Division

Example - Logical, Physical and Environmental Structures

Load

alan

cer/

Fire

wal

l

Load

alan

cer/

Fire

wal

l

Cluster 2 allocated on demand from Pods

Cluster 1 is the PublicWebServer

Cluster 2 hosts the SecureAppServer and BusinessDataServer

Environment

(Power, Cooling, …)

SLAs guarantee uptime, availability and repair times for the computers and enclosures

from the manufacturer

Physical pods with servers, network, storage