USV
-Interested User-
Posts: 20
Joined: Mar 20, 2015
|
Posted: Sep 19, 2015 11:26 AM
Msg. 1 of 3
Hello,
I realize this isn't something you would necessarily advise on but I thought I would utilize the API better if you could guide me a little on a design decision I am facing.
I subscribe to about 16-20 symbols on the same Level1 socket. I have a single thread consuming all the incoming messages. There are further consumer threads, one for each symbol to distribute the processing load further down my application.
Everything works fine except during the close or any event that increases the incoming message rate to a point that exceeds the consuming speed. The bottleneck is that initial consuming thread that accepts all incoming messages from the socket.
To attempt to fix this, I was thinking what if I had one Level1 socket connection for each symbol. But that would mean there would be 16-20 clients connected to IQConnect.exe at any given time. Do you see this as a problem or would you not recommend this approach? Would it be better to keep a single Level1 socket connection for all symbols and optimize the consuming logic?
Thanks.
|
Craig
-DTN Guru-
Posts: 326
Joined: Apr 16, 2010
|
Posted: Sep 19, 2015 08:43 PM
Msg. 2 of 3
I don't know if this helps but I'm using the .NET socket classes in C# and I have roughly the same architecture and it seems to handle 100s of equity symbols just fine. I would start by optimizing the consuming logic (I'm assuming the program is written in some reasonably quick language).
|
USV
-Interested User-
Posts: 20
Joined: Mar 20, 2015
|
Posted: Sep 19, 2015 10:09 PM
Msg. 3 of 3
You are right. My program is also written in C#.NET. I am also using .NET socket classes and the BlockingCollection implementation of the Producer-Consumer interface for the initial consuming logic. I will explore other options to use instead of this.
Thanks for letting me know. It definitely helped.
|