"fork" command?

Monte Goulding monte at appisle.net
Thu Jan 7 21:12:58 EST 2016

> On 8 Jan 2016, at 12:42 pm, Richard Gaskin <ambassador at fourthworld.com> wrote:
> Monte Goulding wrote:
> >> My understanding is that spawn-fcgi uses fork, no?
> >
> > Yes. Are you looking to implement your own process manager though?
> What constitutes "process manager" in this context?

Something that spawns processes that handle requests.
> >> Once we have forking we could completely replace Apache (or NGineX
> >> or Node.js) with a fully-functioning server for specific
> >> applications where the efficiencies of a purpose-built system would
> >> be helpful.
> >
> > Ah, ok so you wan’t MCHTTPd with child processes and maybe FastCGI
> > but maybe just some custom protocol between them?
> Ideally, both: FastCGI for use under Apache for building Web sites, and a forkable variant of MCHTTPd for building custom application servers.

OK, well these are two quite distinct requests although you could probably implement the FastCGI protocol in script and then use your proposed fork command if you wanted to load balance over child processes. I was thinking more along the lines of using libfcgi directly in the engine. It’s worth noting that FastCGI doesn’t require fork (http://www.fastcgi.com/drupal/node/6?q=node/22#S3 <http://www.fastcgi.com/drupal/node/6?q=node/22#S3>) so if you are keen to implement FastCGI in script you could try doing that now. If fork is implemented then it should be easy to add to your implementation.
> >> But even when running under Apache with FastCGI, fork would seem
> >> a very useful thing.  It's how PHP and other engines are able to
> >> scale, and indeed not having it prevents LC from being used in
> >> traffic-heavy scenarios.
> >
> > I’m not saying it’s not useful, just suggesting letting something
> > else do the forking might be a good idea.
> I'm not particular how it's done; I'm just looking for options to make scalable services with LC.  What would that "something else" be?

I thought I’d covered that. spawn-fcgi, mod_fcgid or some equivalent.



More information about the Use-livecode mailing list