SlideShare une entreprise Scribd logo
1  sur  27
What’s New in WCF 4.0



  Eyal Vardi
  CEO E4D Solutions LTD
  Microsoft MVP Visual C#
  blog: www.eVardi.com
Agenda

• Simplified Configuration

• Discovery

• Routing Services
Simplified Configuration
Simplified Configuration
Kind Attribute
• Set the type of the standard endpoint

 <service name="HelloService">
      ...
      <endpoint binding="webHttpBinding" contract= "IService1"
                kind= "webHttpEndpoint" />

     <endpoint kind="mexEndpoint" />                  No need in
     <endpoint kind="webHttpEndpoint" />         bindingConfiguration

 </service>                                     endpointConfiguration
Custom Standard Endpoint
• Standard endpoint must be registered in the
  <endpointExtensions> section.

   <system.serviceModel>
      <service name="HelloService">
        <endpoint kind= "udpDiscoveryEndpoint" />
      </service>

      <extensions>
         <endpointExtensions>
             <add name="udpDiscoveryEndpoint" type="..." />
         </endpointExtensions>
      </extensions>
   </system.serviceModel>
Standard Endpoint
Service Discovery
Why We Need Discovery?
Async WCF Services
WS – Discovery
Service Opened

                 Hello   Target
      Client
                         Service




                         Target
      Client
                         Service




                         Target
      Client
                         Service
WS – Discovery
Client Look for Service

                Probe     Target
       Client
                          Service




                          Target
       Client
                          Service




                          Target
       Client
                          Service
WS – Discovery
Service Return Match Message

                   Probe Match   Target
      Client
                                 Service




                                 Target
      Client
                                 Service




                                 Target
      Client
                                 Service
WS – Discovery
Service Closed

                 By   Target
      Client
                      Service




                      Target
      Client
                      Service




                      Target
      Client
                      Service
Basic Discovery
Discovery Announcements
Routing Services
Router Service Architecture
                      Client



                       Router     Filter
                                                 Filters
                       Service   Tables
 Server A




     Service A   Service B                 Service C

   Server B                           Server C
Router Endpoints & Contracts
  <service name ="System.ServiceModel.Routing.RoutingService">
     <endpoint name = "reqReplyEndpoint"
         address = ""
         binding = "basicHttpBinding"
         contract = "System.ServiceModel.Routing.IRequestReplyRouter"
      />
  </service>
Configuring Filters
• The RouterService evaluates filters to determine
  how to forward the message.
  <serviceBehaviors>
     <behavior>
        <routing filterTableName="MyRoutingTable" />
   <routing>
     </behavior>
     <filters>
  </serviceBehaviors>
        <filter name="MatchAllFilter1" filterType="MatchAll" />
     </filters>
     <filterTables>
        <filterTable name="MyroutingTable">
          <add filterName="MatchAllFilter1"
                     endpointName="CalculatorService" />
        </filterTable>
     </filterTables>
                                  <client>
   </routing>
                                     <endpoint name="CalculatorService"
                                               address="http://..."
                                               binding="basicHtttpBinding"
                                               contract="*" >
                                  </client>
Routing Services
Error Handing
• You can define different lists of alternate endpoints that will be
  used if communicating with the initial target endpoint results in
  an error.
    <routing>
      ...
          <filterTable name="MyroutingTable">

                <add filterName   ="f1"
                     endpointName ="t1"
                     backupList   ="altEndpoints" />

         </filterTable>
      ...
      <backupLists>
          <backupList name="altEndpoints">
               <add endpointName="CalculatorService2"/>
          </backupList>
      </backupLists>
    </routing>
Multicast Routing Behavior
• Supports automatically routing a particular
  incoming message to multiple destinations in a
  “multicast” fashion.
   <routing>
     <filters>
        <filter name="Filter1" filterType="MatchAll" />
     </filters>
     <filterTables>                                       “Multicast”
        <filterTable name="MyroutingTable">

              <add filterName="Filter1"   endpointName="Target1" />
              <add filterName="Filter1"   endpointName="Target2" />
              <add filterName="Filter1"   endpointName="Target3" />

        </filterTable>
     </filterTables>
   </routing>
Summary

• Simplified Configuration

• Discovery

• Routing Services
Resources
• http://blogs.microsoft.co.il/blogs/vardi/
• A Developer’s Introduction to WCF 4 Beta 1
• Service Configuration Improvements in .NET 4
• What’s New in WCF 4.0?
• Jesus Rodriguez's WebLog
Whats new in WCF 4.0

Contenu connexe

Tendances

Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Abdul Khan
 
Wcf architecture overview
Wcf architecture overviewWcf architecture overview
Wcf architecture overviewArbind Tiwari
 

Tendances (6)

Web Services - WSDL
Web Services - WSDLWeb Services - WSDL
Web Services - WSDL
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
WCF Introduction
WCF IntroductionWCF Introduction
WCF Introduction
 
Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
 
Wcf architecture overview
Wcf architecture overviewWcf architecture overview
Wcf architecture overview
 

Similaire à Whats new in WCF 4.0

What is new in WCF 4.0?
What is new in WCF 4.0?What is new in WCF 4.0?
What is new in WCF 4.0?Bala Subra
 
Consul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesConsul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesArmonDadgar
 
Managing Microservices With The Istio Service Mesh on Kubernetes
Managing Microservices With The Istio Service Mesh on KubernetesManaging Microservices With The Istio Service Mesh on Kubernetes
Managing Microservices With The Istio Service Mesh on KubernetesIftach Schonbaum
 
Servicehost Customization
Servicehost CustomizationServicehost Customization
Servicehost CustomizationEyal Vardi
 
Microservices - Hitchhiker's guide to cloud native applications
Microservices - Hitchhiker's guide to cloud native applicationsMicroservices - Hitchhiker's guide to cloud native applications
Microservices - Hitchhiker's guide to cloud native applicationsStijn Van Den Enden
 
Global Scale ESB with Mule
Global Scale ESB with MuleGlobal Scale ESB with Mule
Global Scale ESB with MuleAndrew Kennedy
 
Clean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NETClean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NETMarcin Tyborowski
 
Swift distributed tracing method and tools v2
Swift distributed tracing method and tools v2Swift distributed tracing method and tools v2
Swift distributed tracing method and tools v2zhang hua
 
Windows Communication Foundation Extensions
Windows Communication Foundation ExtensionsWindows Communication Foundation Extensions
Windows Communication Foundation Extensionsgabrielcerutti
 
Service mesh in action with onap
Service mesh in action with onapService mesh in action with onap
Service mesh in action with onapHuabing Zhao
 
Ws discovery in wcf 4
Ws discovery in wcf 4Ws discovery in wcf 4
Ws discovery in wcf 4sanket2013
 
WSO2Con USA 2014 - Identity Server Tutorial
WSO2Con USA 2014 - Identity Server TutorialWSO2Con USA 2014 - Identity Server Tutorial
WSO2Con USA 2014 - Identity Server TutorialPrabath Siriwardena
 
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
Pros and Cons of a MicroServices Architecture talk at AWS ReInventPros and Cons of a MicroServices Architecture talk at AWS ReInvent
Pros and Cons of a MicroServices Architecture talk at AWS ReInventSudhir Tonse
 
JSFI - Dynamic RCP Desktop Application
JSFI - Dynamic RCP Desktop ApplicationJSFI - Dynamic RCP Desktop Application
JSFI - Dynamic RCP Desktop ApplicationAlper Türkyılmaz
 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & RESTSanthu Rao
 

Similaire à Whats new in WCF 4.0 (20)

What is new in WCF 4.0?
What is new in WCF 4.0?What is new in WCF 4.0?
What is new in WCF 4.0?
 
Consul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesConsul: Service Mesh for Microservices
Consul: Service Mesh for Microservices
 
Managing Microservices With The Istio Service Mesh on Kubernetes
Managing Microservices With The Istio Service Mesh on KubernetesManaging Microservices With The Istio Service Mesh on Kubernetes
Managing Microservices With The Istio Service Mesh on Kubernetes
 
Servicehost Customization
Servicehost CustomizationServicehost Customization
Servicehost Customization
 
Enterprise service bus part 1
Enterprise service bus part 1Enterprise service bus part 1
Enterprise service bus part 1
 
Microservices - Hitchhiker's guide to cloud native applications
Microservices - Hitchhiker's guide to cloud native applicationsMicroservices - Hitchhiker's guide to cloud native applications
Microservices - Hitchhiker's guide to cloud native applications
 
WCF
WCFWCF
WCF
 
WCF - In a Week
WCF - In a WeekWCF - In a Week
WCF - In a Week
 
Global Scale ESB with Mule
Global Scale ESB with MuleGlobal Scale ESB with Mule
Global Scale ESB with Mule
 
Clean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NETClean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NET
 
Istio presentation jhug
Istio presentation jhugIstio presentation jhug
Istio presentation jhug
 
Swift distributed tracing method and tools v2
Swift distributed tracing method and tools v2Swift distributed tracing method and tools v2
Swift distributed tracing method and tools v2
 
Windows Communication Foundation Extensions
Windows Communication Foundation ExtensionsWindows Communication Foundation Extensions
Windows Communication Foundation Extensions
 
Service mesh in action with onap
Service mesh in action with onapService mesh in action with onap
Service mesh in action with onap
 
Making WCF Simple
Making WCF SimpleMaking WCF Simple
Making WCF Simple
 
Ws discovery in wcf 4
Ws discovery in wcf 4Ws discovery in wcf 4
Ws discovery in wcf 4
 
WSO2Con USA 2014 - Identity Server Tutorial
WSO2Con USA 2014 - Identity Server TutorialWSO2Con USA 2014 - Identity Server Tutorial
WSO2Con USA 2014 - Identity Server Tutorial
 
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
Pros and Cons of a MicroServices Architecture talk at AWS ReInventPros and Cons of a MicroServices Architecture talk at AWS ReInvent
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
 
JSFI - Dynamic RCP Desktop Application
JSFI - Dynamic RCP Desktop ApplicationJSFI - Dynamic RCP Desktop Application
JSFI - Dynamic RCP Desktop Application
 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & REST
 

Plus de Eyal Vardi

Smart Contract
Smart ContractSmart Contract
Smart ContractEyal Vardi
 
Rachel's grandmother's recipes
Rachel's grandmother's recipesRachel's grandmother's recipes
Rachel's grandmother's recipesEyal Vardi
 
Performance Optimization In Angular 2
Performance Optimization In Angular 2Performance Optimization In Angular 2
Performance Optimization In Angular 2Eyal Vardi
 
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)Eyal Vardi
 
Angular 2 NgModule
Angular 2 NgModuleAngular 2 NgModule
Angular 2 NgModuleEyal Vardi
 
Upgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.xUpgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.xEyal Vardi
 
Angular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time CompilationAngular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time CompilationEyal Vardi
 
Routing And Navigation
Routing And NavigationRouting And Navigation
Routing And NavigationEyal Vardi
 
Angular 2 Architecture
Angular 2 ArchitectureAngular 2 Architecture
Angular 2 ArchitectureEyal Vardi
 
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xAngular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xEyal Vardi
 
Angular 2.0 Views
Angular 2.0 ViewsAngular 2.0 Views
Angular 2.0 ViewsEyal Vardi
 
Component lifecycle hooks in Angular 2.0
Component lifecycle hooks in Angular 2.0Component lifecycle hooks in Angular 2.0
Component lifecycle hooks in Angular 2.0Eyal Vardi
 
Template syntax in Angular 2.0
Template syntax in Angular 2.0Template syntax in Angular 2.0
Template syntax in Angular 2.0Eyal Vardi
 
Http Communication in Angular 2.0
Http Communication in Angular 2.0Http Communication in Angular 2.0
Http Communication in Angular 2.0Eyal Vardi
 
Angular 2.0 Dependency injection
Angular 2.0 Dependency injectionAngular 2.0 Dependency injection
Angular 2.0 Dependency injectionEyal Vardi
 
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationAngular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationEyal Vardi
 
Async & Parallel in JavaScript
Async & Parallel in JavaScriptAsync & Parallel in JavaScript
Async & Parallel in JavaScriptEyal Vardi
 
Angular 2.0 Pipes
Angular 2.0 PipesAngular 2.0 Pipes
Angular 2.0 PipesEyal Vardi
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 formsEyal Vardi
 

Plus de Eyal Vardi (20)

Why magic
Why magicWhy magic
Why magic
 
Smart Contract
Smart ContractSmart Contract
Smart Contract
 
Rachel's grandmother's recipes
Rachel's grandmother's recipesRachel's grandmother's recipes
Rachel's grandmother's recipes
 
Performance Optimization In Angular 2
Performance Optimization In Angular 2Performance Optimization In Angular 2
Performance Optimization In Angular 2
 
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
 
Angular 2 NgModule
Angular 2 NgModuleAngular 2 NgModule
Angular 2 NgModule
 
Upgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.xUpgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.x
 
Angular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time CompilationAngular 2 - Ahead of-time Compilation
Angular 2 - Ahead of-time Compilation
 
Routing And Navigation
Routing And NavigationRouting And Navigation
Routing And Navigation
 
Angular 2 Architecture
Angular 2 ArchitectureAngular 2 Architecture
Angular 2 Architecture
 
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xAngular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.x
 
Angular 2.0 Views
Angular 2.0 ViewsAngular 2.0 Views
Angular 2.0 Views
 
Component lifecycle hooks in Angular 2.0
Component lifecycle hooks in Angular 2.0Component lifecycle hooks in Angular 2.0
Component lifecycle hooks in Angular 2.0
 
Template syntax in Angular 2.0
Template syntax in Angular 2.0Template syntax in Angular 2.0
Template syntax in Angular 2.0
 
Http Communication in Angular 2.0
Http Communication in Angular 2.0Http Communication in Angular 2.0
Http Communication in Angular 2.0
 
Angular 2.0 Dependency injection
Angular 2.0 Dependency injectionAngular 2.0 Dependency injection
Angular 2.0 Dependency injection
 
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationAngular 2.0 Routing and Navigation
Angular 2.0 Routing and Navigation
 
Async & Parallel in JavaScript
Async & Parallel in JavaScriptAsync & Parallel in JavaScript
Async & Parallel in JavaScript
 
Angular 2.0 Pipes
Angular 2.0 PipesAngular 2.0 Pipes
Angular 2.0 Pipes
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 forms
 

Whats new in WCF 4.0

  • 1. What’s New in WCF 4.0 Eyal Vardi CEO E4D Solutions LTD Microsoft MVP Visual C# blog: www.eVardi.com
  • 2. Agenda • Simplified Configuration • Discovery • Routing Services
  • 5. Kind Attribute • Set the type of the standard endpoint <service name="HelloService"> ... <endpoint binding="webHttpBinding" contract= "IService1" kind= "webHttpEndpoint" /> <endpoint kind="mexEndpoint" /> No need in <endpoint kind="webHttpEndpoint" /> bindingConfiguration </service> endpointConfiguration
  • 6. Custom Standard Endpoint • Standard endpoint must be registered in the <endpointExtensions> section. <system.serviceModel> <service name="HelloService"> <endpoint kind= "udpDiscoveryEndpoint" /> </service> <extensions> <endpointExtensions> <add name="udpDiscoveryEndpoint" type="..." /> </endpointExtensions> </extensions> </system.serviceModel>
  • 9. Why We Need Discovery?
  • 11. WS – Discovery Service Opened Hello Target Client Service Target Client Service Target Client Service
  • 12. WS – Discovery Client Look for Service Probe Target Client Service Target Client Service Target Client Service
  • 13. WS – Discovery Service Return Match Message Probe Match Target Client Service Target Client Service Target Client Service
  • 14. WS – Discovery Service Closed By Target Client Service Target Client Service Target Client Service
  • 18. Router Service Architecture Client Router Filter Filters Service Tables Server A Service A Service B Service C Server B Server C
  • 19. Router Endpoints & Contracts <service name ="System.ServiceModel.Routing.RoutingService"> <endpoint name = "reqReplyEndpoint" address = "" binding = "basicHttpBinding" contract = "System.ServiceModel.Routing.IRequestReplyRouter" /> </service>
  • 20. Configuring Filters • The RouterService evaluates filters to determine how to forward the message. <serviceBehaviors> <behavior> <routing filterTableName="MyRoutingTable" /> <routing> </behavior> <filters> </serviceBehaviors> <filter name="MatchAllFilter1" filterType="MatchAll" /> </filters> <filterTables> <filterTable name="MyroutingTable"> <add filterName="MatchAllFilter1" endpointName="CalculatorService" /> </filterTable> </filterTables> <client> </routing> <endpoint name="CalculatorService" address="http://..." binding="basicHtttpBinding" contract="*" > </client>
  • 22. Error Handing • You can define different lists of alternate endpoints that will be used if communicating with the initial target endpoint results in an error. <routing> ... <filterTable name="MyroutingTable"> <add filterName ="f1" endpointName ="t1" backupList ="altEndpoints" /> </filterTable> ... <backupLists> <backupList name="altEndpoints"> <add endpointName="CalculatorService2"/> </backupList> </backupLists> </routing>
  • 23. Multicast Routing Behavior • Supports automatically routing a particular incoming message to multiple destinations in a “multicast” fashion. <routing> <filters> <filter name="Filter1" filterType="MatchAll" /> </filters> <filterTables> “Multicast” <filterTable name="MyroutingTable"> <add filterName="Filter1" endpointName="Target1" /> <add filterName="Filter1" endpointName="Target2" /> <add filterName="Filter1" endpointName="Target3" /> </filterTable> </filterTables> </routing>
  • 24.
  • 25. Summary • Simplified Configuration • Discovery • Routing Services
  • 26. Resources • http://blogs.microsoft.co.il/blogs/vardi/ • A Developer’s Introduction to WCF 4 Beta 1 • Service Configuration Improvements in .NET 4 • What’s New in WCF 4.0? • Jesus Rodriguez's WebLog