FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour AYUDA Explicaci贸n. WebApp - ModHarbour
Posts: 555
Joined: Wed Jul 31, 2013 01:14 PM
AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Sat Sep 17, 2022 01:56 AM

Estimados amigos:

Por favor me ayuden a entender lo siguiente.
1 - WebApp - Es la facilidad de hacer aplicaciones con FWH que se puedan (en un futuro), crear aplicaciones web.???
2 - ModHarbour - Es la facilidad de crear pagina web con FWH ?????

Tengo un mareo b谩rbaro.
Veo al Sr. Otto tan entusiasmado con ModHarbour que me da curiosidad.
Lo de WebApp, ya se que depende de Fivetech y que se esta trabajando en ello.
ModHarbour apunta a lo mismo????

Como hago para iniciar en ModHarbour, Explicaci贸n para simios... :) :)

Muchas amables por su tiempo y disculpen.

Saludos, Ruben Dario Fernandez

Dario Fernandez

FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.

Maldonado - Uruguay
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Sat Sep 17, 2022 07:27 AM

Estimado Ruben,

mod_harbour ha sido probado durante tres a帽os y la conclusi贸n es que no funciona bien, en aplicaciones con muchos usuarios, salvo en la versi贸n CGI.

Las versiones que han ido apareciendo por diversos usuarios, no funcionan tampoco. Es decir, para unos pocos usuarios y unas pocas peticiones si funcionan.

Cuando el volumen de usuarios es muy grande, tanto Apache como el servidor acaban muriendo. La raz贸n se deben a que las peticiones de memoria no se hacen a trav茅s de Apache sino directamente al sistema operativo y esto hace que colapse Apache y el servidor. La 煤nica versi贸n que funciona correctamente es la versi贸n mod_harbour CGI. Aqui te van contar historias, que si si, que si no. Te estoy diciendo la verdad, solo la versi贸n CGI funciona correctamente a nivel profesional.

Todo lo dem谩s, son historias y cuentos que no son verdad.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 555
Joined: Wed Jul 31, 2013 01:14 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Sun Sep 18, 2022 12:39 AM

Excelente Antonio.

Muy esclarecedora.

Larga Vida a FWH.
MUCHAS GRACIAS.

Saludos
Ruben Dario Fernandez

Dario Fernandez

FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.

Maldonado - Uruguay
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Sun Sep 18, 2022 07:21 PM

Dear Antonio,
what do you actually have to change in the mod harbour sourcecode if you want to use the CGI version.
Best regards,
Otto

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Sun Sep 18, 2022 07:34 PM

Dear Antonio,
Actually I haven't had any problems with the mod harbor server.
From what number do you speak of an application with many users?

Is more likely that DBF or SQL are affected.

Best regards,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Mon Sep 19, 2022 04:49 AM
Dear Otto,

mod_harbour CGI is available from here:
https://github.com/FiveTechSoft/mod_harbour/tree/master/cgi

I meant 500 users or more, accessing many of them simutaneously. That will kill mod_harbour, Apache and the server, all of them.
All existing versions, derivatives, etc. The reason is quite simple: Harbour can not use memory from the operating system directly.

With mod_harbour CGI there are no issues at all. We have been testing this with a large company for three years, so I am telling the truth.
People may say what they want, but I do know what I am talking about. mod_harbour CGI is the only safe and rock solid way. All other
versions will fails and will crash Apache and the server itself.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Mon Sep 19, 2022 06:14 AM

Dear Antonio,
I looked for a documentation on modharbour.org for CGI.

May I ask if fastcgi is the same as cgi.

Can you please help me how to start with CGI?

So far, I have only used modharbour with APACHE.

Everything runs wonderfully. Of course, I don't have such large numbers of users.

Best regards,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Mon Sep 19, 2022 08:51 AM

Dear Otto,

> May I ask if fastcgi is the same as cgi.

No, they are not the same. Forget about fastcgi. The idea of using CGI (which in fact is named by Apache as mod_cgi) is that you are given with an entire environment for yourself where you can take all the memory that you need from the operating system and lately Apache cleans everything in a proper way. Ans THAT makes the real difference. Apache does it perfectly well, and there are no issues for Apache neither for the server.

> Can you please help me how to start with CGI?

I am going to post an example.

> Everything runs wonderfully. Of course, I don't have such large numbers of users.

On small tests everything seems ok, but when you get into real production, then the real problems start, unless you use CGI. Trust me.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Mon Sep 19, 2022 09:00 AM
Dear Otto,

Simply copy modharbour.exe and libcurl-x64.dll from here to the cgi-bin folder of your Apache:
https://github.com/FiveTechSoft/mod_harbour/blob/master/cgi/windows/modharbour.exe
https://github.com/FiveTechSoft/mod_harbour/blob/master/cgi/windows/libcurl-x64.dll

Now copy a simple test.prg to the same folder:
https://github.com/FiveTechSoft/mod_harbour/blob/master/cgi/windows/test.prg

And run:
your_domain_name/cgi-bin/modharbour.exe?test.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Mon Sep 19, 2022 09:08 AM

Another great advantage of using CGI is that you no longer need to keep your PRGs outside modharbour.exe, so you can build modharbour.exe and placing your PRGs inside the EXE, so nobody can see or modify your sources :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Mon Sep 19, 2022 10:07 AM
Dear Antonio,
Thank you very much.

I think I have understood how it works with CGI.
Instead of Harbour being called from within APACHE, it calls modharbour.exe after the request from the browser and generates the HTML code that is passed to the APACHE server.
Is this correct?

I have made a sketch:



Do I have to uninstall modharbour?

Where do I have to enter the directory redirection?
If this redirect is set correctly, should the existing links work 1:1?



Best regards,
Otto

Translated with www.DeepL.com/Translator (free version)
Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Sun Sep 25, 2022 09:31 AM

Antonio
Saludos
Estoy interesado en migrar mis aplicaciones hacia la Web, he conversado con algunos colegas que tienen desarrollo en mod-harbour (NO CGI), prefiero irme por lo seguro,
Dispones de alg煤n servicio, herramientas que podr茅 adquirir o contratar, inici谩ndome b谩sicamente:
1. Login
2. Men煤 de opciones.
3. Formulario para introducir datos
4. Browse estilo xBrowse para mostrar resultados
5. Fachada debe ser para apps

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Sun Sep 25, 2022 09:36 AM
Querido Juan,

Descarga este ejecutable:
https://github.com/FiveTechSoft/mod_harbour/blob/master/cgi/windows/modharbour.exe junto con esta DLL:
https://github.com/FiveTechSoft/mod_harbour/blob/master/cgi/windows/libcurl-x64.dll y c贸pialas a tu carpeta Apache/cgi-bin

Ahora puedes ejecutar cualquier PRG llamando a mod_harbour CGI de esta manera:
localhost/test.prg

ya que has de usar esta regla, a帽adi茅ndola al fichero httpd.conf situado en Apache/conf
<Directory C:/xampp/htdocs>
RewriteEngine on
RewriteRule ^([a-zA-Z]*)$ /cgi-bin/modharbour.exe?prg=$1 [NC,QSA]
</Directory>


Con estos simples pasos tienes toda la potencia de Harbour, y la gran funcionalidad de mod_harbour para construir web apps robustas como rocas capaces de atender a 500, 800, 1000 usuarios, etc sin pesta帽ear :-) Probado y estando siendo usado a diario
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Sun Sep 25, 2022 09:50 AM

Antonio
Gracias,
Estar茅 realizando pruebas, necesito adquirir componentes: Formularios, Controles ya desarrollados, para migrar parcialmente mi aplicaci贸n o satisfacer necesidades de movilidad como carga de pedidos.

Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM
Re: AYUDA Explicaci贸n. WebApp - ModHarbour
Posted: Sun Sep 25, 2022 10:14 AM

Antonio
Posibilidad de compilar el CGI?, en el caso de agregar nuevas funciones o nuevas clases?, algunos ejemplos de ejecuci贸n de m煤ltiples programas?