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)




"DTN has never given me problems. It is incredibly stable. In fact I've occasionally lost the data feed from Interactive Brokers, but still been able to trade because I'm getting good data from DTN." - Comment from Leighton
"I've been using Neoticker RT with IQFeed for two months, and I'm very happy with both of the products (I've had IQFeed for two years with very few complaints). The service from both companies is exceptional." - Comment from Public Forum
"Excellent datafeed !!!" - Comment from Arely
"I noticed that ******* quotes locked up shortly after the interest rate announcement yesterday while yours stayed stable." - Comment from Ron in Utah
"After all the anxiety I had with my previous data provider it is a relief not to have to worry about data speed and integrity." - Comment from Eamonn
"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 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
"I cannot believe what a difference it makes trading with ProphetX!" - Comment from Bruce in Los Angeles
"Thanks for all of your help. Great customer service deserves to be recognized which one the reasons I've been a customer of DTN for over 10 years!" - Comment from Stuart
"I have been using IQFeed now for a few years in MultiCharts and I have zero complaints. Very, very rare to have any data hiccups or anything at all go wrong." - Comment from Public Forum
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 »can we use multiple socket connections for Level I realtime data
Author Topic: can we use multiple socket connections for Level I realtime data (3 messages, Page 1 of 1)

vis_nagraj
-Interested User-
Posts: 5
Joined: Jun 27, 2007


Posted: Jun 27, 2007 05:19 AM          Msg. 1 of 3
Dear steve,

I had a query regarding using multiple socket connections to IQConnect. We have a requirement of getting realtime data (level 1) for around 100 symbols at the same time. The application is developed in Java. I have a confusion regarding this. Should i use a single Socket connection and give commands for all the 100 symbols, OR should i used different Socket connections at the same time for each symbols. Secondly, we have to use threads to read data from socket, but here also should I use a single thread with a single socket connection for all 100 symbols, OR should i create individual threads (and individual socket connection) for each symbol. Please could u help me in this. How would it affect the performance if we use multiple threads (or socket connections).

Eagery awaiting for some good reply...


Vishwanath

dis
-Interested User-
Posts: 24
Joined: Apr 16, 2007


Posted: Jun 27, 2007 07:54 AM          Msg. 2 of 3
A lot of threads will decrease your performance because there would be some CPU time to switch between them. The good practice is to have one thread per one CPU.

I have desktop application which has 2 threads: main (GUI - request data and watch results) and background one which listens the socket and sends data to the UI. It updates ~700 symbols using single socket and works fine for me.

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: Jun 27, 2007 08:31 AM          Msg. 3 of 3
With IQFeed, you can create up to 20 local level 1 socket connections at any given time. However, there should be no need to do this unless you have a need to keep certain data compeltely separate in your app. IQFeed makes a single socket conenction to the server for level 1 data.

Concerning threads, as dis said, this depends upon the number of CPU's and/or the number of simultaneous threads your computer can execute at one time (usually equal to the number of CPU's that windows reports). You will see that exceding this number by more than a few threads will actually significantly decrease the performance of your app.
Edited by DTN_Steve_S on Jun 27, 2007 at 08:32 AM
 

 

Time: Wed May 8, 2024 5:42 PM CFBB v1.2.0 8 ms.
© AderSoftware 2002-2003