Designing a WCF Server for Low Latency

How to achieve low latency WCF server in a publish-subscribe scenario? Specifically, clients subscribe to data and receive updates, is there a delay between the data change and the client receiving the change? Requirements for processor, memory, bandwidth are not important and can be high.

The basics are clear: binary serialization, named pipes, etc. But does it make sense, for example, to send data through an always connected stream? Or send the update package as one message to reduce the RPC / header overhead?

Maybe there are several projects with code or interfaces available for use as an example?

+2


source to share


3 answers


Not a complete solution, but: To reduce latency related to data size and data transfer rate, you can use Google protocol buffers to compress your data over the wire. GitHub projects here .



+1


source


If you are using a full duplex channel, you can connect clients to the server and still pass a different service contract as a callback. The server then uses this callback to send updates to the client as they become available.

I wrote my own pub-sub engine using this approach and the latency is about as low as you would expect via WCF.



What is your target performance?

This MSDN article discusses using WCF duplex.

+1


source


You looked

http://geekswithblogs.net/BVeldhoen/archive/2008/01/26/wcf-latency-test-harness.aspx

It allows for various bindings and data sizes.

+1


source







All Articles