Lukáš Kubis lukas.kubis@student-partners.com MSP pro VŠB-TU Ostrava
Agenda Simplified Configuration Discovery Routing Service Other Features
WCF
Service Communication Service 1 Service 2 Caller Message Service Message
A Look at WCF: Endpoints Client Service Endpoint Message Endpoint Endpoint
A Look at WCF: Address, Binding, Contract Client Service Message A B C C B A A B C Address Binding Contract (Where) (How) (What)
Metadata Metadata Caller Service A B C Message C B A A B C
Behaviors Metadata Caller Service Bv A B C Bv Bv Message C B A A B C Bv
Runtime Metadata Caller Service Bv A B C Bv Bv Message C B A A B C Bv Proxy ServiceHost<T>()
WCF - Service - Host - Client
AGENDA Simplified Configuration Discovery Routing Service Other Features
Simplified Configuration Default Endpoints Default Protocol Mapping Default Binding Configurations Default Behavior Configurations Standard Endpoints Simplifying IIS/ASP.NET Hosting
Default Endpoints Service new Uri( http://localhost:8090/service ) ServiceHost<T>() App.Config
Default Endpoints Service new Uri( http://localhost:8090/service ) AddServiceEndpoint( ) NO DEFAULT ENDPOINTS ServiceHost<T>() AddDefaultEndpoints( )
Default Protocol Mapping Mapovací tabulka (http - basichttpbinding) Machine.config
Default Protocol Mapping Defaultní mapování Lokální Globální Lokální v souboru app.config/web.config Globální Beta 1 v souboru machine.config Beta 2 mapování odebráno z machine.config z výkonnostních důvodů!!!
Default Binding Configurations Bez atributu NAME!!!
Default Binding Configurations
Default Behavior Configurations Bez atributu NAME!!!
Default Behavior Configurations
Standard Endpoints kind= endpointname Název mexendpoint announcementendpoint discoveryendpoint udpannouncementendpoint udpdiscoveryendpoint workflowcontrolendpoint webhttpendpoint webscriptendpoint Popis mexhttpbinding, IMetadataExchange Pro funkcionalitu oznámení Pro operace hledání (Find, Resolve) Pro funkcionalitu oznámení přes UDP Pro operace hledání (Find, Resolve) přes UDP Pro kontrolu vykonávaní workflow webhttpbinding a webhttpbehavior webhttpbinding a webscriptenablingbehavior
- Default Endpoints - Protocol Mapping - Binding Configurations - Behavior Configurations
AGENDA Simplified Configuration Discovery Routing Service Other Features
Discovery Dva módy: AD hoc mód v lokálním subnetu Managed mód Využívá WS-Discovery protokol http://en.wikipedia.org/wiki/ws-discovery
Discovery Service Service Service IService2 IService3 Service IService1 Message IService4 Message Message Message Message Client Chci službu IService1
Discovery Service Endpoint Service Endpoint
Discovery Client Endpoint Client Endpoint 1. DiscoveryClient 2. FindCriteria 3. FindResponse Find, void FindAsync
Discovery AD Hoc mode
Discovery Scopes
Discovery Scopes EndpointBehavior
Discovery - Scopes
Discovery Extension Metadata Lze přidat doplňují informace (např. uživatelské jméno)
Discovery - Extension Metadata
Discovery Announcements
Discovery Announcements App.config
Discovery Announcements
Discovery - Announcements
Discovery Managed mode
Discovery Managed mode Není omezen na lokální subnet (AD Hoc mode) Potřebné 2 endpointy: UdpAnnounecementEndpoint (online/offline) UdpDiscoveryEndpoint
Discovery Managed mode Zabili Kenny je Kennyho online žije? Discovery Proxy Message
Discovery - Managed Mode
AGENDA Simplified Configuration Discovery Routing Service Other Features
Routing Service Service1 Caller Message Router Message Message Service2
Routing Service WCF 3.x Neexistovala oficiální podpora Pomocí API lze vytvořit vlastní routing services WCF 4.x Oficiální podpora!!! Nová třída RoutingService
Routing Service Hostování Service A B C A B C Address Binding Contract ISimplexDatagramRouter ISimplexSessionRouter IRequestReplyRouter IDuplexSessionRouter
Routing Service Filtry Action EndpointAddress PrefixEndpointAddress And Custom EndpointName MatchAll XPath
RoutingService
Protocol Bridging Caller Router Service wshttpbinding nettcpbinding
AGENDA Simplified Configuration Discovery Routing Service Other Features
Other Features REST Improvements Automatic Help Page HTTP Caching Support Workflow Services
SUMMARY Simplified Configuration Discovery Routing Service Other Features
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.