Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"Everything is working great ! Very impressive client. The news refreshes better and is more pertinent than the ******* feed I paid $ 100/month for. I Also like the charts a lot." - Comment from Leon
"Excellent datafeed !!!" - Comment from Arely
"I'm very glad I switched to IQFeed. It's working perfectly with no lag, even during fast market conditions." - Comment from Andy via Email
"I'm satisfied with IQFeed. It's the most reliable and fastest quote feed I have ever used. Although I'm a resident in China, it's still very fast!" - Comment from Xiaofei
"Interactive Brokers tick data was inconsistent, so I have switched to using DTN exclusively. It is great to no longer have to worry about my datafeed all day long." - Comment from Philippe
"IQ feed is brilliant. The support is mind-bending. What service!" - Comment from Public Forum Post
"Thank God for your Data Feed as the only Zippers I see are on my pants (LOL), and no more 200 pip spikes to mess up charts." - Comment from Spiro via Email
"I am very pleased with the DTNIQ system for quotes and news." - Comment from Larry
"I like you guys better than *******...much more stable and a whole lot fewer issues." - Comment from Philip
"Its working FABULOUSLY for me!! Holy cow...there has been so much I've been missing lately, and with this feed and Linnsoft software...I'm in the game now." - Comment from Chris R.
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »IQFeed Developer Support »Best practice question
Author Topic: Best practice question (3 messages, Page 1 of 1)

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.
 

 

Time: Sun May 19, 2024 2:04 PM CFBB v1.2.0 9 ms.
© AderSoftware 2002-2003