Oslo, Microsoft’s vision for the future of Modelling (Extra Content) Robert Hogg Architect Black Marble
FBCS, CEng Senior Architect Black Marble LTD Robert Hogg
The “Oslo” Back Story A Lap around “Oslo” The Repository M IntelliPad Quadrant the 3.00pm interactive session Agenda
Images © Copyright VisitOSLO/Matjaz Intihar The “Oslo” Back Story
A Model is used to describe an abstract entity We are not discussing Object Modelling Think relational Modelling Modelling
3 DUBS ( A QUICK SPIN )
3 Dubs WCF 4.0 WF 4.0 “Dublin” Application Server VersionIntegration.net 3.0WCF | WF.net 3.5WCF + WF.net 4.0WCF/WF
WCF 4.0 Services can be declared using XAML – You can create a service with zero lines of code Much tighter integration with WF Tighter integration with Dublin
WF 4.0 Core WF class library has been re-written Flowchart workflow model 10x – 100x performance increased XAML has been greatly improved – XAML is now default authoring mode Designers have been re-written to use WPF – 10x easier to add activity designers – You may love it, you may hate it Designer re-hosting is 10x easier
Windows Application Server Extensions (Codename “Dublin”) Evolution of WAS/IIS and Windows App Server role to run and manage WF and WCF services Initial release is a web download Ships soon after VS10 Windows Server.NET Framework “Dublin” Visual Studio Oslo WF and WCF services Administration Tools System Center IIS/WAS
Dublin Quadrant IIS Manager WF and WCF Frameworks Persistence SQL Persistence Provider Management APIs (PowerShell command-lets) WF and WCF Management Modules WF and WCF Management Modules Runtime Databases Persistence schema Monitoring schema Monitoring WF SQL Tracking Provider WCF SQL Tracking Behaviors Messaging Forwarding Service Hosting Durable Timer Service Visual Studio WF and WCF Project Templates Windows Application Server Role Model Deployment to Dublin Discovery Service Dublin adds Dublin enhances Windows/IIS/.NET 4.0 Scale-out & Reliability Discovery & Control Application Monitoring Versioning, Partitioning, Routing System Center App Server SCOM Pack “It just works!”
Dublin vs. BizTalk BizTalkDublin $34,999 per proc ($8,499 Std Edn)Free Hosts message channels and orchestrations Hosts services and workflows Uses message box for highly reliable messaging WS-RM can be used, messages not persisted Fully supported for large scale deployments Scaled in the same way as IIS Comprehensive management and diagnostics tools Basic management and diagnostics tools Latency can be an issue as messages are persisted Low latency achieved easily
A LAP AROUND “OSLO”
What is a Model? A DESCRIPTION OF A GIVEN DOMAIN MODEL-ASSISTED Models used to understand or manipulate code Examples: Static Structure, Sequence, … DRAWINGS Models used to communicate with others Examples: Dataflow, Use Case, … MODEL-DRIVEN Models executed by runtimes directly Examples: HTML, CSS, XAML, BPEL, …
Model-driven Platform COM (+) midl.exe [Transaction] DECLARATIVE CONTENT TIME.NET 1.0 [YourAttributeHere] app.config Web Services wsdl:definitions xsd:schema.NET 3.0 wf:StateMachine wpf:ContentControl
Model-driven Applications Textual domain specific language (CAML) Visual designer (SharePoint Designer) Application definition stored in database Textual domain specific language (X++) Visual designer (MorphX) Application definition stored in database
Why is this happening? TRANSPARENCY Better understanding of your application FLEXIBLITY Faster changes to your application PRODUCTIVITY “More essence, less ceremony”
Business Analysts – Define business process ( Word, Visio ) Architects – Define systems (Word, Visual Studio ) Developers – Develop systems (Visual Studio) IT – Manage systems (System Centre) The Application Lifecycle
Application Development BA Architect Dev IT Business ProcessReqs Service Level Agreement Application
What is "Oslo"? THE PLATFORM FOR MODEL-DRIVEN APPLICATIONS Repository Model store “Quadrant” Modelling tool “M” Modelling language
Key "Oslo" Concepts MODELS TEXTUAL DSLs VISUAL DSLs RUNTIMES
“QUADRANT” Composition Generic Viewers Dataflow EDITOR FRAMEWORK [Your Visual DSL] [Your Textual DSL] MSchema MGrammar MGraph LANGUAGE FRAMEWORK [Your Models] Base Models “M” Runtime REPOSITORY SQL SERVER [Your Models] Base Models “M” Runtime REPOSITORY SQL SERVER "Oslo" Architecture RUNTIMES [Your Runtime] “Dublin” ASP.NET WF WCF SQL/EDM Windows Other ISV Runtimes ADO.NET XML, Custom Formats, … [Your Models].Net Models Repository Models REPOSITORY SQL SERVER OTHER TOOLS (VSTS, EXCEL, …) XML, Custom Formats, …
THE REPOSITORY
A single location for definitions A single location for information Relationships defined across traditional boundaries End to End tracking Repository SchemaInstance SchemaInstance
Repository Capabilities Repository features are built on SQL Server – Repository install also turns on useful features, e.g. replication and mirroring system catalog, Change Data Capture, replication, SSIS, mirroring, security, etc. SQL Server Features Repository catalog, secure views, auditing, versioning, claims-based security, glob/loc, etc. Repository Features
Database structure is used to define models E.g. WCF artefacts are represented as tables in the repository database – Service contracts – Operation contracts – Endpoints – Bindings Structural Models
Repository Database Content Tables in the Repository database represent different technologies Currently included: – Common language runtime – Windows Communication Foundation – Windows Workflow Foundation – Identity
System.ServiceModel partial structure
Instance Models Data is used to define models Rows are inserted in structural model tables A service application can be modelled by – Adding a service contract – Adding service operations – Adding endpoints and bindings
The repository MAY at some point in the future be federated across other data stores such as – Team Foundation Server (TFS) in Visual Studio Team System – Various stores in System Center – And more Imagine the possibilities Federating Systems
Repository is optimized for many reads, few writes Contains models for “Oslo” app domains Can be extended with M Models can be deployed, secured and versioned Repository
THE MODELLING LANGUAGE
Interacting with Oslo content needs to be simple and natural Textural based modelling language Why “DM”?
“M” is a language for defining domain models and textual domain-specific languages (DSLs) M domain models define schema and query over structured data – Values, Constraints, and Views – Natural projection to SQL M DSLs define projections from Unicode text to structured data – Rule-based transformation – Grammar-driven text editor integration What Is “M”?
The "M" Language DSL "M""M" Domain-specific grammars Abstract data model Domain-specific data models language PointLanguage { syntax Main = h:Integer "," v:Integer => Point { X { h }, Y { v }}; } type Point { X : Integer; Y : Integer; } Point { X { 100 }, Y { 200 } } Point.m Domain Model Point.m Domain Model DSL Y DomainY.mg Domain Grammar DomainY.mg Domain Grammar DSL X DomainX.m Domain Model DomainX.m Domain Model DomainY.m Domain Model DomainY.m Domain Model DomainX.mg Domain Grammar DomainX.mg Domain Grammar PointLanguage.mg Domain Grammar PointLanguage.mg Domain Grammar MSchema MGrammar MGraph
“M” Language Example // Module: Used to scope model definitions module Test.TimeReport { // Type: Defines employee data structure type Employee { Id : Integer32 FirstName : Text where value.Count <= 100; LastName : Text where value.Count <= 100; } // Extent: Contains zero or more employees Employees : Employee*; } MSchema is used to model data structures, storage, views and constraints
Once they’re in the database, it’s just SQL “TSQL can be used to create repository structure or standard database structure – Repository TSQL is more complex Using “M” to Model a Database // Module: Used to scope model definitions module Test.TimeReport { // Type: Defines employee data structure type Employee { FirstName : Text where value.Count <= 100; LastName : Text where value.Count <= 100; } // Extent: Contains zero or more employees Employees : Employee*; } create table [Test.TimeReport].[Employees ] ( [FirstName] nvarchar(100) not null, [LastName] nvarchar(100) not null, ); go Compile
M Tool Chain M.exe Domain Model Compiler MX.exe Domain Model Loader ModelA.m ModelB.m ModelC.mModelABC.mx SQL Server M Framework
An object-oriented language – No polymorphism, virtual dispatch – “Is-a” determined based on structural subtyping, not stipulation A data access technology – M domain models compile down to T-SQL – Tool chain supports course-grained loading/unloading of schemas and values – not an OLTP solution A replacement for T-SQL – Far less expansive feature set – Tool chain supports linking/invoking T-SQL What “M” Is Not
INTELLIPAD
Simple text based code editor Supports “M” languages Provides instant feedback of code compilation – Great for learning “M” languages Visual Studio can also be used for “M” – Most likely scenario in real projects IntelliPad Editing Tool
M: Visual Studio
QUADRANT
Graphical tool used for managing instance models – Targeted at architects and business analysts Uses “Office Style” ribbon toolbar Loads model definitions from repository database – Allows management of instances – Changes are saved to database immediately What is "Quadrant"?
Quadrant Modelling Tool
REPOSITORY SHELL AND SURFACESERVICESCOMPOSITION ENGINE Nesting Sizing Layout Snapping "Quadrant" Architecture Core Services Undo/Redo Commands Drag/Drop Selection Activation Error Handling General Services Search Validation Annotations Relationship Highlighting DATAFLOW ENGINE Caching, Virtualization, Change tracking, and Notification DATAFLOW ENGINE Caching, Virtualization, Change tracking, and Notification Target DataView StateConfiguration
Development Domains TEXTUAL DSLsVISUAL DSLsRUNTIMES “Quadrant” Web Editor “MWeb”ASP.NET “Quadrant” Service Editor “MService”WCF/WF (“Dublin”) “Quadrant” Entity Editor “MEntity”EF “Quadrant” Schema Editor “Quadrant” Schema Editor “MSchema” SQL “Quadrant” My Configured Editor “Quadrant” My Configured Editor My DSL My Runtime WEB SERVICES ENTITIES DATABASE CUSTOM
Design – “M” is used to define the application database structure – The “M” model is imported to Repository database – The application is modelled in Quadrant Implementation – The “M” model is used to create the runtime database – Visual Studio is used to develop runtime components Deployment – Quadrant could be used to deploy the application RunTime – “Dublin” could be used to deploy the application Oslo Scenario: Modelling an application
What is in it for the Enterprise? Tooling Sharing a common Repository Modelling layer Service Model Visual and Textual DSL Delivery and Hosting
SUMMARY
Repository Database – Built on SQL Server 2008 – Stores model definitions (structure) – Stores model instances (data) “M” language – Declarative text-based Modelling language – Aimed at “curly-brace” programmers – Can be used to define models for repository database – ““M” is to TSQL what C is to assembly” – Don Box “Quadrant” Modelling tool (only available on pdc pod) – Graphical tool used to edit model instances – Targeted at “Business Analysts” and architects Runtimes built by reading data from the Repository Summary Oslo – January 2009
What Next? Get Ready for "Oslo“ Codename “Oslo” Developer Centre msdn.microsoft.com/oslo SDK Download SDK Contains Repository database “M” Modelling language (MSchema, MGrammer) IntelliPad editor Does not include “Quadrant” Documentation and resources The “Oslo” Modelling Language Langworthy, Lovering, Box – Addison-Wesley Learning MSchema will take a C# developer about a day
Get Ready for “Oslo” Bits Try to get the “PDC08-CSD” virtual image Community BoggersGuides.net blogs.blackmarble.co.uk/blogs/boss/default.aspx Forums “Oslo” forum “Dublin” forum Use “Oslo” today Use “M” to model a database! MGrammar Language for creating textual DSLs Specification will be released under OSP