News In Wcf40

1,276 views

Published on

These are the slides for the "News in WCF4.0" presentation from 20th of feb 2010 in Iasi at Ramada (details at codecamp.ro)

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,276
On SlideShare
0
From Embeds
0
Number of Embeds
34
Actions
Shares
0
Downloads
29
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

News In Wcf40

  1. 1. News in WCF 4.0<br />Iaşi, 20 februarie 2010<br />Florin Cardaşim, www.rms.ro<br />
  2. 2. Agenda<br />
  3. 3. Simplified Configuration<br />It’s easier to get started with WCF 4.0<br /><ul><li>Default endpoints, binding configurations, behavior configurations
  4. 4. Hosting in IIS without .svc file</li></ul>… but for scenarios other than “common” WCF configuration is still a non-trivial task<br />DEMO<br />
  5. 5. Service Discovery<br />WS-* WS-ServiceDiscovery<br />SOAP-based protocol for dynamically discovering the location of service endpoints at runtime<br />Adhocmode <br />Direct client-service multicast messages over UDP<br />Managed mode<br />A discovery proxy “manages” the discoverable service endpoints<br />
  6. 6. Adhoc Service Discovery<br /><ul><li>Multicast UDP messages
  7. 7. Search based on criteria (ex: contract name, version etc)
  8. 8. Services answer directly
  9. 9. Services may “announce” online/offline
  10. 10. ONLY on local subnet</li></ul> UDP multicast<br />Client<br />Services<br />search answer<br />Client<br />Services<br />Clients<br />Services<br />announce online/offline<br />
  11. 11. Demo: “Basic”<br /><ul><li>Server: ServiceDiscoveryBehavior, UdpDiscoveryEndpoint
  12. 12. Client: DynamicEndpoint</li></ul>UdpDiscoveryEndpoint<br />ICalculatorService<br />net.tcp://…/CalculatorService/Guid<br />Client<br />Service<br />
  13. 13. Demo: “AsyncFind”<br /><ul><li>Server: ServiceDiscoveryBehavior, UdpDiscoveryEndpoint
  14. 14. Client: DiscoveryClient, FindCriteria</li></ul>asynchronously<br />UdpDiscoveryEndpoint<br />ICalculatorService<br />net.tcp://…/CalculatorService/Guid<br />Client<br />Service<br />
  15. 15. Demo: “Announcements”<br />AnnouncementService<br />Server: ServiceDiscoveryBehavior, UdpAnnouncementEndpoint<br />Client: AnnouncementService, UdpAnnouncementEndpoint<br />See also the “Configuration” sample<br />Client<br />UdpAnnouncementEndpoint<br />Service<br />CalculatorProxy<br />ICalculatorService<br />net.tcp://…/CalculatorService/Guid<br />
  16. 16. Demo: “Mex Explorer”<br /><ul><li>Juval Lowy, IDesign.Net
  17. 17. A wonderfull WCF book: “Programming WCF Services”</li></li></ul><li>Managed Service Discovery<br /><ul><li>Services “announce” Disco Proxy
  18. 18. Clients “ask” Disco Proxy
  19. 19. More flexible, reduces multicasts traffic</li></ul>Client<br />Services<br />Client<br />Services<br />Discovery Proxy<br />Clients<br />Services<br />answer<br />search<br />announce online/offline<br />
  20. 20. Demo: “DiscoveryProxy”<br />AnnouncementEndpoint<br />net.tcp://localhost:9021/Announcement<br />DiscoveryProxy: DiscoveryProxy, DiscoveryEndpoint, AnnouncementEndpoint<br />Service: ServiceDescoveryBehavior, AnnouncementEndpoint<br />Client: DiscoveryClient, DiscoveryEndpoint<br />DiscoveryEndpoint<br />net.tcp://localhost:8001/Probe<br />DiscoveryProxy<br />ICalculatorService<br />net.tcp://…/CalculatorService/Guid<br />Client<br />Service<br />
  21. 21. REST Improvements<br />Automatic Help Page<br />HTTP Caching Support<br />Error handling enhancements<br />WebFaultException, WebFaultException<T><br />Various API enhancements<br /><ul><li>Until now CodePlex “Rest Starter Kit”
  22. 22. Now in .NET 4.0</li></li></ul><li>Demo: “BasicHttpService”<br />Automatic Help Page<br /><ul><li>helpEnabled = true - default
  23. 23. http://localhost:8000/help</li></li></ul><li>Demo: “AspNetCachingIntegration”<br />HTTP Caching Support<br />
  24. 24. Demo: Error handling<br />WebFaultException, WebFaultException<T><br />
  25. 25. Routing Service<br />When do we need a routing service?<br /><ul><li>Centralized security boundary
  26. 26. Load balancing
  27. 27. Protocol bridging
  28. 28. Content based routing for licensing, prioritization, versioning etc</li></ul>Routing Service<br />One-way<br />Request-reply<br />Duplex<br />Services<br />Client<br />Services<br />Client<br />Services<br />Clients<br />
  29. 29. Routing Service<br />Supported communication patterns<br />Filters<br />
  30. 30. Demo: “HelloRoutingService”<br />IMetadataExchangeEP<br />Client connects to RouterService<br />Calls are routed to ICalculatorEP based on the MatchAll filter<br />The routing service has a proxy to the CalculatorService<br />IRequestReplyRouterEP<br />IMetadataExchangeEP<br />RoutingService<br />Client<br />CalculatorService<br />ICalculatorEP<br />Internal Proxy<br />
  31. 31. Demo: RouterBridgingAndErrorHandling<br />Client connects to RouterService via HTTP<br />Calls are routed to deadDestination based on the MatchAll filter<br />deadDestination is not reachable so go to realDestination<br />deadDestination<br />IRequestReplyRouterEP<br />RoutingService<br />HTTP<br />Client<br />Internal Proxy<br />realDestination<br />CalculatorService<br />TCP<br />
  32. 32. References<br />MSDN article by Aaron Skonnard, Pluralsight.com<br />Articles by Michele Bustamante, dasblonde.net<br />Articles by Juval Lowy, IDesign.net<br />Channel9<br />Ed Pinto at PDC 2009, microsoftpdc.com/<br />VS2010 Training Kit<br />Get Visual Studio 2010 RC now and play with it!<br />
  33. 33. Please fill the evaluation form !!!<br />Thank you very much<br />Florin Cardasim<br /><ul><li>florin.cardasim@rms.ro
  34. 34. www.rms.ro
  35. 35. www.codecamp.ro
  36. 36. www.Twitter.com/cardasim</li>

×