It is hard to know exactly what "immediate" even means here, but a good rule of thumb might be that anything that requires a non-default timeout is too slow. If an action will take longer than a couple of seconds, the behavior should not be send a request and wait for a reply. It should instead be send a request which triggers the start of the action, poll to see if the action is done at whatever interval, the retrieve the result once it is finished. It is fine if dragonfly or something else implements this as a single command line action, but the service behavior should be changed.
Motivations include:
that services respond to requests sequentially, so long acting requests block other activities, causing other timeouts
a user potentially doesn't know if there has been no reply because the service is working, or because it failed and was unable to send an error back (both because the local session is blocked so you can't send another request and because the service is blocked from responding to further requests)
if the sender times out, then the reply is lost after it is sent (since there is no consumer for it), if cached, then that value could be retrieved multiple times, either until another trigger has started a new action or perhaps the endpoint determines for itself that a value is stale after some period
Further thoughts:
It isn't obvious how best to do this. Obviously one could use multiprocessing or threading, but those have subtleties especially in combination with the existing async backend. It is possible that the existing async backend could be used to achieve the same.
This may be a motivation to migrate the entire system to python 3, where there is native support for async. Such a change would be a very significant change to the structure of the code and should not be undertaken lightly.
It is hard to know exactly what "immediate" even means here, but a good rule of thumb might be that anything that requires a non-default timeout is too slow. If an action will take longer than a couple of seconds, the behavior should not be send a request and wait for a reply. It should instead be send a request which triggers the start of the action, poll to see if the action is done at whatever interval, the retrieve the result once it is finished. It is fine if dragonfly or something else implements this as a single command line action, but the service behavior should be changed.
Motivations include:
Further thoughts: