Pergunta

I'm writing HFT software.

Disruptor claims to be a "high performance inter-thread messaging library", and apparently offers substantial performance improvements.

Is there something with comparable speed for .NET?

Foi útil?

Solução

As Sam already said, disruptor has been ported to dotnet you'll see more on GitHub Disruptor Net

I was thinking of your question from yonks ago the other day around how I'd approach it today knowing what I now know about concurency (large number of threads = bad).

There are a few patterns you could use here,

  1. Single threaded for maximum throughput and lowest latency. Run side by side procesess and do some form of sharding to getting additional throughput per core. Think ala Redis
  2. A non-blocking algorithm ala CAS
  3. Disruptor / CCR

I am personally curious enough to work on a few examples if you've got any to find what works best when.

There is an overview technical paper you should have a flick through by Disruptor

Outras dicas

There is a C# port but as has already been said it should only be used to solve specific problems. Its not a silver bullet to make your software faster. Do you have the perf tests to see if it changes anything? Does your current architecture fit the disruptor model of discreet workers?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top