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)




"I will tell others who want to go into trading that DTN ProphetX is an invaluable tool, I don't think anyone can trade without it..." - Comment from Luther
"I just wanted to let u know that your data feed/service is by far the best!!! Your unfiltered tick data is excellent for reading order flow and none of your competitors delivers this quality of data!" - Comment from Peter via Email
"If someone needs the best quality data and backfill beyond what their broker provides at a rate that is the best in the industry, I highly recommend IQFeed." - Comment from Josh via Public Forum
"I just wanted to say how happy I am with your service. I was able to download the API docs last week and I was able to replicate Interactive Brokers historical bar queries and realtime bar queries over the weekend. That was about one of the fastest integrations that I've ever done and it works perfectly!!!!" - Comment from Jason via Email
"I would just like to say that IQFeed version 4 is running very well and I am very happy with its performance. I would also like to extend a big thanks for the fast and efficient help that I always receive. My questions and concerns are always addressed promptly. Way to go!" - Comment from Josh in CO.
"I like you guys better than *******...much more stable and a whole lot fewer issues." - Comment from Philip
"Everything is working amazing now. I'm already impressed with the true-tick feed of IQFeed and it's ability to support my 480 symbol layout." - Comment from Tyler via Email
"I've been using IQFeed 4 in a multi-threaded situation for the last week or two on 2600 symbols or so with 100 simultaneous daily charts, and I have had 100% responsiveness." - Comment from Scott
"With HUGE volume on AAPL and RIMM for 2 days, everyone in a trading room was whining about freezes, crashes and lag with *******, RealTick, TS and Cyber. InvestorRT with IQFeed was rock solid. I mean SOLID!" - Comment from Public IRC Chat
"DTN feed was the only feed that consistently matched Bloomberg feed for BID/ASK data verification work these past years......DTN feed is a must for my supply & demand based trading using Cumulative Delta" - Comment from Public Forum Post
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: Fri May 3, 2024 3:51 PM CFBB v1.2.0 13 ms.
© AderSoftware 2002-2003