RESTXQ: How to Reflect Progress of Long-Running Querries

Friday, 15 July 2022 · 2 messages · last reply 16 Jul 2022
EK
Eliot Kimber15 Jul 2022 17:00 #
In my Mirabel system, I have multiple BaseX instances to handle long-running processes while a primary instance serves the web pages. For these background processes I’d like to be able to show progress in the main web app. My question: what are the options for doing this? I can imagine having a database to write progress data to and then read from that in my RESTXQ page (maybe using a simple JavaScript to poll the app). Are there better techniques? I’m trying to limit the amount of JavaScript I have to write but I can do it if I have to. Thanks, E. _____________________________________________ Eliot Kimber Sr Staff Content Engineer O: 512 554 9368 M: 512 554 9368 servicenow.com<https://www.servicenow.com> LinkedIn<https://www.linkedin.com/company/servicenow> | Twitter<https://twitter.com/servicenow> | YouTube<https://www.youtube.com/user/servicenowinc> | Facebook<https://www.facebook.com/servicenow>
CG
Christian Grün16 Jul 2022 09:10 #
Hi Eliot, If all BaseX worker instances use the client/server architecture [1], the Client Module [2] could be used to request the list of currently running queries via jobs:list-details [3]. And I’m also convinced that’s not the most obvious solution … Christian [1] https://docs.basex.org/wiki/Database_Server [2] https://docs.basex.org/wiki/Client_Module [3] https://docs.basex.org/wiki/Jobs_Module
Quoted text · Eliot Kimber · 15 lines
On Fri, Jul 15, 2022 at 5:01 PM Eliot Kimber <eliot.kimber at servicenow.com> wrote: > > In my Mirabel system, I have multiple BaseX instances to handle long-running processes while a primary instance serves the web pages. > > For these background processes I’d like to be able to show progress in the main web app. > > My question: what are the options for doing this? > > I can imagine having a database to write progress data to and then read from that in my RESTXQ page (maybe using a simple JavaScript to poll the app). > > Are there better techniques? I’m trying to limit the amount of JavaScript I have to write but I can do it if I have to. > > Thanks, > E.

⚡Generated with XQuery