Longhorn Server New Features - cnblogs.com · 2007-03-22 · Longhorn Server New Features For...

Preview:

Citation preview

Longhorn Server New Features

For Developer

Ray Zhang

Developer Evangelist

Microsoft (China)

http://www.cnblogs.com/msdpe

http://msdpe.spaces.live.com

本次议题

Co

re

Integrated Hypervisor

The Fundamentals

App Platform Management

.NET Framework 3.0

IIS 7 Monitoring

WS-Management

Transactions Recovery

NetworkingStorage

Serv

er

Ro

les

Operating System Infrastructure

Web Server Role

Application Server Role

Developer Framework

Windows Server “Longhorn” Application Server

.NET Framework 3.0

Key points

Windows Server “Longhorn” provides a comprehensive platform for applications

You can build and deploy solutions today on the .NET Framework 3.0

…and run these apps on Windows Server “Longhorn” tomorrow.

From Objects to Services

Polymorphism

Encapsulation

Subclassing

Message-based

Schema+Contract+Policy

Broad Interop

Location Transparent

Tight Coupling

Runtime Metadata

Object-Oriented Service-OrientedComponent-Oriented

1980s 2000s1990s

MTSComponent Oriented Application RuntimeDeclarative Transactions and SecurityRole Based Authorization

COM+ Loosely Coupled EventsQueued ComponentsThrottling

Enterprise ServicesManaged Code Programming ModelAttribute-Based, Declarative ProgrammingXML Application Configuration

Windows Communication Foundation

• XML Based Messaging• Transport Agnostic• Service Oriented• Claims-Based, Federated Security• Host Anywhere

Microsoft Application Services Evolution

-2002 2002-2006 2006-

Communication Technologies Evolution

What else should I know … about integration?

Client Service Integration Strategy

ASMX WCF

WCF ASMX

Remoting WCF

WCF Remoting

WSE 2 WCF

WCF WSE 2

WCF WSE 3

WSE 3 WCF

WCF COM+ Use COMSVCConfig.exe to wrap COM+ app w/WCF endpoint

COM WCF Service Monikers

Configure WCF components to use BasicHttpBinding

Upgrade Remoting & WSE 2 components to WCF

For HTTP, use properly configured WSHttpBinding

For TCP, custom TCP transport sample on NETFX 3.com

EX: Check InventoryEX: Escalate To Manager

A Set Of Activities

That Coordinates People

And / Or Software...

Like a flowchart…. Or a state diagram….

Sequential Workflow

Sequential structure Prescribes processing order

Step1

Step2

State MachineWorkflow

External events drive processing order

State2

State1Event

Event

Rules + data state drive processing order

Rules-driven Activities

Rule1

Rule2

Data

Step2

Step1

Workflow

SummaryA single workflow technology for Windows

Platform level workflow framework for use within Microsoft products & ISV applications

Will be used by BizTalk Server, Office 2007, MBS & other Microsoft client/server products

Available to all Windows customers

Microsoft is redefining workflowUnified technology for System & Human workflow

Multiple styles: sequential, rules-based, state machine

Supports dynamic interaction

Microsoft is taking workflow mainstreamConsistent and familiar programming model for reaching mainstream application developer

Available to millions of end-users through Office 2007

Extensible platform for ISVs

Community SiteSubscribe to the RSS feed for news & updates

Find, download, & register Activities

Find blogs, screencasts, whitepapers, and other resources

Download samples, tools, and runtime service components

http://wf.netfx3.com

MSDN® Workflow PageDownload 12 Hands-on Labs

http://msdn.microsoft.com/workflow

ForumsAsk questions in the forums

Go to the community site

Windows Workflow Foundation Resources

WS-*

Web ServicesUser Relying Party

Identity Provider

Windows CardSpace

.NET Framework 3.5 “Orcas”

WF & WCF Integration

WCF partial trust support

• Atlas/JSON• Deep integration with ASP.NET “Atlas” AJAX Framework.

• JavaScript Object Notation (JSON) wire encoding

• RSS/Atom support• Abstraction for RSS 2.0 and Atom 1.0

• Richer REST/POX support• Programming Model support for resource-centric applications

Code Name “Orcas”

IIS7

IIS 6 Today: A Proven Platform

Proven ScalabilityMySpace - 23 Billion Page* Views/Month

Microsoft.com - 10k Req/sec & 300K Connections

Match.com 30 million page view daily

Proven SecurityNo critical IIS 6 hotfixes since RTM*

Proven Trust54% of Fortune 1000 use IIS (port80software.com)

A solid foundation to build on.

*(as of Nov 28th 2006)

Internet Information Services (IIS) 7.0More than a Web server, Internet Information Services 7.0 provides an accessible, extensible platform for developing and reliably hosting Web applications and services.

Modular Architecture

Manageable

Built in Request Tracing

Extensible Design

Integrated with .NET

IIS 7.0 EnhancementsCreate

Streamlined

ServersReduced Attack Surface

Extend/Modify IIS Features

Rapid Application Deployment

FastDiagnostics

Modular Design

Modular PipelineFeatures are provided in discrete modules

Remove or replace modules as you see fitReduce security exposure

Reduce memory footprint

Increase performance

Add Custom Modules in native or manage code

Leverage the power of .NET for all content

Integrate with specialized infrastructure

Easily incorporate new technologies

Modular UIAdd custom pages to UI (Winforms)

Integrate Application configuration with IIS

IIS6 Request Processing

Send ResponseLog Compress

NTLM Basic

Determine

Handler

CGI

Static File

AuthenticationAnon

Monolithic implementation

Install all or nothing…

Extend server functionality only through ISAPI…

ASP.NET

PHP

ISAPI

IIS7 Request Processing

Send ResponseLog Compress

NTLM Basic

Determine

Handler

CGI

Static File

ISAPI

AuthenticationAnon

SendResponse

Authentication

Authorization

ResolveCache

ExecuteHandler

UpdateCache

Server functionality is split into ~ 40 modules...

Modules plug into a generic request pipeline…

Modules extend server functionality through a public module API.

Extensibility

IIS 6 IIS 6 extensibility limited to ISAPI filter and extensions

UI modifications in MMC are challenging

Difficult to extend IIS 6 Schema

Web service activation using http only

IIS 7Custom native or manage code modules and handlers

Easy to add your apps to UI

Simple to extend IIS 7 schema

Instrument apps to integrate with IIS 7 tracing

Host web services using non-http protocols

IIS6 ASP.NET Integration

Runtime limitations

Only sees ASP.NET requests

Feature duplication

Send ResponseLog Compress

NTLM Basic

Determine

Handler

CGI

Static File

ISAPI

AuthenticationAnon

Authentication

Forms Windows

Map Handle

r

ASPX

Trace

aspnet_isapi.dll

IIS7 ASP.NET Integration

Classic Mode

runs as ISAPI

Integrated Mode

.NET modules / handlers

plug directly into pipeline

Process all requests

Full runtime fidelity

Log

Compress

Basic

Static File

ISAPI

Anon

SendResponse

Authentication

Authorization

ResolveCache

ExecuteHandler

UpdateCache

…Authentication

Forms Windows

Map Handler

ASPX

Trace

aspnet_isapi.dll

.NET Integration

Simplifies security and administration

Leverage the power of .NET for all content with managed global modules

Forms Authentication

URL Authorization

.NET Caching

.NET Role and Membership Providers

New APIs manage both IIS 7 and .NET

Enables Xcopy deployment scenarios

Management Tools

Manage IIS and ASP.NETView enhanced runtime data

worker processes, appdomains, executing requests

Manage delegationUse whichever management tool suits your needs…Note: Powershell has recently been added to the tools you can use! See http://iis.net for details

GUI

Command Line

Script

Managed Code

IIS Manager

appcmd

WMI (root\WebAdministration)

Microsoft.Web.Administration

Coding: Microsoft.Web.Administration

ServerManager iisManager = new ServerManager();

foreach(WorkerProcess w3wp in iisManager.WorkerProcesses) {Console.WriteLine("W3WP ({0})", w3wp.ProcessId);

foreach(Request request in w3wp.GetRequests(0)) {Console.WriteLine("{0} - {1},{2},{3}",

request.Url,request.ClientIPAddr,request.TimeElapsed,request.TimeInState);

}}

New APIs enable developers to write tools to deploy,

manage, and troubleshoot ASP.NET and IIS

Rapid Troubleshooting with Failed Request Tracing

Significantly reduce need for “crash dump analysis”

Configure custom failure definitions per URLTime taken

“Write Trace log for 200 (ok) response taking over 15 seconds

HTTP Status/substatus codes

“Write Trace log when you see a 500 error for Invoice.aspx”

Error level

Manage with UI, WMI, API, Appcmd

Instrument applications with custom trace event

Hosting Web Services in IIS 7

Windows Communication Foundation (WCF) is part of .NET 3.0

IIS 7 will host web service in worker process

Health of worker process is managed by Web Activation Service (WAS)

Provides “external” monitoring and recycling

Activate over TCP, Named Pipe, MSMQ, or HTTP

Web Service can share state with an ASP.net application

Provides high availability, managed process for web service based applications

Summary

Custom modules and handlersCreate new IIS 7 modules for the public

Provide solutions for customers with unique requirements (ie.

Custom authentication, auditing …)

Extend reach of existing .NET handlers and modules to non

ASP.NET content

Quickly integrate new technologies

Extend UI / Schema: integrated administration

Deploy using new APIs

Manage with delegated administration

Diagnose with built in / extensible tracing

Provide high availability host for web services

IIS7 ConfigurationOverview

New configuration systemBefore: System for a server

Now: System for a platform

IIS 7 uses ASP.NET style grammar and syntax

File based config: No intervening serviceRoot file for central record

Child files for setting properties at the site or app level

Rich API support means easier to manage

Rich extensibility means easier to integrateEven the IIS UI is modular and extensible

Transactions

Microsoft Confidential

Using Transactions

Win32 APIs

MS DTC

System.Transactions

[Native] Win32 APIs

hTx = CreateTransaction(...);

CommitTransaction(hTx);

hFile = CreateFileTransacted(..., hTx, ...);

// Work with file handle

StartTransaction

CreateTransacted File

CommitTransaction

[Native] Using DTC

pTranDisp->BeginTransaction(...,&pTransaction);

pKernelTransaction->GetHandle(&hTran);

// Work with handleCreateFileTransacted(..., hTx, ...);

pTransaction->QueryInterface(IID_IKernelTransaction,(void**)&pKernelTransaction);

Begin Transaction

Get Kernel Transaction

Get Transaction Handle

Using System.Transactions

transaction = (ITransaction)TransactionInterop.GetDtcTransaction(

Transaction.Current);

IntPtr handle;kernelTransaction.GetHandle(out handle);

// Work with handleCreateFileTransacted(..., handle, ...);

kernelTransaction = (IKernelTransaction)transaction;

Get COM ITransaction

Get Kernel Transaction

Get Transaction Handle

When NOT To Use Transactions

Long Running Transactions

Multiple writers

CAREFUL - Auto-Started Services

TxF Limitations

No Managed API

Must use P/Invoke and COM interop

No Implicit Transactions

To use TxF, your code must change

No support for file streams or encryption

File Handle Semantics

Overview in Developer’s Eyes

Application Server

IIS 7

WCF

WF

Transaction

WPF

CardSpace

Event

Management

Core

Power Shell

Virtualization

HPC

Terminal Services

Other Features

Thanks

Recommended