SlideShare una empresa de Scribd logo
1 de 41
What’s new in WCF 4.0

about.me/Chakravarthy
About ME
• MCA, MVP, MCPD, MCTS and CSM
• j.mp/CareerHistory
• Developer turned Architect
– WHAT !!
– Who else !!

• Community Person
Agenda
• What’s new !!??
– Configuration
– Tracing
– Serialization
– Message queuing
– Service discovery
– Routing
– Workflow services
Let’s start ..
What’s new in WCF
Kalpana (1948) is a Bollywood movie from a time before the term had been invented.
This 155-minute-long black-and-white feature film gives full rein to the talents of
choreographer Uday Shankar, the film’s director and a legend of Indian dance. The film is
about a young dancer who dreams of founding his own dance school, played by the
director himself. Despite living until the age of 76, Kalpana is the one and only film Uday
Shankar directed in his entire career. In the dance world, however, he will be
remembered as a veritable master of the art of choreography.
Kalpana will be screened at Cannes Classics on Thursday 17th May at 19:30, Salle Buñuel.
Far from the world of Indian dancing, After the Curfew (1954) has as its backdrop the post-war
period in Indonesia. In the months following independence, Iskandar returns to civilian life. For this
medical student it is a time of bitter disillusionment, as he sees corruption and political
incompetence take hold throughout the country. The director, Usmar Ismail, is considered as one of
the forefathers of Indonesian cinema. He made a major contribution to the development of
Indonesian cinema in the 1950s by founding Perfini, the country’s first film studios.
After The Curfew will be screened at Cannes Classics on Thursday 17th May at 17:15, Salle Buñuel.
??!!
a) Configuration Improvements
• Removed the need for explicit per-service
configuration
• default values for WCF bindings & behaviors
• the standard endpoint, which will allow you
to define reusable preconfigured endpoints

Source : http://j.mp/WCF4ConfigImp
Default bindings & behaviors

You can also
define default
binding and
behavior
configurations

• Simply define the binding/behavior without a name
• That binding takes effect for anything not assigned a
specific binding
• Can be defined at different scopes within config (e.g.
machine.config)

<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
Configuration Improvements

Source : http://j.mp/WCF4ConfigImp
File-less activation
• In WCF 4, you no longer need physical .svc files to
activate services
– Instead you can define a virtual mapping in config
<serviceHostingEnvironment>
<serviceActivations>
<add relativeAddress ="EntertainmentServices.svc"
service="EntertainmentShows"/>
</serviceActivations>
</serviceHostingEnvironment>
</system.serviceModel>
Default endpoints
• WCF 3.x services required at least one endpoint or you’d get
an exception
• WCF 4.0 services come with default endpoints
– One default endpoint per contract/base address combination
– Assuming you haven’t defined any manually
– If you’ve defined at least one endpoint, you won’t get default
endpoints
Standard endpoints
• WCF 4 also comes with several
“preconfigured” standard endpoints
– These cover some of the most common usage
scenarios
– You can simply reuse them as-is without change

• You refer to standard endpoints by name using
the “kind” attribute
– Makes it easier to get up and running in certain
scenarios
<endpoint kind ="mexEndpoint" address="mex" />
Formats and
Flexibility
multipart/form-data
text/calendar

application/atom+xml
image/svg+xml

application/json
Approx 900
text/directory
App media types!
application/xml

text/html

image/png

application/xaml+xml
application/x-www-form-urlencoded
preconfigured Standard endpoints
in v4.0
Standard endpoint name
mexEndpoint

dynamicEndpoint

discoveryEndpoint
udpDiscoveryEndpoint
announcementEndpoint

udpAnnouncementEndpoint
workflowControlEndpoint
webHttpEndpoint
webScriptEndpoint

Description
Defines a standard endpoint for MEX configured with IMetadataExchange for the service contract,
mexHttpBinding as the default binding (you can change this), and an empty address.
Defines a standard endpoint configured to use WCF Discovery within a WCF client application.
When using this standard endpoint, an address is not required because during the first call, the
client will query for a service endpoint matching the specified contract and automatically connect
to it for you.
Defines a standard endpoint that is pre-configured for discovery operations within a client
application. The user needs to specify the address and the binding when using this standard
endpoint.
Defines a standard endpoint that is pre-configured for discovery operations within a client
application using the UDP binding at a multicast address. Derives from DiscoveryEndpoint.
Defines a standard endpoint that is pre-configured for the announcement functionality of
discovery. The user needs to specify the address and the binding when using this standard
endpoint.
Defines a standard endpoint that is pre-configured for the announcement functionality over a UDP
binding at a multicast address. This endpoint derives from announcementEndpoint.
Defines a standard endpoint for controlling execution of workflow instances (create, run, suspend,
terminate, etc).
Defines a standard endpoint configured with WebHttpBinding and WebHttpBehavior. Use to
expose REST services.
Defines a standard endpoint configured with WebHttpBinding and WebScriptEnablingBehavior.
Use to expose Ajax services.
Default protocol mapping

<protocolMapping>
<add scheme="http" binding="basicHttpBinding" bindingConfiguration="" />
<add scheme="net.tcp" binding="netTcpBinding" bindingConfiguration=""/>
<add scheme="net.pipe" binding="netNamedPipeBinding" bindingConfiguration=""
<add scheme="net.msmq" binding="netMsmqBinding" bindingConfiguration=""/>
</protocolMapping>
How to choose a Binding
Yes
Yes
Local
Only

No

Inside
Firewall
& .NET
to .NET

No

Yes

No
MSMQ
Client
Support
Legacy?

Need to
Disconnect

Yes

NetTcp
Binding

Yes

No

No

NetMsmq
Binding

NetNamedPipe
Binding

Msmq
Integration
Binding

WsHttp
Binding

BasicHttp
Binding
Default behavior configuration
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior> <!-- notice no name attribute -->
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Routing
Service
Message Pump as a Service
Routing
Message
Service
Pump

Scenarios

Concerns

•
•
•
•
•

•
•
•
•
•

Basic Message Routing
Protocol Bridging
Service Aggregation
Versioning
…

Connection State
Security
Delivery Failure
Transactions
…
Message Routing

Echo

Routing
Service

Client

A
B
C

Time
Service

Supported Message Exchange Patterns

Multicast

Interface

Request Reply, Sessionful Request Reply

No

IRequestReplyRouter

OneWay

Yes

ISimplexDatagramRouter

Sessionful OneWay

Yes

ISimplexSessionRouter

Sessionful Duplex

Yes

IDuplexSessionRouter
Message Routing

Echo

Routing
Service

Client

MessageFilter

Endpoint

action == http://Message/Echo

Echo

action ==
http://Message/GetCurrentTime

TimeService

Filter On

MessageFilter

Action

ActionMessageFilter

Address header

AddressMessageFilter

Address header – longest prefix matching

AddressPrefixMessageFilter

Endpoint Name

EndpointNameMessageFilter

No Filter – matches everything

MatchAllMessageFilter

Logical And of two filters

StrictAndMessageFilter

XPath expression

XPathMessageFilter

Custom

Custom

Time
Service
Protocol Bridging

Routing
Service

Client
BasicHttp
SOAP 1.1

Service
Net.Tcp
SOAP 1.2
Security

Client

Routing
Service

Service
Error Handling
Echo
Service

Routing
Service

Client

Backup
Echo
Service
MessageFilter

Endpoint

action ==
http://Message/Echo

Echo

Alternate
Endpoints
Backup
EchoService
Router Service
• First-class "router" service
– Simply host the RoutingService class
– You host it like any other WCF service
– Configure with routing “filters” to do content-based
routing
Hosting the RoutingService
• Additional routing service capabilities
– Protocol bridging (client sends over HTTP, router sends over TCP,
etc)
– Error handling support (router configured with backup endpoints)
– Multi-cast routing support (router sends to multiple endpoints)
Using the Routing Service
1.
2.

Create regular WCF Services to be called by the Routing Service.
Create a Routing Service:
a.
Change the markup in the .svc file to point to the routing Service.

Be sure to reference System.ServiceModel.Routing in your project
b.

In the web.config:
1)
Add endpoints for all the services to which you’ll connect in the <client>
section.

<client>
<endpoint name="CalculatorService1"
address="net.tcp://localhost:8001/servicemodelsamples/calcservice1"
binding="netTcpBinding"
contract="*" />
<endpoint name="CalculatorService2"
address="net.pipe://localhost/servicemodelsamples/calcservice2"
binding="netNamedPipeBinding"
contract="*" />
</client>
Using the Routing Service (cont’d)
b.

In the web.config (cont’d):
2)
Create a namespace filter and set the Xpath filterData

3)

Add filterTables to point to the correct end points

4)

Set the Routing behavior to identify the filterTables
WCF WebHttp
Services
Improved REST Support
• Many features in the WCF REST Starter Kit are now part of WCF 4.0

Automatic
help page

HTTP
caching

WCF/ASP.NE
T routes

Message
format
selection

REST project
templates

HTTP
“faults”

Various API
extensions
Automatic help page
• WCF 4 provides an automatic help page for REST services
– Configure the <webHttp> behavior with helpEnabled=“true”
Message format selection
• WCF 4 also provides automatic format selection for XML/JSON
– This feature is built on the HTTP “Accept” headers
<configuration>
<system.serviceModel>
<standardEndpoints>
<webHttpEndpoint>
<!-- the "" standard endpoint is used for auto creating
a web endpoint. -->
<standardEndpoint name="" helpEnabled="true"
automaticFormatSelectionEnabled="true"/>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
</configuration>
WCF and ASP.NET routes
• WCF 4 provides the ability to integrate with the ASP.NET routing
engine
– You implement RegisterRoutes in Global.asax, add ServiceRoute
mappings
– ServiceRoute allows you to map a URL to a WCF 4 service class

• Ultimately this gives you a URL space that maps to multiple WCF
classes
private void RegisterRoutes()
{
WebServiceHostFactory factory = new
WebServiceHostFactory();
RouteTable.Routes.Add(new ServiceRoute("Bookmarks",
factory,
typeof(BookmarkService)));
RouteTable.Routes.Add(new ServiceRoute("Users", factory,
typeof(UserService)));
}
REST project templates
• Download the new REST project templates via the new Visual
Studio 2010 Extension Manager (Tools | Extension Manager)
•

Summary
WCF/WF 4.0 offers many improvements:
–
–
–
–
–

Simplified configuration
Discovery
Routing service
WebHttp services
Workflow services

• These improvements make WCF simpler and more
flexible
– Today’s common use cases just got easier
Thanks

Más contenido relacionado

La actualidad más candente

Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Hiroshi SHIBATA
 
OW2Con 2011 Petals BPM and the Cloud
OW2Con 2011 Petals BPM and the CloudOW2Con 2011 Petals BPM and the Cloud
OW2Con 2011 Petals BPM and the CloudChristophe Hamerling
 
TorqueBox for Rubyists
TorqueBox for RubyistsTorqueBox for Rubyists
TorqueBox for Rubyistsbobmcwhirter
 
When Two Worlds Collide: Java and Ruby in the Enterprise
When Two Worlds Collide: Java and Ruby in the EnterpriseWhen Two Worlds Collide: Java and Ruby in the Enterprise
When Two Worlds Collide: Java and Ruby in the Enterprisebenbrowning
 
Durai presentation of dhcp
Durai presentation of dhcpDurai presentation of dhcp
Durai presentation of dhcpduraimurugan89
 
Complex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBoxComplex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBoxbobmcwhirter
 
What's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise ReleaseWhat's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise ReleaseDavid Bosschaert
 
The use of Symfony2 @ Overblog
The use of Symfony2 @ OverblogThe use of Symfony2 @ Overblog
The use of Symfony2 @ OverblogXavier Hausherr
 

La actualidad más candente (10)

Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
 
How DSL works on Ruby
How DSL works on RubyHow DSL works on Ruby
How DSL works on Ruby
 
OW2Con 2011 Petals BPM and the Cloud
OW2Con 2011 Petals BPM and the CloudOW2Con 2011 Petals BPM and the Cloud
OW2Con 2011 Petals BPM and the Cloud
 
TorqueBox for Rubyists
TorqueBox for RubyistsTorqueBox for Rubyists
TorqueBox for Rubyists
 
When Two Worlds Collide: Java and Ruby in the Enterprise
When Two Worlds Collide: Java and Ruby in the EnterpriseWhen Two Worlds Collide: Java and Ruby in the Enterprise
When Two Worlds Collide: Java and Ruby in the Enterprise
 
Durai presentation of dhcp
Durai presentation of dhcpDurai presentation of dhcp
Durai presentation of dhcp
 
080 DHCP
080 DHCP080 DHCP
080 DHCP
 
Complex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBoxComplex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBox
 
What's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise ReleaseWhat's new in the OSGi 4.2 Enterprise Release
What's new in the OSGi 4.2 Enterprise Release
 
The use of Symfony2 @ Overblog
The use of Symfony2 @ OverblogThe use of Symfony2 @ Overblog
The use of Symfony2 @ Overblog
 

Destacado

Journey to Next level Agility
Journey to Next level AgilityJourney to Next level Agility
Journey to Next level AgilityDSK Chakravarthy
 
Microsoft Products and Classification
Microsoft Products and ClassificationMicrosoft Products and Classification
Microsoft Products and ClassificationDSK Chakravarthy
 
Lewis Hamilton Wins the 2008 Opening F1 Race
 Lewis Hamilton Wins the 2008 Opening F1 Race Lewis Hamilton Wins the 2008 Opening F1 Race
Lewis Hamilton Wins the 2008 Opening F1 RaceSRINI N
 
Mira Miró
Mira MiróMira Miró
Mira MiróSraS
 
India Wins CB Series in Australia.
India Wins CB Series in Australia. India Wins CB Series in Australia.
India Wins CB Series in Australia. SRINI N
 
Well Designed Slideshows
Well Designed SlideshowsWell Designed Slideshows
Well Designed SlideshowsSRINI N
 
What's new in .NET Framework v4.5
What's new in .NET Framework v4.5What's new in .NET Framework v4.5
What's new in .NET Framework v4.5DSK Chakravarthy
 
Icwai Pus 8708
Icwai Pus 8708Icwai Pus 8708
Icwai Pus 8708SRINI N
 
Roses and Ideas
Roses and IdeasRoses and Ideas
Roses and IdeasSRINI N
 
Ideas for Christmas in the MFL classroom (from 2006)
Ideas for Christmas in the MFL classroom (from 2006)Ideas for Christmas in the MFL classroom (from 2006)
Ideas for Christmas in the MFL classroom (from 2006)SraS
 
Conversation Rules
Conversation RulesConversation Rules
Conversation RulesSRINI N
 
Thirty Tips for Public Speaking Tyros
Thirty Tips for Public Speaking TyrosThirty Tips for Public Speaking Tyros
Thirty Tips for Public Speaking TyrosSRINI N
 

Destacado (17)

Journey to Next level Agility
Journey to Next level AgilityJourney to Next level Agility
Journey to Next level Agility
 
Microsoft Products and Classification
Microsoft Products and ClassificationMicrosoft Products and Classification
Microsoft Products and Classification
 
Lewis Hamilton Wins the 2008 Opening F1 Race
 Lewis Hamilton Wins the 2008 Opening F1 Race Lewis Hamilton Wins the 2008 Opening F1 Race
Lewis Hamilton Wins the 2008 Opening F1 Race
 
Cognitive agility
Cognitive agilityCognitive agility
Cognitive agility
 
Relat EVE estimates
Relat EVE estimatesRelat EVE estimates
Relat EVE estimates
 
Intro Cloud Computing
Intro Cloud ComputingIntro Cloud Computing
Intro Cloud Computing
 
Mira Miró
Mira MiróMira Miró
Mira Miró
 
India Wins CB Series in Australia.
India Wins CB Series in Australia. India Wins CB Series in Australia.
India Wins CB Series in Australia.
 
Well Designed Slideshows
Well Designed SlideshowsWell Designed Slideshows
Well Designed Slideshows
 
It Market
It MarketIt Market
It Market
 
What's new in .NET Framework v4.5
What's new in .NET Framework v4.5What's new in .NET Framework v4.5
What's new in .NET Framework v4.5
 
Icwai Pus 8708
Icwai Pus 8708Icwai Pus 8708
Icwai Pus 8708
 
Roses and Ideas
Roses and IdeasRoses and Ideas
Roses and Ideas
 
XML and XPath details
XML and XPath detailsXML and XPath details
XML and XPath details
 
Ideas for Christmas in the MFL classroom (from 2006)
Ideas for Christmas in the MFL classroom (from 2006)Ideas for Christmas in the MFL classroom (from 2006)
Ideas for Christmas in the MFL classroom (from 2006)
 
Conversation Rules
Conversation RulesConversation Rules
Conversation Rules
 
Thirty Tips for Public Speaking Tyros
Thirty Tips for Public Speaking TyrosThirty Tips for Public Speaking Tyros
Thirty Tips for Public Speaking Tyros
 

Similar a What's new in Wcf4

Developing and Hosting SOAP Based Services
Developing and Hosting SOAP Based ServicesDeveloping and Hosting SOAP Based Services
Developing and Hosting SOAP Based ServicesStephenKardian
 
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft Akshata Sawant
 
VoLTE Testing Solution in NFV ecosystem
VoLTE Testing Solution in NFV ecosystemVoLTE Testing Solution in NFV ecosystem
VoLTE Testing Solution in NFV ecosystemDebayan Chaudhuri
 
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUIAdvancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUIAdvancio
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Amazon Web Services
 
【EPN Seminar Nov.10.2015】 Services Function Chaining Architecture, Standardiz...
【EPN Seminar Nov.10.2015】 Services Function Chaining Architecture, Standardiz...【EPN Seminar Nov.10.2015】 Services Function Chaining Architecture, Standardiz...
【EPN Seminar Nov.10.2015】 Services Function Chaining Architecture, Standardiz...シスコシステムズ合同会社
 
DEVNET-1128 Cisco Intercloud Fabric NB Api's for Business & Providers
DEVNET-1128	Cisco Intercloud Fabric NB Api's for Business & ProvidersDEVNET-1128	Cisco Intercloud Fabric NB Api's for Business & Providers
DEVNET-1128 Cisco Intercloud Fabric NB Api's for Business & ProvidersCisco DevNet
 
OFC2016 SDN Framework and APIs
OFC2016 SDN Framework and APIsOFC2016 SDN Framework and APIs
OFC2016 SDN Framework and APIsDeborah Porchivina
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAmazon Web Services
 
The Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFVThe Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFVOPNFV
 
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
 
Summit 16: Service Function Chaining: Demo and Usage
Summit 16: Service Function Chaining: Demo and UsageSummit 16: Service Function Chaining: Demo and Usage
Summit 16: Service Function Chaining: Demo and UsageOPNFV
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixYunong Xiao
 
Introduction to API and Service Hosting 3.7
Introduction to API and Service Hosting 3.7Introduction to API and Service Hosting 3.7
Introduction to API and Service Hosting 3.7StephenKardian
 

Similar a What's new in Wcf4 (20)

Developing and Hosting SOAP Based Services
Developing and Hosting SOAP Based ServicesDeveloping and Hosting SOAP Based Services
Developing and Hosting SOAP Based Services
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
 
VoLTE Testing Solution in NFV ecosystem
VoLTE Testing Solution in NFV ecosystemVoLTE Testing Solution in NFV ecosystem
VoLTE Testing Solution in NFV ecosystem
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
 
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUIAdvancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
 
【EPN Seminar Nov.10.2015】 Services Function Chaining Architecture, Standardiz...
【EPN Seminar Nov.10.2015】 Services Function Chaining Architecture, Standardiz...【EPN Seminar Nov.10.2015】 Services Function Chaining Architecture, Standardiz...
【EPN Seminar Nov.10.2015】 Services Function Chaining Architecture, Standardiz...
 
DEVNET-1128 Cisco Intercloud Fabric NB Api's for Business & Providers
DEVNET-1128	Cisco Intercloud Fabric NB Api's for Business & ProvidersDEVNET-1128	Cisco Intercloud Fabric NB Api's for Business & Providers
DEVNET-1128 Cisco Intercloud Fabric NB Api's for Business & Providers
 
App fabric introduction
App fabric introductionApp fabric introduction
App fabric introduction
 
OFC2016 SDN Framework and APIs
OFC2016 SDN Framework and APIsOFC2016 SDN Framework and APIs
OFC2016 SDN Framework and APIs
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for Developers
 
Scale Kubernetes to support 50000 services
Scale Kubernetes to support 50000 servicesScale Kubernetes to support 50000 services
Scale Kubernetes to support 50000 services
 
The Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFVThe Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFV
 
WCF
WCFWCF
WCF
 
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...
 
Summit 16: Service Function Chaining: Demo and Usage
Summit 16: Service Function Chaining: Demo and UsageSummit 16: Service Function Chaining: Demo and Usage
Summit 16: Service Function Chaining: Demo and Usage
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at Netflix
 
Introduction to API and Service Hosting 3.7
Introduction to API and Service Hosting 3.7Introduction to API and Service Hosting 3.7
Introduction to API and Service Hosting 3.7
 
WCF - In a Week
WCF - In a WeekWCF - In a Week
WCF - In a Week
 

Más de DSK Chakravarthy

Más de DSK Chakravarthy (11)

Break the ICE with DSK
Break the ICE with DSKBreak the ICE with DSK
Break the ICE with DSK
 
Intelligent Machines for Industry 4.0
Intelligent Machines for Industry 4.0Intelligent Machines for Industry 4.0
Intelligent Machines for Industry 4.0
 
Initial Meetup of Hyderabad Chapter of BAI
Initial Meetup of Hyderabad Chapter of BAIInitial Meetup of Hyderabad Chapter of BAI
Initial Meetup of Hyderabad Chapter of BAI
 
ROC, not ROI
ROC, not ROIROC, not ROI
ROC, not ROI
 
Hacking the Quality
Hacking the QualityHacking the Quality
Hacking the Quality
 
agile 3.0
agile 3.0 agile 3.0
agile 3.0
 
Architectures
ArchitecturesArchitectures
Architectures
 
ROC for DevOPs
ROC for DevOPsROC for DevOPs
ROC for DevOPs
 
The Degree of Understanding
The Degree of UnderstandingThe Degree of Understanding
The Degree of Understanding
 
Designingapplswithnet
DesigningapplswithnetDesigningapplswithnet
Designingapplswithnet
 
Cs30 New
Cs30 NewCs30 New
Cs30 New
 

Último

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 

Último (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 

What's new in Wcf4

  • 1. What’s new in WCF 4.0 about.me/Chakravarthy
  • 2. About ME • MCA, MVP, MCPD, MCTS and CSM • j.mp/CareerHistory • Developer turned Architect – WHAT !! – Who else !! • Community Person
  • 3. Agenda • What’s new !!?? – Configuration – Tracing – Serialization – Message queuing – Service discovery – Routing – Workflow services
  • 6. Kalpana (1948) is a Bollywood movie from a time before the term had been invented. This 155-minute-long black-and-white feature film gives full rein to the talents of choreographer Uday Shankar, the film’s director and a legend of Indian dance. The film is about a young dancer who dreams of founding his own dance school, played by the director himself. Despite living until the age of 76, Kalpana is the one and only film Uday Shankar directed in his entire career. In the dance world, however, he will be remembered as a veritable master of the art of choreography. Kalpana will be screened at Cannes Classics on Thursday 17th May at 19:30, Salle Buñuel.
  • 7. Far from the world of Indian dancing, After the Curfew (1954) has as its backdrop the post-war period in Indonesia. In the months following independence, Iskandar returns to civilian life. For this medical student it is a time of bitter disillusionment, as he sees corruption and political incompetence take hold throughout the country. The director, Usmar Ismail, is considered as one of the forefathers of Indonesian cinema. He made a major contribution to the development of Indonesian cinema in the 1950s by founding Perfini, the country’s first film studios. After The Curfew will be screened at Cannes Classics on Thursday 17th May at 17:15, Salle Buñuel.
  • 9.
  • 10. a) Configuration Improvements • Removed the need for explicit per-service configuration • default values for WCF bindings & behaviors • the standard endpoint, which will allow you to define reusable preconfigured endpoints Source : http://j.mp/WCF4ConfigImp
  • 11. Default bindings & behaviors You can also define default binding and behavior configurations • Simply define the binding/behavior without a name • That binding takes effect for anything not assigned a specific binding • Can be defined at different scopes within config (e.g. machine.config) <behaviors> <serviceBehaviors> <behavior> <serviceMetadata httpGetEnabled="true"/> </behavior> </serviceBehaviors> </behaviors>
  • 12. Configuration Improvements Source : http://j.mp/WCF4ConfigImp
  • 13. File-less activation • In WCF 4, you no longer need physical .svc files to activate services – Instead you can define a virtual mapping in config <serviceHostingEnvironment> <serviceActivations> <add relativeAddress ="EntertainmentServices.svc" service="EntertainmentShows"/> </serviceActivations> </serviceHostingEnvironment> </system.serviceModel>
  • 14. Default endpoints • WCF 3.x services required at least one endpoint or you’d get an exception • WCF 4.0 services come with default endpoints – One default endpoint per contract/base address combination – Assuming you haven’t defined any manually – If you’ve defined at least one endpoint, you won’t get default endpoints
  • 15. Standard endpoints • WCF 4 also comes with several “preconfigured” standard endpoints – These cover some of the most common usage scenarios – You can simply reuse them as-is without change • You refer to standard endpoints by name using the “kind” attribute – Makes it easier to get up and running in certain scenarios <endpoint kind ="mexEndpoint" address="mex" />
  • 17. multipart/form-data text/calendar application/atom+xml image/svg+xml application/json Approx 900 text/directory App media types! application/xml text/html image/png application/xaml+xml application/x-www-form-urlencoded
  • 18. preconfigured Standard endpoints in v4.0 Standard endpoint name mexEndpoint dynamicEndpoint discoveryEndpoint udpDiscoveryEndpoint announcementEndpoint udpAnnouncementEndpoint workflowControlEndpoint webHttpEndpoint webScriptEndpoint Description Defines a standard endpoint for MEX configured with IMetadataExchange for the service contract, mexHttpBinding as the default binding (you can change this), and an empty address. Defines a standard endpoint configured to use WCF Discovery within a WCF client application. When using this standard endpoint, an address is not required because during the first call, the client will query for a service endpoint matching the specified contract and automatically connect to it for you. Defines a standard endpoint that is pre-configured for discovery operations within a client application. The user needs to specify the address and the binding when using this standard endpoint. Defines a standard endpoint that is pre-configured for discovery operations within a client application using the UDP binding at a multicast address. Derives from DiscoveryEndpoint. Defines a standard endpoint that is pre-configured for the announcement functionality of discovery. The user needs to specify the address and the binding when using this standard endpoint. Defines a standard endpoint that is pre-configured for the announcement functionality over a UDP binding at a multicast address. This endpoint derives from announcementEndpoint. Defines a standard endpoint for controlling execution of workflow instances (create, run, suspend, terminate, etc). Defines a standard endpoint configured with WebHttpBinding and WebHttpBehavior. Use to expose REST services. Defines a standard endpoint configured with WebHttpBinding and WebScriptEnablingBehavior. Use to expose Ajax services.
  • 19. Default protocol mapping <protocolMapping> <add scheme="http" binding="basicHttpBinding" bindingConfiguration="" /> <add scheme="net.tcp" binding="netTcpBinding" bindingConfiguration=""/> <add scheme="net.pipe" binding="netNamedPipeBinding" bindingConfiguration="" <add scheme="net.msmq" binding="netMsmqBinding" bindingConfiguration=""/> </protocolMapping>
  • 20. How to choose a Binding Yes Yes Local Only No Inside Firewall & .NET to .NET No Yes No MSMQ Client Support Legacy? Need to Disconnect Yes NetTcp Binding Yes No No NetMsmq Binding NetNamedPipe Binding Msmq Integration Binding WsHttp Binding BasicHttp Binding
  • 21. Default behavior configuration <configuration> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior> <!-- notice no name attribute --> <serviceMetadata httpGetEnabled="true"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> </configuration>
  • 23. Message Pump as a Service Routing Message Service Pump Scenarios Concerns • • • • • • • • • • Basic Message Routing Protocol Bridging Service Aggregation Versioning … Connection State Security Delivery Failure Transactions …
  • 24. Message Routing Echo Routing Service Client A B C Time Service Supported Message Exchange Patterns Multicast Interface Request Reply, Sessionful Request Reply No IRequestReplyRouter OneWay Yes ISimplexDatagramRouter Sessionful OneWay Yes ISimplexSessionRouter Sessionful Duplex Yes IDuplexSessionRouter
  • 25. Message Routing Echo Routing Service Client MessageFilter Endpoint action == http://Message/Echo Echo action == http://Message/GetCurrentTime TimeService Filter On MessageFilter Action ActionMessageFilter Address header AddressMessageFilter Address header – longest prefix matching AddressPrefixMessageFilter Endpoint Name EndpointNameMessageFilter No Filter – matches everything MatchAllMessageFilter Logical And of two filters StrictAndMessageFilter XPath expression XPathMessageFilter Custom Custom Time Service
  • 29. Router Service • First-class "router" service – Simply host the RoutingService class – You host it like any other WCF service – Configure with routing “filters” to do content-based routing
  • 30. Hosting the RoutingService • Additional routing service capabilities – Protocol bridging (client sends over HTTP, router sends over TCP, etc) – Error handling support (router configured with backup endpoints) – Multi-cast routing support (router sends to multiple endpoints)
  • 31. Using the Routing Service 1. 2. Create regular WCF Services to be called by the Routing Service. Create a Routing Service: a. Change the markup in the .svc file to point to the routing Service. Be sure to reference System.ServiceModel.Routing in your project b. In the web.config: 1) Add endpoints for all the services to which you’ll connect in the <client> section. <client> <endpoint name="CalculatorService1" address="net.tcp://localhost:8001/servicemodelsamples/calcservice1" binding="netTcpBinding" contract="*" /> <endpoint name="CalculatorService2" address="net.pipe://localhost/servicemodelsamples/calcservice2" binding="netNamedPipeBinding" contract="*" /> </client>
  • 32. Using the Routing Service (cont’d) b. In the web.config (cont’d): 2) Create a namespace filter and set the Xpath filterData 3) Add filterTables to point to the correct end points 4) Set the Routing behavior to identify the filterTables
  • 33.
  • 35. Improved REST Support • Many features in the WCF REST Starter Kit are now part of WCF 4.0 Automatic help page HTTP caching WCF/ASP.NE T routes Message format selection REST project templates HTTP “faults” Various API extensions
  • 36. Automatic help page • WCF 4 provides an automatic help page for REST services – Configure the <webHttp> behavior with helpEnabled=“true”
  • 37. Message format selection • WCF 4 also provides automatic format selection for XML/JSON – This feature is built on the HTTP “Accept” headers <configuration> <system.serviceModel> <standardEndpoints> <webHttpEndpoint> <!-- the "" standard endpoint is used for auto creating a web endpoint. --> <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true"/> </webHttpEndpoint> </standardEndpoints> </system.serviceModel> </configuration>
  • 38. WCF and ASP.NET routes • WCF 4 provides the ability to integrate with the ASP.NET routing engine – You implement RegisterRoutes in Global.asax, add ServiceRoute mappings – ServiceRoute allows you to map a URL to a WCF 4 service class • Ultimately this gives you a URL space that maps to multiple WCF classes private void RegisterRoutes() { WebServiceHostFactory factory = new WebServiceHostFactory(); RouteTable.Routes.Add(new ServiceRoute("Bookmarks", factory, typeof(BookmarkService))); RouteTable.Routes.Add(new ServiceRoute("Users", factory, typeof(UserService))); }
  • 39. REST project templates • Download the new REST project templates via the new Visual Studio 2010 Extension Manager (Tools | Extension Manager)
  • 40. • Summary WCF/WF 4.0 offers many improvements: – – – – – Simplified configuration Discovery Routing service WebHttp services Workflow services • These improvements make WCF simpler and more flexible – Today’s common use cases just got easier