Post on 21-Dec-2015
transcript
Oslo, Microsoft’s vision for the future of Modelling
(Extra Content)
Robert HoggArchitect
Black Marble
FBCS, CEngSenior ArchitectBlack Marble LTD
Robert Hogg
• The “Oslo” Back Story• A Lap around “Oslo”• The Repository• M• IntelliPad• Quadrant• Demos @ 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
Version Integration
.net 3.0 WCF | WF
.net 3.5 WCF + WF
.net 4.0 WCF/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 VS10Windows Server
.NET Framework
“Dublin”
Visual Studio Oslo
WF and WCF services
Administration Tools
System Center
IIS/WAS
IIS/WAS
DublinQuadrant IIS Manager
WF and WCF Frameworks
Persistence
SQL Persistence
Provider
Management APIs (PowerShell command-lets)
WF and WCF Management Modules
Runtime DatabasesPersistence 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 addsDublin enhances
Windows/IIS/.NET 4.0
Scale-out & ReliabilityDiscovery & Control Application Monitoring
Versioning, Partitioning, Routing
Syst
em C
ente
rAp
p Se
rver
SCO
M P
ack
“It just works!”
Dublin vs. BizTalkBizTalk Dublin
$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-ASSISTEDModels used to understand or manipulate code Examples: Static Structure, Sequence, …
DRAWINGSModels used to communicate with othersExamples: Dataflow, Use Case, …
MODEL-DRIVENModels executed by runtimes directlyExamples: HTML, CSS, XAML, BPEL, …
Model-driven Platform
COM (+)midl.exe
[Transaction]
DECLARATIVE CONTENT
TIME
.NET 1.0[YourAttributeHere]
app.config
Web Serviceswsdl:definitions
xsd:schema
.NET 3.0wf: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?
TRANSPARENCYBetter understanding of your application
FLEXIBLITYFaster 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
ArchitectDev
IT
Business ProcessReqs
Service Level Agreement
Application
What is "Oslo"?THE PLATFORM FOR MODEL-DRIVEN APPLICATIONS
RepositoryModel store
“Quadrant”Modelling tool
“M”Modelling language
Key "Oslo" Concepts
MODELS
TEXTUAL DSLsVISUAL DSLs
RUNTIMES
“QUADRANT”
Composition
Generic Viewers
Dataflow
EDITORFRAMEWORK
[Your Visual DSL]
[Your Textual DSL]
MSchema
MGrammar
MGraph
LANGUAGEFRAMEWORK
[Your Models]
Base Models
“M” Runtime
REPOSITORYSQL SERVER
[Your Models]
Base Models
“M” Runtime
REPOSITORYSQL SERVER
"Oslo" Architecture
RUNTIMES
[Your Runtime]
“Dublin”
ASP.NET
WF
WCF
SQL/EDM
WindowsOther ISV Runtimes
ADO .NET
XML, Custom Formats, …[Your Models]
.Net Models
Repository Models
REPOSITORYSQL 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
Schema Instance
Schema Instance
Instance
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 ServerFeatures
Repository catalog, secure views, auditing,versioning, claims-based security, glob/loc, etc.
RepositoryFeatures
• 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" LanguageDSL
"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.mDomain Model
DSLY
DomainY.mgDomain Grammar
DSLXDomainX.mDomain Model
DomainY.mDomain Model
DomainX.mgDomain Grammar
PointLanguage.mgDomain Grammar
MSchema
MGrammar
MGraph
“M” Language Example// Module: Used to scope model definitionsmodule 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 definitionsmodule 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.exeDomain Model
Compiler
MX.exeDomain Model
Loader
ModelA.mModelB.m
ModelC.m ModelABC.mx
SQLServer
M Framework 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 SURFACESERVICES COMPOSITIONENGINE
NestingSizingLayoutSnapping
"Quadrant" Architecture
Core Services
Undo/RedoCommandsDrag/DropSelectionActivationError HandlingGeneral ServicesSearchValidationAnnotationsRelationship Highlighting
DATAFLOW ENGINE
Caching,Virtualization,Change tracking, andNotification
Target Data
View StateConfiguration
Development Domains
TEXTUAL DSLsVISUAL DSLs RUNTIMES
“Quadrant” Web Editor
“MWeb” ASP.NET
“Quadrant” Service Editor
“MService”WCF/WF
(“Dublin”)
“Quadrant” Entity Editor
“MEntity” EF
“Quadrant” Schema Editor
“MSchema” SQL
“Quadrant” My Configured
EditorMy 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/osloSDK DownloadSDK Contains
Repository database“M” Modelling language (MSchema, MGrammer)IntelliPad editorDoes not include “Quadrant”
Documentation and resources
The “Oslo” Modelling LanguageLangworthy, 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 imageCommunity
BoggersGuides.netblogs.blackmarble.co.uk/blogs/boss/default.aspx
Forums“Oslo” forum“Dublin” forum
Use “Oslo” todayUse “M” to model a database!
MGrammar Language for creating textual DSLsSpecification will be released under OSP