Real time data
-
Hi friends,
I am reading one minute tcp data and parsing and writing to database continuous data delay is happening to update how to avoid that delay for updating .
-
I reading data from microcontroller using TCP socket in qt and parsing data real time and parsed data tried to update in database it is taking time . TCP data receive every 10 milliseconds.
-
Hi friends,
I am reading one minute tcp data and parsing and writing to database continuous data delay is happening to update how to avoid that delay for updating .
@satyanarayana143 said in Real time data:
I am reading one minute tcp data
TCP data receive every 10 milliseconds.
There is a difference between 1 minute and 10 milliseconds!
Anyway, if data arrives over TCP more frequently than the time it takes you to so some parsing/operations on it it's not going to keep up, is it? So you will need to buffer the incoming data somehow while dealing with it. You could read the data as soon as it arrives and do your own buffering, or you could rely on the OS or Qt levels to do the buffering for you, just make sure nothing is being lost.
You can introduce threads or separate processes or do the processing in the database if you wish, but none of that will alter the need to buffer if it cannot keep up with the input data arrival.
Algorithms are not "magic", they take the time they take. So what is your actual question?
-
@satyanarayana143 said in Real time data:
I am reading one minute tcp data
TCP data receive every 10 milliseconds.
There is a difference between 1 minute and 10 milliseconds!
Anyway, if data arrives over TCP more frequently than the time it takes you to so some parsing/operations on it it's not going to keep up, is it? So you will need to buffer the incoming data somehow while dealing with it. You could read the data as soon as it arrives and do your own buffering, or you could rely on the OS or Qt levels to do the buffering for you, just make sure nothing is being lost.
You can introduce threads or separate processes or do the processing in the database if you wish, but none of that will alter the need to buffer if it cannot keep up with the input data arrival.
Algorithms are not "magic", they take the time they take. So what is your actual question?
-
I reading data from microcontroller using TCP socket in qt and parsing data real time and parsed data tried to update in database it is taking time . TCP data receive every 10 milliseconds.