#1 2024-06-03 11:20:09

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Question concerning "auto"-Retry

Hi Arnaud, i found this topic: https://synopse.info/forum/viewtopic.php?id=6249

and have a similar problem.

On Client Side i prepare a lot of Data lets say 50000 Records.
I pass them as an array of Records thru a SOA Function
The Server needs 10min to work on this records.
so i have to set my Timeouts > 10min (Send/Receive/Connect)

else a retry will occur and send the Records again.

As you wrote in the topic the server should only use ms to answer.
What will be the best approach to realise this big task ?
Should i implement an own thread handling it and send notifications during processing to client ?

Also as in topic, debugging is anoying with the retry.
What is the reason to retry the sending of data ? Should this not be handled in the SOA Call.


Rad Studio 12.1 Santorini

Offline

#2 2024-06-03 11:30:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: Question concerning "auto"-Retry

What does "The Server needs 10min to work on this records." mean?
Does it mean that the server takes 10 minutes to finish the SOA function?

If yes, then you are right: for such big task, you need to create your own processing thread, and if you need send notifications to the client, or let the client ask for the current status (e.g. every 10 seconds).
The easiest IMHO is to have some SOA methods like StartBigProcess / GetBigProcessState / AbortBigProcess / ListBigProcesses for your purpose.

Keeping a HTTP request waiting for 10 minutes is no option, IMHO.
If the connection is broken (it happens), you won't know anything about your process state.
And it will maintain on use one of the threads of the HTTP server. Not very safe against DoS attacks.

About the Retry, it makes sense indeed only when the method returns quickly.

In short: what I wrote at https://synopse.info/forum/viewtopic.ph … 427#p37427 still applies.

Offline

#3 2024-06-03 11:42:51

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: Question concerning "auto"-Retry

Ty for your answer, i understand that client should not wait long for answers smile


Rad Studio 12.1 Santorini

Offline

Board footer

Powered by FluxBB