I'm just far enough into Robert Love's "Linux System Programming" that I think the solution to FastCGI may be much simpler than I'd previously thought.

I think we need a new command that launches a specified process but in a way that uses a call to "fork" to pass file descriptors (which include sockets and other I/O info) to the child process.

In many ways it would work very similarly to the existing "open process", but allow params to give the child process access to things like socket connections, pipes, files, etc. the parent process has access to at the time the child process is launched.

It would seem least intrusive on the code base to implement it as a new command, perhaps called "fork".

That said, I have to admit the risk of Dunning-Kruger effect here: I'm not that far into the book, and my knowledge in this area is far below my aspirations.

But for those of you more familiar with Linux system programming, do I misunderstand the difficulty involved?

Forking seems so common in other tools, and not having it appears to be the one detail standing between where we are now and having not just FastCGI, but also being able to build truly excellent application servers on par with Node.js and other similar systems.

LiveCode is a great language, and if we had the ability to fork we should be able to build a wide range of powerful, scalable, efficient systems, breaking far beyond the limitations of CGI we're limited to now.

If all we need is a new command to wrap the Linux "fork" call, after I finish Love's book I may brush up on my C skills and give it a go.

But who wants to wait for that. Is there anyone in our community who could do this now?

Do I misunderstand what's needed here?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to