Sending data to queue of servers
-
wrote on 20 Jul 2021, 11:41 last edited by
Hi i wonna send same file to multiple servers one by one. It takes 30 min, so i thinking about Qt Concurrent or Event loop, any advice?
-
Hi i wonna send same file to multiple servers one by one. It takes 30 min, so i thinking about Qt Concurrent or Event loop, any advice?
@qtprogrammer123 said in Sending data to queue of servers:
Qt Concurrent or Event loop
unlikely and please no!
Share a bit more information, what server, what data, what connection type
Almost certainly, independent of your answer as long as you use Qt classes, Qt will offer a signal when the "file transfer" of a file is done, and you can use that to dequeue a queue/list/vector and send the next file
-
wrote on 20 Jul 2021, 11:54 last edited by qtprogrammer123
It's binary file, and i reciving info from server about processing it after upload, im using tcp
File -> Server
Server -> Progress bar value
... -
It's binary file, and i reciving info from server about processing it after upload, im using tcp
File -> Server
Server -> Progress bar value
...@qtprogrammer123
so QTcpSocket in essence ? than it has abytesWritten
signal, inherited from QIODevice you can use that to see when the data from the file is completely written. And send the next from the queue.Assuming you're not blocking the event loop via
waitForSomething
calls or other infinite loops -
Hi,
Beside the good points of @J-Hilk, how many files are we talking about ? To how many servers ? Which size ? Which type of connection do you have ?
-
wrote on 22 Jul 2021, 07:49 last edited by
Its only one file, up to 1 MiB, max 1000 servers, reciving data from server after upload up to 5 sec
-
Are these REST services ?
1/7