[fpc-pascal] How to use FCGI in threaded mode?
silvioprog
silvioprog at gmail.com
Fri Jan 30 17:13:59 CET 2015
On Fri, Jan 30, 2015 at 11:01 AM, Michael Van Canneyt <
michael at freepascal.org> wrote:
>
> On Fri, 30 Jan 2015, Marco van de Voort wrote:
>
>> In our previous episode, Michael Van Canneyt said:
>>
>>> Am I wrong thinking, that using "proxy FCGI" projects are a lot easier to
>>>> manage, anyway, as here you can use normal debugging means (e.g.
>>>> Lazarus) ?
>>>>
>>>
>>> Not really.
>>>
>>
>> On windows they must be service programs, which are an
>>> absolute horror to debug.
>>>
>>
>> Stability wise it is best, but depending on technology this is not a hard
>> _must_. The ISAPI framework that I once used allowed the main application
>> to be both app and service, and for debugging purposes one used the
>> application form.
>>
>
> I know. My own proxy fastcgi apps worked like that.
>
> But if you are on a headless server, then a windows service is the only
> really viable way.
>
> You can start messing with run entries in the registry, but the problem
> remains the same: the app must be running when the webserver starts. Best
> way to achieve that is a service.
>
> The alternative is to let the webserver control the program instances.
> And except for debugging purposes, this is still the best approach IMHO.
But it is very easy to solve it. In my case, when I talk about debug an
application running, it isn't about debug the final executable itself, but
its implementation. If I start my EXE via Apache, it is impossible to debug
it. Using proxy, I can add another server in my HTTP server (nginx allows
to add more than one), something like "fcgi_pass <IP of my development
machine>/dev/myapp", so I open my browser and access the URL of the server
that is running publicly (probably on a machine in the clouds), and this
server will call the application running here on my PC. I know my local
application will be a replica of the one already published, taking the
time/commits from the GIT log.
--
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150130/e91a4384/attachment.html>
More information about the fpc-pascal
mailing list