Scenario: a client wants to test a scenario where they run a transaction against a Roxie service, and they would like the transaction to take at least 50 seconds before it returns anything. What is a good approach to this?
One idea I had is to maybe use the current time and add 50 seconds to it, and when the current time = current time + 50 seconds, we would let the query continue/resume. Maybe use WHEN(), WAIT(), or something else? Any insights would be appreciated.
First, I'd like to state that this goes against the very design concept of ROXIE, which has always been about making queries as fast as possible -- usually sub-second response to any/every query. I cannot imagine a real-world scenario where this kind of long-delayed response would be desirable.
With that said, you certainly could experiment with using either the WHEN workflow service or the WAIT function to accomplish this. I can't immediately think of any other way you might do this in Roxie. I'd be interested to hear about the results of your experimentation.
Personally, I would probably just insert the return response delay into whatever GUI frontend you're providing to the query. IOW, I would not "mess around" with Roxie and just delay displaying the returned data to the end-user for however long you choose.
HTH,
Richard