Here’s my scenario:
User enteres a subject and this results in three types of object:
topic, theme, paper
topic has 1-5 themes, each theme has 1-4 papers
I’ve created custom data types for topic, theme, paper.
The custom data types are populated by different API calls.
So far, so boring. Here’s the kicker, the API calls are quite slow. There is nothing I can do about that, it’s just the time it takes.
I found this youtube vid: How to Save Data From an API to Your Bubble Database | Bubble.io Tutorials - YouTube
Which talks about getting an json array from an API (which is exactly what the APIs Im using return) Which works great for the first part (generating themes from a subject)
However things go wrong when I try to create a list of papers from a list of themes.
“go wrong” means that the workflow finishes waaaaay too quick (the progress bar dashes across the top in short order) and Im left with nothing in the papers table.
Given the time it takes the APIs to return information, and oft quoted stat that users will wait for x Seconds before giving up, Im thinking of a new workflow:
- User enters topic & clicks “Search”
- The user gets a “We are compiling your information, check back later / we’ll email you once its done” type page
- Some backend workflow is triggered which goes off, and gets the information it needs from 10-15 API calls (5 themes & 3 or 4 associated papers)
A few questions:
- Given the information above does it sound like a good strategy?
- Can you think of another way that might work better?
- My Own thought: Triggering workflows based on a change in a record seems sensible
I know these are vague, But Im a coder, trying to understand bubble. Any help or pointers greatly appreciated.