Standalone vs CGI: Some questions

  1. 2 weeks ago

    Ralph A

    May 8 Santa Monica, California

    I hear on this forum that XDC announced that CGI will be dropped for Standalone.

    1. Does this mean that the IDE will only build a Standalone app, giving us no option to build a CGI app?

    2. Right now, with CGI apps, I can build them so that if I have to kill the app (say it's unresponsive for some reason, producing an Internal Server Error 500), I can do that with a simple SFTP app on my mobile phone. This is done by simply renaming the CGI file, and then renaming it back. A piece of Timer code sees the missing CGI file and kills the app. When the CGI file is renamed back to normal, the next user to hit the app starts it again. I don't need access to the command line to handle such a situation. Will a Standalone app allow for simple killing and restarting from a mobile phone?

    3. Also, the Timer code mentioned above will kill the CGI app when SessionCount drops to 0. This allows it to automatically restart during unresponsive situations described above (I always have found that unresponsive CGI apps soon lose their Sessions). But suppose a Standalone app becomes unresponsive. Can it be configured to die and restart? I can't imagine how that would be done, as it has no access to the command line when dead. At least the CGI app starts up again when the next user hits it.

  2. John J

    May 8 Pre-Release Testers, Xojo Pro Cleveland, Ohio

    One of the best ways of managing standalone apps is by using the server operating systems built in methods for managing daemons. Most servers init systems include tools which are capable of restarting dead app instances automatically. I use this method myself personally and have found it quite solid and reliable, especially compared to any sort of manual app monitoring and restarting scheme.

    I host my apps on linux type OSes and many of those use either "systemd" or "upstart". Both of these systems will ensure your standalone apps launch at startup under the conditions you desire with control over the environment and many other helpful management features including restarting dead instances.

    Macs have "launchd" - which I believe is similar to the above. I cannot comment on Windows based servers.

  3. Louis D

    May 8 Pre-Release Testers, Xojo Pro Montreal, QC, Canada
    Edited 2 weeks ago

    On Windows, it is quite simple also.

    • Build the executable and install it on the server as desired.
    • Then, open a terminal window with elevated priviledges.
    • Type sc.exe create <new_service_name> binPath= "<path_to_the_service_executable>", replacing with the specific executable information, accept.
    • Then with the management console, you can define the start behavior (automatic, manual, disabled), recovery in case of failure, etc. for your new service.

    all in all, a 2-minute thing.

  4. Tomas J

    May 8 Pre-Release Testers, Xojo Pro Europe (Germany)
    Edited 2 weeks ago

    On Linux Webservers I fell in love with Webmin . It can monitor itself and anything you configure. So all my Standalone Servers or Services are checked periodically every 5 Min and eventually restarted if they do not respond with correct status code.

  5. Ralph A

    May 9 Santa Monica, California

    Thanks to all here who replied. Good info. Of course all this will depend on how whether Xojo Cloud or ServerWarp.com allow me to control such stuff. Right now, Xojo Cloud is CCGI only, and ServerWarp.com has no Standalone Do It Yourself.

  6. Hal G

    May 9 Pre-Release Testers, Xojo Pro, XDC Speakers CampSoftware.com

    You have time. Xojo said they will keep CGI server around and I'm sure ServerWarp will too.

  7. Greg O

    May 9 Xojo Inc

    @Hal G You have time. Xojo said they will keep CGI server around and I'm sure ServerWarp will too.

    Right. Xojo Cloud will still provide cgi support for older IDEs for the foreseeable future, but once we release the new web framework, those IDEs will only build and upload standalone apps.

  8. Tim P

    May 9 Pre-Release Testers Rochester, NY

    @Greg OLone Right. Xojo Cloud will still provide cgi support for older IDEs for the foreseeable future, but once we release the new web framework, those IDEs will only build and upload standalone apps.

    Thanks for the clarification, Greg :)

  9. Ralph A

    May 9 Santa Monica, California

    @Greg OLone Right. Xojo Cloud will still provide cgi support for older IDEs for the foreseeable future, but once we release the new web framework, those IDEs will only build and upload standalone apps.

    With ways for developers to configure that server to automatically restart a stuck Standalone app, etc?

  10. Greg O

    May 9 Xojo Inc

    @Ralph A With ways for developers to configure that server to automatically restart a stuck Standalone app, etc?

    I guess it largely depends on what you mean by “stuck.”

  11. Ralph A

    May 9 Santa Monica, California

    @Greg OLone I guess it largely depends on what you mean by “stuck.”

    Unresponsive. Internal Server Error 500. Stuff like that.

  12. last week

    Greg O

    May 10 Xojo Inc

    @Ralph A Unresponsive. Internal Server Error 500. Stuff like that.

    There are some things that we can do about that. The least of which is to set up the load balancer to stop routing new sessions to instances which don’t respond quickly enough or respond with http server errors.

    That said, over the years I’ve seen many user-caused situations which make their apps to respond badly and could easily trigger this mechanism. For instance, having a long running query that doesn’t yield could cause a timeout or an unhandled exception can cause a 500 Server Error response.

    All of this is hypothetical at this point though. We have to get most of the new web framework done before any of the Xojo Cloud work can be started.

  13. Stephen P

    May 10 Pre-Release Testers, Xojo Pro

    Hi Greg,

    Interesting comment as I was under the impression that most of the new web franework has been done. From your comment that appears to not be the case ?

    Steve

  14. Ralph A

    May 10 Santa Monica, California

    @Greg OLone That said, over the years I’ve seen many user-caused situations which make their apps to respond badly and could easily trigger this mechanism. For instance, having a long running query that doesn’t yield could cause a timeout or an unhandled exception can cause a 500 Server Error response.

    I was thinking more of cases where an iPhone user gets an Internal Server Error 500 because of its "deep sleep" problem (https://forum.xojo.com/53614-htaccess-and-cache-control ). But maybe that only happens with CGI apps and not Standalone apps?

  15. Greg O

    May 11 Xojo Inc

    @Stephen P Hi Greg,

    Interesting comment as I was under the impression that most of the new web franework has been done. From your comment that appears to not be the case ?

    What I meant is that the work on Xojo Cloud can’t be done until the new web framework and IDE integration is complete. It’s just a matter of logistics.

  16. Ian K

    May 12 Pre-Release Testers, Xojo Pro

    Sorry, I'm confused, are you saying that you won't build apps that will run under Apache anymore?

  17. Greg O

    May 12 Xojo Inc

    @Ian K Sorry, I'm confused, are you saying that you won't build apps that will run under Apache anymore?

    No. We are saying that they just won’t be CGI any more. You’ll still be able to use Apache as a front-end.

  18. natale p

    May 12 Pre-Release Testers, Xojo Pro

    @Greg OLone No. We are saying that they just won’t be CGI any more. You’ll still be able to use Apache as a front-end.

    how, with Apache? even now, without CGI?

  19. Julian S

    May 13 Pre-Release Testers, Xojo Pro UK

    @natalepappalardo how, with Apache? even now, without CGI?

    Just like you would with apache sitting in front of tomcat:

    https://linuxconfig.org/how-to-set-up-apache-webserver-proxy-in-front-of-apache-tomcat-on-red-hat-linux

  20. Ian K

    May 13 Pre-Release Testers, Xojo Pro

    @Greg OLone No. We are saying that they just won’t be CGI any more. You’ll still be able to use Apache as a front-end.

    Fair enough.

  21. Newer ›

or Sign Up to reply!