Asynchronous HTTP call, how does it work in Make?

#The client says his colleague uses an asynchronous call with an HTTP module to the resource API and the script runs much faster.

Could you please give me an explanation about this, it seems to me that it does not affect the speed of the script in any way.

I did not express myself correctly, it will affect the speed of script execution, but we will not get a result from the HTTP module, because it remained in the queue.

Hi @Oleksandr_Tsap,

Modules in Make run in consecutive order, they cannot run asynchronous of eachother.

Do you by any change refer to the sequential processing setting in the scenario settings? This will ensure that data is passed through the scenario in order:

In any case, follow these steps when asking a question, and you’ll be more likely to get a helpful answer:

:writing_hand: Give us a detailed explanation of what you’re trying to achieve

:footprints: Tell us about any steps you’ve tried so far

:camera_flash: Include screenshots of:

  • your scenario flow and setup (functions, mappings, variables, etc.)

  • module configurations and outputs

  • any error messages you are getting

:card_file_box: Share the blueprint of the scenario you are asking a question about. (this does not contain any connection or personal information)

Henk
Certified Make Expert and Partner
Book a consult with me

3 Likes

blueprint (7).json (238.8 KB)

here is blueprint.

That is a Clients answer - “It’s literally 10000% possible I didn’t come up with this idea i am telling you that it works and this is how it is done there are just some tweaks to be made since it was created by him but not fully applied to our situation. Works ten billion percent”

The 3rd module in the script is an asynchronous request to relevance.ai.

but I’m sure that is impossible

And the request works as it should asynchronously, returns only IDs, and the answer can be received only through a callback or a promise.
async response

And what is the purpose of the scenario, exactly? Can you explain it step by step?

The HTTP module is by default synchronous; It will wait for the external APIs’ response before it can parse the result into bundles. In general, HTTP requests can be asynchronous, but not in the context of Make. That is not how it works in Make.

With synchronous HTTP calls (from Make), regarding the type of job and its severity, the job can take too long. This might cause a timeout (default 40 sec). E.g. with file conversion such as CloudConvert. In that case, it is better to create two scenario’s:

  1. Will start the asynchronous process through a HTTP call
  2. Will wait for incoming requests whenever a asynschronous process ends, here you can process the results as you like.

I think this is sort of what you are trying to do with the sleep modules? It would be better to have a second scenario that runs whenever the answer in Relevance.ai is ready (I am not familiair with this tool)

Cheers,
Henk

3 Likes

You are right, I need to make another request to relevance by ID.

2 Likes