Need Faster Response times

Options
I wish we could have faster response ties where the output is sent immediately as it's generated regardless of the following steps.

In the screenshot example below, I've created a variable "output", but it won't be sent back as a response until after the delay is completed even though it's generated before and the delay shouldn't matter. It would just be nice for really simple stuff before external API calls are made, just to say "yup your response is accepted", then in the backend be able to create the customer in Stripe, etc.

This would speed up my app tremendously and just makes so much sense to at least have as an option if not default. [Screen Shot 2022-03-31 at 3.36.22 PM.png]

Comments

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    This comes up a lot in the forum - am sure the Xano team has noticed! The idea I suggest you try is to have endpoint A call endpoint B via the External API Request function with a short timeout. This causes B to trigger while A abandons waiting for the request. Effectively, A then returns (quickly!) while B slogs along doing the rest of the work. 
  •  Ooh that makes sense! That's just a frustrating workaround because then if there's a proper fix for this is basically means rebuilding the whole process again
  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
     I hear that. But with the pace of evolution in nocode tools, planning for the rebuild is probably a good pattern to begin with!

    (And as the tools get better, each rebuild is that much faster!)

    Let me know if you have questions/issues with this particular workaround. 
  • Valentin R
    Valentin R Member
    Options
     cool suggestion, was thinking about trying it to speed up my data intake process. One question — wouldn't a timeout on B endpoint throw an error as a response on A?
  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
     That's the great thing! You get a response back in say 1 second that contains a status of "0" and a result of false, but it doesn't throw an error. You won't have access to the output of B because A stopped listening for it. But you have successfully kicked it off.
  • Valentin R
    Valentin R Member
    Options
     great, thanks Ray
  • Valentin R
    Valentin R Member
    Options
     works well. I guess I can't set the timeout <1 sec?
  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
     It requires a nonzero integer for the timeout, so I'm afraid the fastest I've gotten it is 1. 

    There is a more responsive and more complete way to do this: making an event queue that runs off of background tasks. Basically, your event would send information to a table (super fast), and you would have a background process that (say, every minute) pulls information from that table to decide to run. That way your endpoint wouldn't have to wait for the second https handshake, and the whole system is more reliable. This approach requires the paid Launch plan or better. 
  • Valentin R
    Valentin R Member
    Options
     haha, I've actually posted a question about this option yesterday. Seems more reliable too.
    https://community.xano.com/c/help-im-a-noob/speed-up-the-process