Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Long running operations on GBC through GAS  (Read 11043 times)
Alessandro (Efisio) R.
Posts: 42


« on: September 19, 2019, 05:17:48 pm »

Hi,

We are migrating an application from GDC over SSH connection to GBC through GAS HTTP connection.
Since HTTP protocol is stateless, i'm wondering if long running operations we used to launch and wait with the GDC over SSH can be run in interactive mode, waiting their end on a browser page or if we should implement a kind of job system which executes these operations in background.
I noticed that when an FGL application is busy and doesn't update the ui for a certain amount of time, GBC starts some web requests to the GAS which take 60 seconds to return a response by default (because of the REQUEST_RESULT parameter I suppose)
What do fourjs gas/gbc devs recommend me? And also, what are the experiences from fourjs customers devs in this regard?

Thanks
Frank G.
Four Js
Posts: 48


« Reply #1 on: September 19, 2019, 05:29:27 pm »

Hi,

 By default, if you start a GBC application through the GAS, your application will star alive until you click the close button in your app. This is the expected behavior.
If you want you application to close after some inactivity time, there is an AUTO_LOGOUT feature to be set in the xcf of your application to end it after a given time of inactivity.

What do you want to achieve actually ?

Frank
Alessandro (Efisio) R.
Posts: 42


« Reply #2 on: September 19, 2019, 05:51:50 pm »

Hi Frank,

The thing that most worries me is to lose the session during a long running operation.
Is it suggested to keep an operation running for hours in a GBC window or not?
What I don't want for sure is to be logged out while waiting.
I'm asking this because on the web generally it's not recommended to make users wait for a long running operation end in a web page.

Thanks
Reuben B.
Four Js
Posts: 1047


« Reply #3 on: September 19, 2019, 11:41:22 pm »

If I understand the question correctly, it is for cases for long running reports or processes that may take upwards of 5,15,60 etc minutes to run.  This program might have some UI in the form of a  process indicator e.g. Processing 1 of 1000 records, Processing 2 of 1000 records etc and/or it might have an interrupt button so that the user can stop it.  With the typical GDC over SSH setup, you could be assured that as long as the SSH connection stayed up between the GDC on your PC, and the fglrun process on your back up server, then this report/process would continue to be run.  The same is true with GBC/GAS/HTTP, that is the report/process would continue to run due to the keep-alives occurring behind the scenes , you are not forced to "implement a kind of job system" by moving from GDC/SSH to GBC/GAS/HTTP.

However you might want to consider the following ...

1. If you decide to enable AUTO_LOGOUT, what will happen to these long running programs with UI that typically take longer than the AUTO_LOGOUT period?  ...

2. How difficult is it for a user to close the GDC and what will be their typical response to the dialog that appears, versus the equivalent web behaviour which is closing a browser tab and their typical response to the dialog that appears?    I would argue that a typical user is unlikely to attempt to kill gdc.exe, and is likely to respect the dialog that appears if they attempt to do so, whereas in a web environment, closing a browser tab and ignoring the warning dialog, is something they are more likely to do, and it is for that reason you might want to consider to "implement a kind of job system which executes these operations in the background"

Reuben



Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Ernest D.
Posts: 18


« Reply #4 on: January 23, 2020, 02:07:20 pm »

We have similar problem. When the device with Android OS has dimmed screen, the GBC session is broken. AUTO_LOGOUT we have set to 86400. Our App dont work in background, after some time of inactivity Session in Chrome App is closed. Do you have any ideas, how to configure Android device to keep alive GBC session?
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines