tags:

views:

65

answers:

2

In my application I need to push notifications of real time events from server to clients. The amount of data to pass is very small, mostly and Id. The number of clients listening simultaneously can be around 100 and I may have to publish one notification every 2 - 3 seconds. Both the server and client are built using .Net and WCF.

Given these requirements I have built a set of WCF services which will be run on a load balanced server cluster. The Instance context mode is Per Call and there is no need for sessions etc.

I am currently using BasicHttpBinding. Will TCP binding be better? Does it run on IIS 5 or 6? If not why?

What configuration for serialization can work best?

What are the things I need to do to make sure I get maximum performance?

Edit - Adding more information based on some of the responses -

I host a small WCF service in the client process using manual hosting. The server just calls this service on each client to push the data to all of them.

+1  A: 

Firstly have you considered using messaging for what you are trying to achieve?

In answer to will TCP binding work better than BasicHttpBinding- almost certainly yes. If you want to use TCP, you can't use IIS- look into WAS with Windows Server 2008. If you're stuck with Windows Server 2003, then you'll have to host in a windows service instead.

You've made a good choice by choosing per call- this is the preferred instance management mode for creating scalable WCF services.

Edit:

Now you've update your question, I recommend you take a look at IDesign's Pub/Sub framework if you want to stick with WCF. I'd also look at Pub/Sub with MSMQ in WCF and also with "Vanilla" products such as Tibco RV.

RichardOD
please see the edit - I do not need the duplex binding. With messaging do you mean MSMQ? could you elaborate on that part a little?
Unmesh Kondolikar
I have already built a small pub-sub framework using WCF services. I just want to optimize it for performance.
Unmesh Kondolikar
A: 

If you need pushing data from service to clients you need sessions and you need duplex binding - NetTcpBinding or WSDualHttpBinding. It will not work with BasicHttpBinding because it allows only pulling data (client pools the service for changes). Push data means tha service sends data to clients when needed.

NetTcpBinding always crete session. It can't be hosted in IIS 6 or older. NetTcpBinding is allowed only in Windows Activation Service (WAS) which is extension of IIS 7.x. For older systems you need self hosting = windows service.

Edit:

Based on your description you need Publish-Subscribe message exchange pattern.

Ladislav Mrnka