ReactiveQueue Example: Increasing Throughput for Stateless WCF services

Saturday, June 5, 2010

Code for this post is available here As promised, here is an example of how to use the ReactiveQueue<T> from RxContrib.  Imagine that you have a stateless WCF service that needs to handle a large number of client requests – perhaps, a distributed logging service.  Clients need to send messages as quickly as possible and then be on their way.  It is up to your service to then do something with those messages.  So, assuming we have a logging service, we know several things at this point:  it’s a singleton (i.e., InstanceContextMode = InstanceContextMode.Single in the ServiceBehavior attribute) and...

In-Memory Queues: Performance comparison between the CCR and the .NET Framework’s ConcurrentQueue

Saturday, May 1, 2010

 Update:  See the notes for an important point about the 50,000 bytes / 100,000 messages case. Code for this post is available here.  See below for the link to the download containing the CCR DLL. So here’s the problem:  you need an in-memory queue in your application that can handle processing a large number (several thousands) of messages per second, using several enqueuing and dequeuing threads.  If you’re using .NET Framework 4.0 then you would immediately go for the new ConcurrentQueue class available in the System.Collections.Concrurent namespace.  But what if you’re...
tags: , , ,