1 / 28

Windows Communications Foundation ("Indigo"): Developing Manageable Web Services

Windows Communications Foundation ("Indigo"): Developing Manageable Web Services. Alex Weinert COM308 Lead Program Manager Windows Communication Foundation Microsoft Corporation. About This Talk. Manageability principles Built in WCF Management Features

ayita
Télécharger la présentation

Windows Communications Foundation ("Indigo"): Developing Manageable Web Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows Communications Foundation ("Indigo"): Developing Manageable Web Services Alex Weinert COM308 Lead Program Manager Windows Communication Foundation Microsoft Corporation

  2. About This Talk • Manageability principles • Built in WCF Management Features • How you can make your WCF services more manageable

  3. Energy And Entropy Management features are a way to present a homogenous view of things in a heterogeneous environment User View App Code Admin View Administrator: values SIMILARITY End-user: values UNIQUENESS User View App Code Admin View User View App Code Admin View App logic contributes to both user view and admin view.

  4. HUMAN Conceptualization Conception Birth Childhood Teen Angst Productive Years The Golden Years SOFTWARE Design/Arch Development Deployment Configuration Troubleshooting Monitoring Reconfiguration The Life And Times… The Fun/Short Part The Hard/Long (useful) Part

  5. WCFWhat WE do for IT pros • Configuration system which allows post-deployment tuning and control of many aspects of service • Tracing sources provide traces for service internals, logged messages, activities • Performance counters for key operation, security, reliability, transaction statistics • WMI Provider allows scriptable query support for all aspects of running services • Windows Event Log helps with diagnosis of deployment problems • Configuration Editor and Trace Viewer in the SDK simplify common IT Pro tasks

  6. Demo Scenario: Dan Brown’s Digital Fortress (With the kind permission of St. Martin’s Press)

  7. Digital Fortress Cmdr. Strathmore administers TRANSLTR … a billion-$ govt. computer to decrypt any code. Then someone invents Digital Fortress: an encryption algorithm that can’t be broken. Strathmore conspires to hide his dilemma … But the IT Pros see something is wrong with TRANSLTR. So, the conspiracy is exposed by the management interfaces.

  8. Node 3 – User Interface NSA Data: Façade Service Gauntlet: Virus Detection TRANSLTR: Decryption Data Bank: Storage Digital Fortress

  9. WCF Management Features

  10. Tools Cheat Sheet • You’ll find the tools in • “\Program Files\Microsoft SDKs\WinFX\bin” • Trace Viewer: SvcTraceViewer • Configuration Editor: SvcConfigEditor • You must override strong name validation to use the svcConfigEditor. • From a command prompt type: • “sn –Vr svcConfigEditor.exe”

  11. The Challenge • We are putting basic instrumentation, control mechanisms, diagnostics “in the box” with WCF • Much of what you’ve had to code in the past is now done for you in the framework • You’ll get manageable Web Services with WCF even if you don’t code for manageability • You can raise the bar for manageability! • Now that you don’t need to write timer code to determine latency, throughput, error rates… • What can you do with that same investment?

  12. What YOU Do For IT Pros • Management interfaces expose key insights and controls on your service • Traces assist diagnostics and supportability of your application • Counters measure what matters for your service • WMI objects provide scriptable query support for your management objects • UI presents an IT experience for your application

  13. Use The Configuration System! • What goes in code • Business logic • Instancing, concurrency, autoenlist/complete • What goes in config • Endpoints • Bindings • Behaviors • Clients • Diagnostics

  14. Adding A Management Service Interface • Why: Inspection, Control • What: IManageFoo – Management interface gives key data, control access into the app • How: Add another contract, make it a [ServiceContract] [ServiceContract] interface MyAdminContract{ public void UpdateConfiguration(void); } public class MyService:MyContract, MyAdminContract { … }

  15. Walkthrough Adding a Management Interface

  16. Adding Traces • Why: Diagnostics, Supportability. • What: Key milestones in processing, detailed data at different levels • How: Create a trace source, use it to emit traces. using System.Diagnostics; public class MyService:MyContract, MyAdminContract { public void DoSomething(){ TraceSource mySource = new TraceSource(“MyService”); mySource.TraceInformation(“I am doing something.”); } }

  17. WalkthroughAdding custom traces

  18. Adding Counters • Why: Monitoring, Trending • What: Key business level metrics, trends • How: Create a perf counter, create an instance with appropriate name, use it. • Hint: Consider instance lifetime when creating counters! using System.Diagnostics; PerformanceCounterCategory category = PerformanceCounterCategory.Create( "MyCategory", "MyDesc", PerformanceCounterCategoryType.MultiInstance, "MyCounter", "MyCtrDesc"); PerformanceCounter counter = new PerformanceCounter( "MyCategory", "MyCounter", "InstanceName", false); counter.Increment();

  19. WalkthroughAdding counters

  20. Adding WMI Objects • Why: Monitoring, Scripting • What: Internals of your app • How: Create a class, attribute it, instance it, register it using System.Management.Instrumentation; [InstrumentationClass(InstrumentationType.Instance)] public class AdminInfo {public string importantStuff;} public class myService:myInterface { public myService(){ info = new AdminInfo(); Instrumentation.Publish(info); } protected AdminInfo info;}

  21. Walkthrough Creating a WMI object

  22. Building Management UI • Why: Dashboard for your app. • What: One stop shopping. • How: Use System.Diagnostics and Systems.Management client APIs • Hint: In Server, everything I’ve shown you from WMI is available via WS-Management

  23. WalkthroughBuilding Management UI

  24. Summary • WCF Apps are manageable out of the box • Deployment flexibility • SLA monitoring • End to end diagnostics • You can make them even better • Create Management Endpoints • Add instrumentation • Build custom UI for admins

  25. Community Resources • At PDC • For more information, go see • COM307 - Windows Communications Foundation ("Indigo"): Writing Reliable and Transacted Distributed Applications (Wed 3:15pm) • COM320 - IIS 7: Instrumenting, Diagnosing, and Debugging Web Applications (Thu 11:30am) • FUN316 - Windows Vista & "Longhorn" Server: Publishing and Consuming Events (Thu 2:15pm) • Labs: COMHOL25 – Management • Ask The Experts table: WCF • Product Pavilion: I’ll be there Thu 9:00am-12:00pm • COM Track lounge: I’ll be there Thu 12:30-3:30pm • After PDC • MSDN dev center: http://msdn.microsoft.com/webservices/ • Channel 9 tag: http://channel9.msdn.com/tags/Indigo • Contact me: Alex.Weinert@microsoft.com

  26. Questions?

  27. Use the PDC Management Tool!!! namespace PDC { //Fill out your evaluation for a copy of Digital Fortress [ServiceContract(Session=true)] public interface IEvaluation { [OperationContract] DigitalFortressNovel Submit(Evaluation yourEvaluation); } }

  28. © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

More Related