In a mobile application, I have a number of tables to synchronise with my OS back end to local data tables.
Is there a way to run these synchronisations simultaneously in mobile? I'm thinking something like BPT but for mobile?
Hi Chris,
I believe that at the moment that is not possible.
And this is not a limitation of OutSystems, but rather from the technology under-the-hood... JavaScript is single threaded... The only for it to have use of other threads, at the moment, is through service workers... but for that you'll need to do things manually, since they don't come out of the box (well it's just a bit more of JS :)
About service workers: https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
Hope this helps,
Cheers,
Rúben
Yes, there are a few ways to run multiple table synchronizations simultaneously in a mobile application.
One way is to use a background processing framework, such as AsyncTask or RxJava. These frameworks allow you to run tasks in the background, so they won't block the main thread of your application. This means that you can run multiple synchronizations at the same time without affecting the performance of your app.
Another way to run multiple synchronizations simultaneously is to use a queue. A queue is a data structure that allows you to store tasks and then process them one at a time. You can use a queue to queue up the synchronization tasks, and then process them in the order they were received. This will ensure that all of the synchronization tasks are executed, even if they are not all ready to run at the same time.