240 likes | 342 Views
Declarative Services in .NET 4.0 Alan Smith. SDC 2010 – 16 th March 2010. Alan Smith. Developer, Trainer, Mentor, Evangelist Know IT Consulting “Connected Systems Developer” MVP Microsoft “Connected Technology Advisor” Contact: www.CloudCasts.net geekswithblogs.net/asmith
E N D
Declarative Services in .NET 4.0Alan Smith SDC 2010 – 16th March 2010
Alan Smith • Developer, Trainer, Mentor, Evangelist • Know IT Consulting • “Connected Systems Developer” MVP • Microsoft “Connected Technology Advisor” • Contact: • www.CloudCasts.net • geekswithblogs.net/asmith • bloggersguidetobiztalk@gmail.com
.NET 4.0 at your Service • Windows Communication Foundation (WCF) • Simplified Configuration • WS-Discovery • Routing Service • Improved REST support
.NET 4.0 at your Service • Windows Workflow Foundation (WF) • New workflow runtime • New workflow designer • New activity model • New WCF integration capabilities
.NET 4.0 at your Service • WCF Workflow Services • Workflow designer used to create WCF services • Workflow exposed through WCF endpoint • Powerful integration with WCF • One of many uses for WF
.NET 4.0 at your Service • Windows Server AppFabric Application Server Extensions (AppFabric) • Formally “Codename Dublin” • Enhanced WCF and WF hosting capabilities • Workflow persistence • Workflow and service management • Distributed in-memory cache (formally “Codename Velocity”)
Classic WCF Service [ServiceContract(Name = "OrderManagement")] publicinterfaceIOrderManagement { [OperationContract] void RegisterOrder(Order newOrder); [OperationContract] void ConfirmOrder(Order newOrder); [OperationContract] void CancelOrder(Order newOrder); } Client can call methods in any order Service is instanced on per-call basis Order state is maintained in LOB Database
Classic WCF Implementation Client AppFabric Order Manager Service Cancel Id = 789 Confirm Id = 456 Register Id = 123 Register Id = 456 Register Id = 789 Conform Id = 123 Warehouse Database
Stateful Services – Classic WCF • Client maintains session with service • Secure session • Reliable session • Transport session • Service instancing configured appropriately • Per call • Per session • Single
WCF Workflow Service RegisterOrder creates workflow instance Order state is maintained in workflow instance ConformOrder or CancelOrder is then called Correlation needed between service calls
Register (123) Client AppFabric Order Manager Service 123 123 Register Id = 123 Confirm Confirm Cancel Cancel AppFabric Persistence Database
Register (456) Client AppFabric Order Manager Service 456 123 456 Register Id = 456 Confirm Confirm Confirm Cancel Cancel Cancel AppFabric Persistence Database
Confirm (123) Client AppFabric Order Manager Service 123 123 456 123 123 Conform Id = 123 Confirm Confirm Confirm Confirm Confirm Cancel Cancel Cancel Cancel Cancel AppFabric Persistence Database
Register (789) Client AppFabric Order Manager Service 456 123 789 789 Register Id = 789 Confirm Confirm Confirm Confirm Cancel Cancel Cancel Cancel AppFabric Persistence Database
Cancel (789) Client AppFabric Order Manager Service 789 123 456 789 789 789 Cancel Id = 789 Confirm Confirm Confirm Confirm Confirm Confirm Cancel Cancel Cancel Cancel Cancel Cancel AppFabric Persistence Database
Confirm (456) Client AppFabric Order Manager Service 456 123 456 456 789 456 Confirm Id = 456 Confirm Confirm Confirm Confirm Confirm Confirm Cancel Cancel Cancel Cancel Cancel Cancel AppFabric Persistence Database
AppFabric Hosting Architecture Visual Studio IIS Manager PowerShell System Centre App Fabric Tools App Cmdlets Runtime Services & Components Persistence Hosting Monitoring WCF WF ETW ASP.NET IIS / WAS SQL Server Monitoring Persistence
Services Going 4ward… • WCF • Clean migration path for projects and developer skills • Additional features simplifies configuration and enhances functionality
Services Going 4ward… • WCF Workflow Services • New implementation of WF • Will not replace traditional service development • Evaluate and use where appropriate • Should the service be implemented as a process?
Services Going 4ward… • Windows Server AppFabric • Great to have for tracing, monitoring and management of traditional WCF services • Must-have for WCF Workflow Services • Distributed in-memory cache features are powerful (formally “Codename Velocity”)
Further Development • Bits • Visual Studio 2010 RC • Windows Server AppFabric Beta 2 • Webcasts • www.CloudCasts.net • Questions • bloggersguidetobiztalk@gmail.com • User Groups • SweNug has many events planned for 2010 • Training • WCF, WF and AppFabric courses at Informator