I’ve just created a webapp and I have a few questions about the efficiency of backend workflows (I’ve already created a bunch of them but I’d like to know more about their efficiency):
Are they faster than classic workflows?
As they run in backend, do they limit the bugs of actions that don’t finish correctly if the user is active on his account at the same time?
I have a lot of steps on certain workflows and I’m hesitating to run them entirely in the backend with database logs. I’d use the frontend and workflows just for the trigger.
Do you have any software with complex workflows that take a long time to load? In what types of use and what have you implemented?
tldr; Workflows on a page runs on the client side while backend workflows run on the server
I don’t have specifics on speed, but usually, if I’m trying to run a workflow where time matters, a workflow on the front end makes sense, but for a lot of data processing (i.e., CSV export), I usually run it on the backend and send the user an email when it’s ready.
Yes. Backend workflows run even if the user is not on the page as long as it’s been scheduled.
Small additional question, currently when I run backend workflow (triggered by classic workflows), I put a loading time to my client (for reliability and security reasons). I don’t want him to be able to do anything that might interfere…
Do you think that if I pass everything in backend workflow I can let my users do what they want on my platform? Or can I just remove access to functionality that would run the same backend workflows?
What do you mean by “I don’t want him to be able to do anything that might interfere…”
Generally, no. You should still let people use your app as usual even when backend workflows are running. My general rule of thumb would be if you need something to happen immediately use a workflow on the front end for backend processes that might take longer or even for workflows (like a PW reset flow) that you use frequently in multiple places can be backend or something where security matters (i.e., a verification flow)
Using a backend workflow in Bubble is generally better than a normal (client-side) workflow because it offloads resource-intensive tasks to the server, allowing processes to run in the background while the user progresses to the next step, ensuring they don’t have to wait and enhancing overall app performance and responsiveness.
To tell you a little more, I provide my customers with a platform enabling them to track the evolution of their purchasing costs based on data from their invoices.
I therefore have a workflow that contains several Schedule Bacckend workflows in succession, triggering a multitude of actions to update costs. In my logic, these actions must be carried out one after the other, so I space them out by triggering logs or setting time limits.
The whole process currently takes 35 seconds. In my tests, when I don’t set a loading time and the customer does what he wants on the platform, it’s possible that it interferes with the workflow that triggers the backend list.
So my idea was to pass the entire process to the backend, without using classic workflows. Do you think that the customer can no longer interfere with the backends in progress? This would allow me to eliminate the loading time, just blocking any triggers he might trigger on his side using the same backend…
Sorry, the explanations are a bit long, but I’m trying to be as precise as possible…
So you also think I can pass everything to the backend, so I don’t have to block my client with a loading time?
I only block access to the front button that could trigger the same backend and that’s enough?
If I can get rid of loading times while increasing efficiency and move everything to the backend, that’s great! The problem is that I’ve got a list of backends that have to follow each other (B is triggered when A is finished), so it’s time-consuming and I’m afraid that not blocking the client will make the whole thing buggy…
You need to think about what the customer needs to see on the next page - for example, after signup you might want the customer to go straight to the dashboard … so in this case you need all steps to have completed. But, if there was a step which is not shown on the next page you could push that to the backend. Make sense?
Invoice analysis (via OCR) is launched in the workflow backend
The workflow backend updates all platform data (margins, expenses, etc.).
This whole process takes some time, as there are several dozen steps that need to be launched one after the other (and not at the same time).
If, while this backend workflow is running, the customer makes changes to another invoice, deletes one or does something else related to these backend workflows, he can potentially interfere with the missions in progress…
And therefore create breaks and bugs.
In my opinion, I have 2 options:
Set loading times to prevent it from interfering (or block buttons/triggering the same backend workflows)
Create a Logs system that puts operations on hold so that they’re triggered one after the other, but the client frontend won’t be updated directly…