Upload
ambrose-dean
View
213
Download
0
Tags:
Embed Size (px)
Citation preview
CTS300Prescriptive GuidanceJuggling Web Services, WSE, .NET Remoting, System.EnterpriseServices, And MSMQ
CTS300Prescriptive GuidanceJuggling Web Services, WSE, .NET Remoting, System.EnterpriseServices, And MSMQ
Richard TurnerRichard TurnerProgram ManagerProgram ManagerMicrosoft CorporationMicrosoft Corporation
Connected Systems TrackConnected Systems TrackMon 10:45Mon 10:45 CTS200 Service Orientation and the Windows/.NET DeveloperCTS200 Service Orientation and the Windows/.NET Developer
Mon 1:30Mon 1:30 CTS300 Prescriptive Guidance-Juggling Web Services, WSE, CTS300 Prescriptive Guidance-Juggling Web Services, WSE, .NET Remoting, System.EnterpriseServices, and MSMQ.NET Remoting, System.EnterpriseServices, and MSMQ
Mon 3:15Mon 3:15 CTS308 Applied Web Services in Hewlett Packard's Core eCommerce SolutionsCTS308 Applied Web Services in Hewlett Packard's Core eCommerce Solutions
Mon 5:00Mon 5:00 CTS404 Best Practices for Dealing With State at Multiple Layers Within CTS404 Best Practices for Dealing With State at Multiple Layers Within Your .NET ApplicationsYour .NET Applications
Tue 1:30Tue 1:30 DEVC27 Service Orientation OverviewDEVC27 Service Orientation Overview
Tue 3:15Tue 3:15 CTS301 Managed Programming for Win32 DevelopersCTS301 Managed Programming for Win32 Developers
Wed 2:00Wed 2:00 CTS302 Using Web Services Enhancements v2.0 (WSE) to Secure Web ServicesCTS302 Using Web Services Enhancements v2.0 (WSE) to Secure Web Services
Wed 10:15Wed 10:15 CTS400 Using Web Services Enhancements v2.0 for Messaging Over MultipleCTS400 Using Web Services Enhancements v2.0 for Messaging Over MultipleMachines and NetworksMachines and Networks
Wed 5:30Wed 5:30 CTS303 Applied Web Services at the Ohio State University Medical CenterCTS303 Applied Web Services at the Ohio State University Medical Center
Thur 8:30Thur 8:30 CTS403 Handling Errors with TransactionsCTS403 Handling Errors with Transactions
Thur 8:30Thur 8:30 DEVC35 Web Services InteroperabilityDEVC35 Web Services Interoperability
Thur 1:30Thur 1:30 CTS406 Versioning of Connected .NET ApplicationsCTS406 Versioning of Connected .NET Applications
Thur 1:30Thur 1:30 DEVC16 Distributed Applications Performance PanelDEVC16 Distributed Applications Performance Panel
Thur 5:00Thur 5:00 CTS304 Availability and Reliability - Failure Is Not An OptionCTS304 Availability and Reliability - Failure Is Not An Option
Fri 10:45Fri 10:45 CTS405 Choosing a Hosting Model - Dealing with Threads, AppDomains, and CTS405 Choosing a Hosting Model - Dealing with Threads, AppDomains, and ProcessesProcesses
Fri 1:00Fri 1:00 CTS306 Deployment and ManagementCTS306 Deployment and Management
Fri 2:45Fri 2:45 CTS307 Using Service Orientation to Drive Business ProcessesCTS307 Using Service Orientation to Drive Business Processes
Fri 9:00Fri 9:00 DEVC40 Versioning PanelDEVC40 Versioning Panel
What We’ll Be DiscussingWhat We’ll Be Discussing
What is Service Orientation?What is Service Orientation?What’s all the fuss about?What’s all the fuss about?
Why is it important?Why is it important?
How do I build SO Applications today?How do I build SO Applications today?Where to most appropriately use existing Where to most appropriately use existing technologiestechnologies
Where NOT to use existing technologies Where NOT to use existing technologies …And why!…And why!
System PerformanceSystem Performance
What Is ServiceOrientation (SO)?What Is ServiceOrientation (SO)?
SO is a paradigm, an approach, NOT a SO is a paradigm, an approach, NOT a technology or producttechnology or product
An approach to building An approach to building SystemsSystems using using ServicesServices which adhere to … which adhere to …
The 4 Tenets of Service OrientationThe 4 Tenets of Service OrientationBoundaries are ExplicitBoundaries are Explicit
Services are AutonomousServices are Autonomous
Services share Schema and Contract, not ClassServices share Schema and Contract, not Class
Service compatibility is determined basedService compatibility is determined basedon Policyon Policy
http://msdn.microsoft.com/msdnmag/issues/04/01/Indigo/default.aspxhttp://msdn.microsoft.com/msdnmag/issues/04/01/Indigo/default.aspx
Services And SystemsServices And Systems
A Service is an entity you interact with via A Service is an entity you interact with via message exchangesmessage exchanges
Services are built to lastServices are built to last
Availability and stability are criticalAvailability and stability are critical
A System is a set of deployed Services A System is a set of deployed Services cooperating in a given taskcooperating in a given task
Systems are built to changeSystems are built to change
Adapt to new services after deploymentAdapt to new services after deployment
Services are FractalsServices are FractalsA service can be composed of sub-services…A service can be composed of sub-services…
……Which can be composed of sub-services…Which can be composed of sub-services…
The Microsoft Bet Services EverywhereServices EverywhereThe Microsoft Bet Services EverywhereServices Everywhere
BusinessBusinessNetworksNetworks
PersonalPersonalNetworksNetworks
SocialSocialNetworksNetworks
Value ChainValue ChainNetworksNetworks
CustomerCustomerRelationshipRelationship
NetworksNetworks
ScientificScientificNetworksNetworks
GovernmentGovernmentNetworksNetworks
PurchasingPurchasing
FulfillmentFulfillment
HRHR
PurchasingPurchasing
FulfillmentFulfillment
HRHR
The Microsoft BetServices EverywhereServices EverywhereThe Microsoft BetServices EverywhereServices Everywhere
New YorkNew YorkOperationsOperations
SQL ClusterSQL Cluster
Mobile Mobile Web Web
FrontendFrontend
PurchasingPurchasing
FulfillmentFulfillment
HRHR
The Role Of ObjectsThe Role Of Objects
Object OrientationObject Orientation
Interaction RichnessInteraction RichnessComplete fidelity with local contractComplete fidelity with local contract
Customers have 20+ years of Customers have 20+ years of experience and have built intuition hereexperience and have built intuition here
Boundaries are harder to isolateBoundaries are harder to isolateRequires careful opting outRequires careful opting out
Share types, not schemasShare types, not schemas
Tightly CoupledTightly CoupledTypically require deployment of both Typically require deployment of both client and server in syncclient and server in sync
Assume cheap, transparent Assume cheap, transparent communicationcommunication
object identity and lifetime maintained object identity and lifetime maintained by infrastructureby infrastructure
Platform-based compatibilityPlatform-based compatibilityAssertions built into platformAssertions built into platform
Service OrientationService Orientation
Reduced AssumptionsReduced AssumptionsReduce assumptions between Reduce assumptions between servicesservices
Builds on ideas from component Builds on ideas from component software, distributed objects, and MOM software, distributed objects, and MOM
Boundaries are explicitBoundaries are explicitOpt in modelOpt in model
Share schemas, not typesShare schemas, not types
AutonomousAutonomousSecurity and failure isolation are a Security and failure isolation are a mustmust
Variable cost, explicit communicationVariable cost, explicit communication
Independent deployment of Independent deployment of client/Serviceclient/Service
Policy-based compatibilityPolicy-based compatibilityAssertions use stable global namesAssertions use stable global names
Why Is SO Important?Why Is SO Important?
Provides us an opportunity to rethink how we Provides us an opportunity to rethink how we design and architect tomorrow’s systemsdesign and architect tomorrow’s systems
Minimizing hard interdependenciesMinimizing hard interdependencies
Enhancing independenceEnhancing independence
Easing delivery of composable business appsEasing delivery of composable business apps
Enables a high level of interoperabilityEnables a high level of interoperability
Makes explicit some of the core assumptions Makes explicit some of the core assumptions that compromise today’s systemsthat compromise today’s systems
Particularly around boundaries and locality…Particularly around boundaries and locality…
Benefits Of SOBenefits Of SO
Architecture and DevelopmentArchitecture and DevelopmentFormal interaction model facilitates simplicity, correctness, Formal interaction model facilitates simplicity, correctness, implementation independence, dependency managementimplementation independence, dependency management
IT and OperationsIT and OperationsExplicit interaction points are more discoverable, operableExplicit interaction points are more discoverable, operable
Crisply isolates service capability from IT environmentCrisply isolates service capability from IT environment
Independent deployment, versioning, management, topologyIndependent deployment, versioning, management, topology
BusinessBusinessServices promote technology reuse, resulting in cost savingsServices promote technology reuse, resulting in cost savings
Services model business capabilitiesServices model business capabilities
Systems serve the business, not vice versaSystems serve the business, not vice versa
Inter-departmental or inter-org relationships formalized and Inter-departmental or inter-org relationships formalized and expressed through service interactionexpressed through service interaction
Facilitates outsourcing and focus on core competenciesFacilitates outsourcing and focus on core competencies
PracticalitiesPracticalities
A A common tonguecommon tongue is needed for services is needed for servicesto interactto interact
Boundary, schema, contract, policyBoundary, schema, contract, policy
A SO environment extends only as far as we A SO environment extends only as far as we agree on the expression of the boundaryagree on the expression of the boundary
How far do you want your boundary to extend?How far do you want your boundary to extend?
SO Systems that want broadest possible SO Systems that want broadest possible interoperability will build on the WS-* interoperability will build on the WS-* protocol familyprotocol family
Microsoft offers great tools for building Microsoft offers great tools for building Services Services NOWNOW!!
Building Service-Oriented Applications
Using today’s technologiesUsing today’s technologies
Building Service-Oriented Applications
Using today’s technologiesUsing today’s technologies
Design With SO In MindDesign With SO In Mind
Build SO systems today!Build SO systems today!Improve your chances of interopImprove your chances of interop
Increase autonomy within your systemsIncrease autonomy within your systems
Resultant systems are more resilientResultant systems are more resilient
Easier to versionEasier to version
Migration to “Indigo” will be simplifiedMigration to “Indigo” will be simplified
Building Building fullyfully SO systems today SO systems todaycan be trickycan be tricky
WSE can helpWSE can help
Will be much easier in the futureWill be much easier in the future
Implementing SO todayImplementing SO today
Adopt open standards atAdopt open standards atservice boundariesservice boundaries
Standard transports: HTTP, TCPStandard transports: HTTP, TCP
Standard data formats: XML, XSD, SOAPStandard data formats: XML, XSD, SOAP
Standard protocols: WS-Security, WS-Standard protocols: WS-Security, WS-Addressing, WS-Policy, WS-*, …Addressing, WS-Policy, WS-*, …
Which Technology Should I Use And Where?Which Technology Should I Use And Where?
Build services using ASMXBuild services using ASMX
Components should stay WITHIN your Components should stay WITHIN your Service boundariesService boundaries
Use System.Messaging for async Use System.Messaging for async queued messagingqueued messaging
ASMXASMX
ASMXASMX
.Net Remoting
.Net Remoting
Ent. SvcsEnt. SvcsMSMQMSMQ
At The Service BoundaryAt The Service Boundary
Use ASMX at the Service BoundaryUse ASMX at the Service BoundaryClosely aligned to SO TenetsClosely aligned to SO Tenets
Closest alignment with “Indigo”Closest alignment with “Indigo”
Great interop supportGreat interop support
Use WSE for advanced Web ServicesUse WSE for advanced Web ServicesSupport for WS-* protocolsSupport for WS-* protocols
Interop with systems that demandInterop with systems that demandWS-* supportWS-* support
Great scale-out capabilitiesGreat scale-out capabilities
Inside the Service BoundaryInside the Service Boundary
Consider ASMX Consider ASMX insideinside Service Service boundary too!boundary too!
Use Enterprise Services (ES) if…Use Enterprise Services (ES) if…You need its rich servicesYou need its rich services
Want to re-use/extend existingWant to re-use/extend existingES/COM+ componentsES/COM+ components
We’re doing a lot of work to build a We’re doing a lot of work to build a path to “Indigo” from ESpath to “Indigo” from ES
Asynchronous CommsAsynchronous Comms
Use System.Messaging if you needUse System.Messaging if you needAsynchronous messagingAsynchronous messaging
Reliable messaging and queuing Reliable messaging and queuing
““Fire and Forget” messagingFire and Forget” messaging
Note: System.Messaging namespace Note: System.Messaging namespace not carried forward to “Indigo”not carried forward to “Indigo”
““Indigo” natively supportsIndigo” natively supportsQueueing semantics Queueing semantics
But What About Remoting?But What About Remoting?
Use .NET Remoting when appropriateUse .NET Remoting when appropriateOnly Only insideinside the Service! the Service!
Inproc X-AppDomain commsInproc X-AppDomain comms
Handling custom wire protocolsHandling custom wire protocols
Avoid exposing Remoted components Avoid exposing Remoted components at Service Boundariesat Service Boundaries
Remoting is an object technology – not Remoting is an object technology – not aligned with SO principlesaligned with SO principles
Limited interopLimited interop
Limited future migration to “Indigo”Limited future migration to “Indigo”
Today’s CaveatsToday’s Caveats
ASMX ASMX Avoid or abstract using low-level extensibility Avoid or abstract using low-level extensibility such as the HTTP Context objectsuch as the HTTP Context object
Enterprise ServicesEnterprise ServicesAvoid passing object references inside of ESAvoid passing object references inside of ES
Native COM+ and MSMQNative COM+ and MSMQUse .NET System.EnterpriseServices and Use .NET System.EnterpriseServices and System.Messaging – do not use native COM+ and System.Messaging – do not use native COM+ and MSMQ APIsMSMQ APIs
.NET Remoting.NET RemotingAvoid or abstract using low-level extensibility Avoid or abstract using low-level extensibility such as .NET Remoting sinks and channelssuch as .NET Remoting sinks and channels
Distributed Technology Performance
Enterprise Services, Remoting, and Enterprise Services, Remoting, and ASMXASMX
Distributed Technology Performance
Enterprise Services, Remoting, and Enterprise Services, Remoting, and ASMXASMX
ASMX PerformanceASMX Performance
Customer: Customer: “Won’t my app slow down if I “Won’t my app slow down if I convert it to an ASMX fronted service?”convert it to an ASMX fronted service?”Not necessarily…what % of your method Not necessarily…what % of your method calls are work?calls are work?
More work than call – probably minimal impactMore work than call – probably minimal impactMore call than work – possible impactMore call than work – possible impact
General guidelinesGeneral guidelinesOnly call when you need toOnly call when you need toWhen you do, perform lots of workWhen you do, perform lots of workOnly pass what you need on the wireOnly pass what you need on the wire
These are immutable guidelines for all These are immutable guidelines for all distributed systems!distributed systems!
Enterprise Services PerformanceEnterprise Services Performance
Customer: Customer: “Will my code slow down “Will my code slow down significantly if I port my components to ES?”significantly if I port my components to ES?”
Not if you follow our guidelinesNot if you follow our guidelines
Use JIT Activation (JITA) and Object PoolingUse JIT Activation (JITA) and Object PoolingAmortize cost of instantiation over manyAmortize cost of instantiation over manymethod callsmethod calls
Make methods perform substantial workMake methods perform substantial work
Minimize number of method calls required Minimize number of method calls required on COM+/ES componentson COM+/ES components
See a pattern emerging here? See a pattern emerging here?
COM+ Versus ES PerformanceCOM+ Versus ES PerformanceGotchas to be aware of:Gotchas to be aware of:
ES objects require more work to create and destroy ES objects require more work to create and destroy than COM+ objectsthan COM+ objects
In .NET 1.x - 5 calls to activate ES versus 3 for COM+In .NET 1.x - 5 calls to activate ES versus 3 for COM+Resolved in .NET 2.0, but ES components still incur overhead Resolved in .NET 2.0, but ES components still incur overhead over COM+over COM+
Always explicitly dispose of ES objects when Always explicitly dispose of ES objects when finishedfinished
If used effectively, ES can match COM+ in If used effectively, ES can match COM+ in performance!performance!
Plan to use JIT Activation & Pooling to amortize Plan to use JIT Activation & Pooling to amortize creation and destruction cost over many callscreation and destruction cost over many calls
See “Enterprise Services Performance” paper See “Enterprise Services Performance” paper on MSDN:on MSDN:
http://msdn.microsoft.com/library/en-us/dncomser/html/entsvcperf.asphttp://msdn.microsoft.com/library/en-us/dncomser/html/entsvcperf.asp
ES CAN Match COM+ Perf!ES CAN Match COM+ Perf!
0
50
100
150
200
250
Calls per second
JITA COM+ and ES components(Heavy Method Calls)
C++/ATL
VB6
C#
VB.NET
C++/ATL 245.4 243.3 242.9
VB6 247.6 245.4 245.2
C# 247.6 243.3 238.5
VB.NET 245.4 245.4 238.5
In Process Out Of Process Cross Machine
http://msdn.microsoft.com/library/en-us/dncomser/html/entsvcperf.asphttp://msdn.microsoft.com/library/en-us/dncomser/html/entsvcperf.asp
Remoting VersusASMX PerformanceRemoting VersusASMX Performance
See Ingo Rammer’s perf comparison See Ingo Rammer’s perf comparison paper (paper (www.ingorammer.comwww.ingorammer.com))
Results are as followsResults are as followsTCP-Channel Binary RemotingTCP-Channel Binary Remotingis the quickestis the quickest
Binary Remoting of component hosted in Binary Remoting of component hosted in IIS is generally next fastestIIS is generally next fastest
ASMX is a little faster than Remoting ASMX is a little faster than Remoting SOAP over HTTP!SOAP over HTTP!
Performance GuidelinesPerformance Guidelines
Good practices apply across all distributed Good practices apply across all distributed technologies!technologies!
Minimize NW traversalsMinimize NW traversals
Chunky interfaces == better perf than chattyChunky interfaces == better perf than chatty
Component technologies often obscure boundariesComponent technologies often obscure boundariesDesign/dev assumptions do not equate toDesign/dev assumptions do not equate todeployment-time realitiesdeployment-time realities
Resulting in compromised perfResulting in compromised perf
SO systems make up-front assumptions about SO systems make up-front assumptions about boundariesboundaries
Usually results in more pragmatic designsUsually results in more pragmatic designsand implementationsand implementations
Usually deliver good performance, despite traffic overheads!Usually deliver good performance, despite traffic overheads!
SummarySummary
Service Orientation supports the building of Service Orientation supports the building of autonomous, resilient, dynamic, agile autonomous, resilient, dynamic, agile Connected SystemsConnected Systems
Build SO systems today!Build SO systems today!Use .NET technologies appropriately forUse .NET technologies appropriately formaximum effectmaximum effect
High-performance CAN be achievedHigh-performance CAN be achieved
You will benefit from more dynamic, agile, You will benefit from more dynamic, agile, composable systemscomposable systems
For more info and other links on thisFor more info and other links on thissubject, visitsubject, visit
http://blogs.msdn.com/richturner666http://blogs.msdn.com/richturner666
Q1:Q1: Overall satisfaction with the sessionOverall satisfaction with the session
Q2:Q2: Usefulness of the informationUsefulness of the information
Q3:Q3: Presenter’s knowledge of the subjectPresenter’s knowledge of the subject
Q4:Q4: Presenter’s presentation skillsPresenter’s presentation skills
Q5:Q5: Effectiveness of the presentationEffectiveness of the presentation
Please fill out a session evaluation on CommNetPlease fill out a session evaluation on CommNet
Attend a free chat or web castAttend a free chat or web casthttp://www.microsoft.com/communities/chats/default.mspxhttp://www.microsoft.com/communities/chats/default.mspx http://www.microsoft.com/usa/webcasts/default.asphttp://www.microsoft.com/usa/webcasts/default.asp
List of newsgroupsList of newsgroupshttp://communities2.microsoft.com/http://communities2.microsoft.com/communities/newsgroups/en-us/default.aspxcommunities/newsgroups/en-us/default.aspx
MS Community SitesMS Community Siteshttp://www.microsoft.com/communities/default.mspxhttp://www.microsoft.com/communities/default.mspx
Locate Local User GroupsLocate Local User Groupshttp://www.microsoft.com/communities/usergroups/default.mspxhttp://www.microsoft.com/communities/usergroups/default.mspx
Community sitesCommunity siteshttp://www.microsoft.com/communities/related/default.mspxhttp://www.microsoft.com/communities/related/default.mspx
© 2004 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.