Are client-side loops (via SimpleLooper or ListShifter) with DB actions unreliable?

So, @akalati, I assume what you are probably doing is leaving the page before the items are created/updated in the database. (And unfortunately, there is no convenient way for us to know when this has happened.) It’s also very easy to cap out your app (exceed momentarily available capacity) in this way.

Note that, when testing stuff like this you may be exceeding your capacity because, well, you’re testing and just firing these database operations constantly over some short period.

Anyway, let’s say you’re doing a shopping cart thing and when you click a button to go to the checkout page you’re iterating over a list of selected products (perhaps to create the line items for the order), so you fire Begin Iterate, and on End Iterate you’re like, OK cool, done, navigate the User to the checkout page.

Well, what has happened is that, while the Things appear to the page that they exist (the Things exist in their Bubble object form in the page) some or all of them do not yet exist in the database and will not be available to the next page (the page to which you navigated). They are not searchable as they do not exist.

In computer time terms, End Iterate happens waaaay before the objects are created in the db, even if you have lots of capacity. All your iterative workflow does is queues up these pending database operations. If you leave the page before they are done (again, there is no programmatic way I am aware of to establish this) any pending database actions simply disappear/get cancelled.

If you test this the right way you’ll observe that, at times, seemingly at random, a db creation or change will take substantially longer than usual so it’s simply not safe or capacity efficient to attempt to do things this way.

I’ve discussed this in various places at length, but @tylerboodman asked me about a related topic and you’ll probably find my response to them helpful: