{Energize}
your brain
Ivan Pavlović, Hive Studios
Visual C# MVP, MCSD, MCDBA, MCT
[email protected]
http://msforge.net/blogs/paki
Modul
Trajanje
Raspored
Registracija
00:15
09.00 – 09.15
Uvod
Microsoft razvojna platforma
00:15
09.15 – 09.30
Microsoft Platforma
Na putu ka servisima
01:10
09.30 – 10.40
Pauza
00:25
10.40 – 11.05
Kuda sa (ovim) podacima?
01:30
11.05 – 12.35
Ručak
00:45
12.35 – 13.20
Kako sa poslovnim zahtevima?
01:30
13.20 – 14.50
Pauza
00:25
14.50 – 15.15
A šta sa interfejsom?
01:30
15.15 – 16.45
Zaključak
00:15
16.45 – 17.00
3
Communication + Workflow + Services
"Dublin" Server Enhancements
Azure .NET Services
Software Factories
4
In the Cloud
On Premise
Client & UI
Composition
User Interface
& Interaction
Business
Layer
Composition
.NET Framework
Azure Services, .NET Framework
WCF
WCF, WF
Windows Azure
Azure .NET Services
Data Layer
Access to
Back-end
5
ASMX
.NET
Remoting
Interop
with other
platforms
Extensibility
Location
transparency
Managed
COM+
APIs
Enterprise
Services
WS-*
Protocol
Support
MessageOriented
Programming
System.Messaging
WSE
6
A Service Endpoint has an Address, a Binding, and a Contract (ABC).
An Address is a network address indicates where the service is
located.
A Binding specifies how a client can communicate with the endpoint
including transport protocol, encoding, and security requirements.
A Contract identifies what operations are available to the clients.
Client
C
B
A
A
B
C
A
B
C
A
B
C
Service
Address
Binding
Contract
Where?
How?
What?
Endpoint
7
Every service is associated with a unique address.
Base address format
[transport]://[host name][:optional port]/[optional path]
Base address describes where it provides the metadata for the
service (WSDL)
Endpoint address format
[base address]/[optional path]
Endpoint address is where the service is actually listening. This
can be an absolute URI or relative to the base address.
Build-in transports: HTTP/S, TCP, P2P, IPC and MSMQ
Examples
http://localhost:8001/MyService/BP
http://localhost:8001/MyService/WS
net.tcp://localhost:8002/MyService
net.pipe://localhost/MyPipe
net.msmq://localhost/private/MyQueue
8
CLR Type
Integration
Transaction
Behavior
CLR Type
Integration
Transaction
Behavior
Security
Channel
TCP
Transport
Security
Channel
TCP
Transport
Service
Code
Instancing
Behavior
Service Model Layer
Influences and adds to
the programming
model based on
incoming messages
Messaging Layer
Moves messages back
and forth and adds
transfer semantics
(channels)
10
Service Model Layer
Transaction
Behavior
CLR Type
Integration
Instancing
Behavior
Messaging Layer
Security
Channel
Reliable
Messaging
Behaviors
HTTP
Custom
TCP
Transport
Channel
Channels
Metadata
Behavior
Instancing
Behavior
Security
Channel
HTTP
Transport
Error
Handling
Behavior
Transaction
Behavior
Reliable
Messaging
TCP
Transport
Concurrency
Behavior
CLR Type
Integration
MSMQ
Integration
Named
Pipes
Custom
Behavior
Throttling
Behavior
Custom
Channel
Queue
Transport
11
Application
Hosting
Environments
WAS
ASP.NET
WinForm
NT Service
COM+
…
Secure
Channel
Reliable
Channel
Text/XML
Encoder
HTTP
Channel
TCP
Channel
Queue
Channel
Binary
Encoder
Messaging
Service Model
WPF
…
Error
Behavior
Metadata
Behavior
Instance
Behavior
Throttling
Behavior
Transaction
Behavior
Type Integ.
Behavior
Concurrency
Behavior
12
Service
Describes the operations a service can perform.
Maps CLR types to WSDL.
Data
Defines data structures (complex types) that will
be sent on the wire. Maps CLR types to XSD.
Message
Defines the structure of the message on the wire.
Maps CLR messages to SOAP messages
“ContractDescription” class represents WCF
Contract
13
Contract defines the operations of a service
[ServiceContract]
public interface IMyContract
{
[OperationContract]
string Hello(string name);
}
Implementing the service
public class MyService : IMyContract
{
public string Hello(string name)
{
string greeting = "Hello " + name;
Console.WriteLine(greeting);
return greeting;
}
}
Manual hosting in any managed application
ASP.NET, COM+, EXE, Windows Service, Windows Forms, WPF
Hosted in IIS
Windows Activation Service
Used for hosting in IIS7 or outside IIS7
Windows Activation Service (WAS)
NP Listener
Adapter
HTTP Listener
Adapter (IIS7)
TCP Listener
Adapter
Named Pipes
Transport Listener
HTTP.SYS
TCP Transport
Listener
15
Increased developer productivity
Serialization, web prog. model, debugging
Support for syndication
Performance and scalability Improvements
IIS7 performance increase (5-10×)
Data platform support
Support for ADO.NET Entity Framework in
WCF services
WCF Tools improvements
Testclient, Config editor, Single-click publish
16
17
WF is a way to
coordinate work with
minimal ceremony
Activities
Runtime
Tooling
Workflow
Activity
Library
WF Runtime
Extensions
Persistence
Tracking
…
Host Process (.exe, IIS, "Dublin", Strata, …)
Tooling
VS
Designer
VS
Debugger
Rehosted
Designer
18
Coordinate Asynchronous (Distributed?)
Work
Write Persistable Applications
Customizable Vocabulary & Design
Experience
Gain Visibility into your Application
19
execute
Activities are
the in
Activities are
pulses ofabstraction
work – which
primitive
for
composable
can result in the
behavior
scheduling of other
activities
Sequence
Activity
State
Machine
Send
Message
Activity
Receive
Message
Assign
Activity
Activity
Delay
Activity
Activity
WF Runtime
Execution, State Management, Persistence
20
An
Activitydefine
may
contain
Arguments
Activities
can be
arguments
bound
user-defined
Variables
for
to Variables
declare the
up
type
the of
parent
data
data
storage
chaincan
that
flow into or out of
an Activity
State
Machine
Receive
Message
Variables
Send
Message
Variables
Variables
OutArgument<Message>
Sequence
InArgument<object>
OutArgument<object>
Assign
InArgument<TimeSpan>
Delay
WF Runtime
Execution, State Management, Persistence
21
WF 3.0
WF Rules 3.0
WF + WCF 4.0
WCF 3.0
• Independent
Technologies
• Workflow as
WCF Service
• Deep Integration
• Unification of Activities and Rules
• Fully Declarative Workflow
Services
• Performance
• Rich Workflow Host
• Correlation
22
Custom Activities
<YOUR CODE HERE>
Base Activity Library
Utilities
Expressions
Error
Handling
WF
Primitives
PowerShell
Interop
BPEL
WCF
Messaging
Database
Control Flow Activities
Flowchart
Sequential
State Machine
Rules
Activity Model & Runtime
23
.cs
DataContracts
MessageContracts
ServiceContract
Workflow code
.svc
.dll
.xaml
.config
.xaml
WorkFlow
ServiceHost
Workflow
Implementation
.config
Bindings
Behaviors
24 24
.xaml
Addresses
Bindings
Contracts
Workflow
Activities
Implementation
Behaviors
.xaml
Workflow
ServiceHost
25
Developer / BA collaboration
Declarative expression
Application transparency
Custom tooling
Deployment flexibility
26
Activity
Usability (80% Code Reduction)
Alignment across Expressions, Rules, and Activities
Completely Fractal Composition Model
Fully declarative workflows and activities
Runtime
10-100X Performance Improvements
Integrates with App Models (WCF/WPF/ASP.NET)
Flow-in Transactions
Partial Trust Support
Full control over persistence
Tools
Designer Performance and Usability
Rehosting Improvements
Unified Debugging Experience
And much much more….
27
28
Consider Workflow Services if your service
does any of the following:
Calls a database, Calls another service, or
Uses the File system
Coordinates parallel work
Coordinates messages with application state
Is long running
Requires rich tracking information
Prefer code services when your service
Is a set of independent operations w/ no
shared state
29
Workflow Service Host
Instance
Store
Workflow Runtime
Channel
Service
Dispatcher
Workflow
Instance
XAML
30 30
Services are the unit of
modularity for “loosely-coupled”
composition
Service
Activity
Service
Activity
Activity
Service
Activities are the unit of modularity
for “tightly-coupled” composition
31
Rest toolkit
Channels: UDP, InProc
Standards: SOAP over UDP, WS-Discovery, WSBA, BP 1.2
Standard Endpoints
Durable Duplex
Config
…
32
Prefer XAML
Think about designing models and storing models
in a repository/database
Build custom activities
Code won't port, custom activities will
Prefer WCF 3.5 send and receive
WCF/WF integration is even tighter Microsoft .NET 4.0
Use WorkflowServiceHost even when not
exposing workflows as services
NetNamedPipesBinding
33
In the Cloud
On Premise
Client & UI
Composition
User Interface
& Interaction
Business
Layer
Composition
Windows Server (“Dublin”)
Biztalk Server, SQL Server
Azure .NET Services
Visual Studio Team System
Data Layer
Access to
Back-end
34
Communication + Workflow + Services
"Dublin" Server Enhancements
Azure .NET Services
Software Factories
35
Host for WF and WCF
Managabiltiy
Supportabilty
Scaleabily
Extensions to IIS/WAS
Visual
Studio
Oslo
WF and WCF
services
“Dublin”
.NET Framework
System Center
Administration Tools
IIS/WAS
Windows Server
36
37
Services and
Workflows
38
Partners
Dublin
Fx
Windows
Oslo
Visual Studio
IIS Manager
WCF and WF Templates
WCF and WF IIS Manager Modules
Management APIs (PowerShell command-lets)
Runtime Services & Components
Error
Handling
Behavior
Lock Retry
Behavior
Auto-Start
Provider
SQL
Persistence
Provider
Instance
Control
Endpoint
Durable
Timer
Service
XAML &
Config
Activation
Event
Collector
Service
Hosting
Environment
Routing
(Forwarding
) Service
WF
Tracking
Provider
ETW
Tracking
Participant
WCF
Message
Logger
WCF
Analytic
Trace
System Center
Instance
Recovery
Service
Monitoring
“Dublin” Management Pack
Hosting
Persistence
.NET Framework
Persistence schema
Runtime Databases
Monitoring schema
(SQL / SQL Express)
IIS/WAS
39
Via HTTPS to WMSVC
InetManager
InetManager
PowerShell
Dublin
Load
Balancer
...
Via WS-MAN to WinRM
s1
s2
PowerShell
s1
s2
Queue
configuration & control
data access
messages
Dublin
s1
s2
Dublin
40
Consolidated view of all Services on a
server
Easy export and import of Services
Integration into VS 2010
Various tracking profiles out of the box
Basic Workflow Tracking
Verbose WCF Service Tracking
Verbose Workflow Tracking
Custom tracking
41
Adds tooling to existing features
Powershell commands for all UI Elements
Tracing and Message Logging via easy user
interface (or Powershell)
Persisted Instance viewer
Running
Blocked
Ready-to-Run
Suspended
42
"Dublin" will not replace BizTalk
BizTalk will continue to be Microsoft's
Premier Integration Server
"Dublin" fits for
Scable, supportable, host for WF and WCF
Non-Integration solutions
Low mapping and adapter scenarios
Both clients with and without BizTalk Server
43
Post Visual Studios 10 (Mid 2010)
Available as a web download
Eventually baked into Windows
44
Communication + Workflow + Services
"Dublin" Server Enhancements
Azure .NET Services
Software Factories
45
46
47
Services for application integration
Access Control
Workflow
Service Bus
Support user identities securely across
different organizations
Model and execute business logic and
service interactions
Exchange messages between loosely
coupled, composite applications
 Claims-based identity
management
 Interoperable & based on
standard protocols (WS-Trust)
 Manage through web page and/or
a services API
 Supports CardSpace, LiveID,
Username/Password
 Runtime execution environment
for XAML-based workflows
 Enables the orchestration of
services
 Extension of Windows Workflow
Foundation
 XAML-based models can be
uploaded to the cloud




Simple publish-subscribe eventing
Firewall friendly messaging
Flexible connection modes
Connectivity to on-premises
applications to enable hybrid S+S
scenarios
 Extension of Windows
Communication Foundation
48
Key developer challenges
Want to make it easy and secure for partners
to use your application
Don’t always know the characteristics or scale
of the integration
Partners / customers / users have devices and
services running behind firewalls
Approach
Provide a high-scale, high-available “Service
Bus” that supports open Internet protocols
49
[http|sb]://servicebus.windows.net/services/account/svc/…
Service Registry Root
The service registry provides a
mapping from URIs to services
Root
servicebus.
windows.
net
services
account
svc
contoso
Multi-Tenant
…
50
Two key capabilities
Relay
Direct connect
Relay
Ensure applications connect
Available to all via the service registry
Direct connect
Uses the relay to establish communication
Then shortcuts for efficiency
Available via HTTP / REST / ATOM
Available in .NET via WCF Bindings
51
52
53
54
Key developer challenges
Many identity providers, many vendors, many
protocols, complex semantics – tricky to get right
Application strewn with one-off access logic
Hard to get right, not agile, not compliant, many
dead ends
Approach
Automate federation for a wide-range of identity
providers and technologies
Factor the access control logic from the application
into manageable collection of rules
Easy-to-use framework that ensures correct token
processing
55
A reliable, scalable off-premises host for workflows
A portal at workflow.ex.azure.microsoft.com
New activities for the Azure Services Platform
APIs that allow you to deploy, manage, and run
your workflows on the cloud
Enables you to orchestrate services
Connect to services in your enterprise anywhere
on the Internet – uses the connectivity services
Give you partners and customer access – uses the
access control services
57
Communication + Workflow + Services
Azure .NET Services
"Dublin" Server Enhancements
Software Factories
58
On Premise
In the Cloud
Application Modelling
Oslo & Quadrant
Identity Management
Live ID, Geneva Framework, AD Connector, .NET Services, Card Space
Integration Patterns & Security
Enterprise Service Bus, Internet Service Bus, WCF Security Guidance
Software Factories
Web Client Factory, Web Service Factory, Enterprise Library
59
A set of integrated tool, process and content
assets that accelerate rote and menial tasks
for a specific type of deliverable
May provide a partial implementation of a
prototypical deliverable containing key
mechanisms and design elements
A software factory contains (at least):
A schema that defines interrelated aspects
(viewpoints) of the deliverable life cycle
A template that configures a development
environment with the assets required by each
aspect (viewpoint)
60
End-to-end guidance
That helps you develop solutions
Using proven practices (quality)
In a more consistent way (predictability)
In less time (productivity)
61
Create and enforce a consistent and
predictable way of developing, packaging,
and deploying business systems
Enforce architectural standards independent
of the solution domain.
Quickly expose architectural decisions and
risks
Create partial implementation of a solution
that includes the most critical mechanisms
and shared elements
62
Build upon a high-quality starting point
(baseline)
Easily apply guidance in consistent and
repeatable ways via Visual Studio automation
Benefit from patterns and practices directly in
Visual Studio
Focus on business logic, UI design, or
infrastructure services
Learn about the technology being used (for
example, WCF …).
63
64
Ivan Pavlović, Hive Studios
Visual C# MVP, MCSD, MCDBA, MCT
[email protected]
http://msforge.net/blogs/paki
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market
conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
88
Descargar

DevDays 2009