4D Client/Remote as Web Server

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

4D Client/Remote as Web Server

4D Tech mailing list
I know this topic has been addressed before, but I'd like to hear what y'all are doing about this.

We need to provide a solution where the web server is in the DMZ and the database server is behind the firewall.

We know 4D remote can be used for this... no problem there.

But what about when the machine goes down and restarts?

We know that are a few 3rd party solutions for setting up an application as a service, e.g. "AlwaysUp"

Like to hear what other alternatives any of you have implemented to make sure 4DRemote as Web server is always operational.

Many thanks!

Randy Engle
XC2 Software LLC – XC2LIVE!


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: 4D Client/Remote as Web Server

4D Tech mailing list
Randy,

I have 4D Client running as a web server on windows.  I have the client write a text file every 45 seconds or so to disk.  I then have a batch script that runs every minute and looks for that file and deletes it.  If the file is not found it kills the 4D task and restarts 4D Client.  I also have software the monitors a page on the site and if the page is unavailable for more than a couple minutes starts sending emails and text messages etc so that someone can check it out.

Thanks
Justin Will
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: 4D Client/Remote as Web Server

4D Tech mailing list
Hi Justin,

Many thanks!
Good innovative ideas!

Randy Engle
XC2 Software LLC – XC2LIVE!

-----Original Message-----
From: Justin Will [mailto:[hidden email]]
Sent: Friday, August 11, 2017 7:43 PM
To: 4D iNug Technical <[hidden email]>
Cc: Randy Engle <[hidden email]>
Subject: RE: 4D Client/Remote as Web Server

Randy,

I have 4D Client running as a web server on windows.  I have the client write a text file every 45 seconds or so to disk.  I then have a batch script that runs every minute and looks for that file and deletes it.  If the file is not found it kills the 4D task and restarts 4D Client.  I also have software the monitors a page on the site and if the page is unavailable for more than a couple minutes starts sending emails and text messages etc so that someone can check it out.

Thanks
Justin Will

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 4D Client/Remote as Web Server

4D Tech mailing list

> I have 4D Client running as a web server on windows.  I have the client write a text file every 45 seconds or so to disk.  I then have a batch script that runs every minute and looks for that file and deletes it.  If the file is not found it kills the 4D task and restarts 4D Client.

Something similar on macOS, someone?

--
Arnaud de Montard




**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 4D Client/Remote as Web Server

4D Tech mailing list
You could do a similar process using AppleScript.


> On 13 Aug 2017, at 10:49 AM, Arnaud de Montard via 4D_Tech <[hidden email]> wrote:
>
>
>> I have 4D Client running as a web server on windows.  I have the client write a text file every 45 seconds or so to disk.  I then have a batch script that runs every minute and looks for that file and deletes it.  If the file is not found it kills the 4D task and restarts 4D Client.
>
> Something similar on macOS, someone?
>
> --
> Arnaud de Montard
>
>
>
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 4D Client/Remote as Web Server

Paul Dennis
I run client webserver on windows and use nssm to  run client as a service. Works great. Dont run any methods to keep activity up stays connected all weekend.
Paul
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 4D Client/Remote as Web Server

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Hi Arnaud,

I’m doing a similar thing, but a little more sophisticated...

From my 4D ‘to be watched’ processes, I write the last date and time of execution. Then I have a watchdog AppleScript which checks the datetime and sends an email if something is wrong.

Finally a crontab entry launches the AppleScript every … minutes.

AppleScript: =========================

-- read deamon file content subroutine
on readDaemonFile(thePath)
        tell application "Finder"
                try
                        if exists file thePath then
                                set fileExists to true
                        else
                                set fileExists to false
                        end if
                end try
        end tell
       
        if fileExists then
                set theFile to (open for access file thePath)
                set theText to (read theFile for (get eof theFile))
                close access theFile
        else
                set theText to ""
        end if
       
        return theText
end readDaemonFile

on alertDaemon(theDaemonName, theDBName, theText)
        set maxTime to 1 * 60 * 60 --max 1 hour
       
        if theText is not equal to "" then
                set dimonaTime to date (theText)
                if (((current date) - dimonaTime) > maxTime) then
                        sendMail(theDBName & " " & theDaemonName & " *** daemon probleem.", “Last run: " & theText)
                else
                        --all is fine
                end if
        else
                sendMail(theDBName & " " & theDaemonName & " *** daemon probleem.", "Daemon not active.")
        end if
end alertDaemon


-- check dimona daemon
set pathDaemonaFile to "Macintosh HD:Batch:dimona_deamon.txt"

alertDaemon(“MyProject", "DIMONA", readDaemonFile(pathDaemonaFile))

AppleScript: =========================


Kind regards,
Koen


> Op 13 aug. 2017, om 16:49 heeft Arnaud de Montard via 4D_Tech <[hidden email]> het volgende geschreven:
>
>> I have 4D Client running as a web server on windows.  I have the client write a text file every 45 seconds or so to disk.  I then have a batch script that runs every minute and looks for that file and deletes it.  If the file is not found it kills the 4D task and restarts 4D Client.
>
> Something similar on macOS, someone?



--------------------
Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Knesselare
Belgium
tel +32 495 511.653

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Loading...