SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Training
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds


Article Topics

All Articles
Performance Tuning
Audit
Business Intelligence
Clustering
Reporting Services
SQL Azure
Developer
General DBA
PowerShell
Windows Server
ASP.NET / ADO.NET
SQL Azure

USEFUL SITES :

ASP.NET Tutorials
Windows and SQL Azure Tutorials
Cloud Hosting Magazine
SharePoint Tutorials
Windows Server Help

Write for Us

Share your SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

WebMatrix Tutorial - Getting Started
Working with IIS using PowerShell
Know your Data with Data Profiling
Overview of SQL Server 2008 R2 Express Edition

More     
 
Latest FAQ's

SQL Agent job getting suspended.
Queries which include DMFs return a syntax error ...
Could not find stored procedure 'dbo.sp_MSins_dboTest'
How to change server name when replication is enabled.

More     
   
Latest Software Reviews

dbForge Review
Spotlight on ApexSQL Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Data Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Doc 2008

More     

articles >> developer >> Working with Windows Communication Foundation (WCF) ...

Working with Windows Communication Foundation (WCF)

By : Sanjit Sil
Jun 29, 2009

Prior to .Net 3.0 it was not an easy matter to select a particular technology for communicating between systems due to the number of technologies available from  Microsoft. For example, users could have used Web Service to communicate between a Java based application and a .Net application; WSE users  could have take advantage of some of the WS-* message protocols; MSMQ has the ability to  queue   messages which helps to communicate between intermittently connected solutions; Enterprise services (the successor of COM+) helps to build distributed application easily; .Net Remoting is a fast way to move messages between two .Net applications. All the above mentioned technologies have their pros and cons. Using WCF now we can take the advantage of all the above distributed technologies in a unified manner and WCF is the   successor to all these   message distribution technologies. 

 

Performance comparison between distributed technologies:

When we migrate distributed applications made  with ASP.NET Web Services, WSE, .NET Enterprise Services and .NET Remoting to WCF, it will in almost all cases result in a performance boost:

Other Distributed Technologies

WCF Performance Advantage

ASP.NET Web Service

25%—50% faster

.NET Remoting

25% faster

WSE 2.0/3.0 implementations.

400%  faster

.NET Enterprise Service

100% faster subject to the load.

 

 

Whereas the other Microsoft distributed technologies do not have too many limitations in running on  Windows operating system, an application built with WCF can run only on Windows XP SP2, Windows Vista or Windows Server 2008.

 

 

Programming Model:

A WCF service is made up of three parts: the service, one or more endpoints and a hosting environment.

A service is basically a class written in a .Net compliant language which contains some methods that are exposed through the WCF service. A service may have one or more endpoints – an endpoint is responsible for communication from the service to the client.

Endpoints also have three parts which are  known as ‘ABC’: ‘A’ for Address, ‘B’ for Binding and ‘C’ for Contracts.

Ø  Address: Address specifies the info about where to find the service.

Ø  Binding: Binding specifies the info for how to  interact with the service.

Ø  Contracts: Contracts specifies the info for how the service is implemented and what it offers.

Finally a hosting environment where the service is contained.

 

WCF bindings:

System-provided WCF bindings are used to specify the transport protocols, encoding, and security details required for clients and services to communicate with each other. As per MSDN followings are the system-provided WCF bindings:

 

Ø  BasicHttpBinding:

A binding that is suitable for communication with WS-Basic Profile conformant Web Services like ASMX-based services. This binding uses HTTP as the transport and Text/XML as the message encoding.

Ø  WSHttpBinding:

A secure and interoperable binding that is suitable for non-duplex service contracts.

Ø  WSDualHttpBinding:

A secure and interoperable binding that is suitable for duplex service contracts or communication through SOAP intermediaries.

Ø  WSFederationHttpBinding:

A secure and interoperable binding that supports the WS-Federation protocol, enabling organizations that are in a federation to efficiently authenticate and authorize users.

Ø  NetTcpBinding:

A secure and optimized binding suitable for cross-machine communication between WCF applications

Ø  NetNamedPipeBinding:

A secure, reliable, optimized binding that is suitable for on-machine communication between WCF applications.

Ø  NetMsmqBinding:

A queued binding that is suitable for cross-machine communication between WCF applications.

Ø  NetPeerTcpBinding :

A binding that enables secure, multi-machine communication.

Ø  MsmqIntegrationBinding :

Ø  MsmqIntegrationBinding: A binding that is suitable for cross-machine communication between a WCF application and existing MSMQ applications.

 

It should be noted that WCF also allows us to define our own custom bindings.

 

Creating a WCF service:

In order to create a WCF service in Visual Studio, select WCF>WCF Service Library from the New Project dialog.

This  will create the several files in a new project. Apart from the AppConfig file there are two more files -   Service1.cs  and IService1.cs  . Service1.cs is an implementation of the IService1.cs interface.

 

Ask A Question In the Forums

    Next Page>>    












C# Help and Tutorials | PHP MySQL Tutorial | Sharepoint Tutorial | Azure Tutorial | Cloud Hosting Magazine | ASP.NET Tutorials | Derivatives | Windows Server Help | Windows Phone Pro | Silverlight Ace | Visual Studio Tutorials | Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | SQL Server Training Videos | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Sonasoft | Andy Khanna | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 2010 Jude O'Kelly. All rights reserved