[Israel.pm] Talk: A natural flow for web apps

Yuval Kogman lists at woobling.org
Thu Mar 25 10:58:52 PST 2004

On Thu, Mar 25, 2004 at 14:36:33 +0200, Ran Eilam wrote:

> Desktop UI frameworks I have seen, do this by having each window spin
> its own event loop, and blocking all events except those coming from the
> OK/Cancel window. If the event loop on the desktop is the accept loop on
> the web, then this is the equivalent to having our prompt() sub hijack
> the HTTP connection from the main web server (the event blocking
> behavior of modal dialogs), and run its own web server for the duration
> of one request.

During my discussion on the matter with Zohar we brought up two ideas.
One is a subset language of strict OO, with persistence frameworks for
everything. This sort of works around things like

	$time = time(); # not the same each time around

But it eventually gives you something more facist than java, which is
why we use Perl, and not Java to get our jobs done.

The other is expanding on the works of Coro and the likes, to use
something like context switching, with an intermediate dump and restore
from/to a file. Something in that direcion is the CORE::dump builtin,
and it's undump counterpart. What's interesting is the fact that
CORE::dump LABEL will have the undumped binary continue at that label,
not where the dump took place. (Btw, CORE:: is for the builtin namepace,
not because you're dumping the core).

Take it a bit further, like the modern file systems of today - a
journalling perl interpreter. Ouch. That's very nasty.

Now to your solution: How do you make the right perl process be the one
to accept the socket?  I thought that this was kind of impossible to do,
but i guess i'm wrong. And then: how do you handle URL's which aren't
yours? do you reimplement things like virtual hosting, and all that in
perl? Or does mod_perl let you use the code in Apache's core as a sort
of library?

Another idea, somewhat more simple than this, is to use have your
weserver be written in perl, and have it multiplex, or multihread, as
well as lack the distinction between CGI/Application code, and server

 ()  Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: Crackers, lick the furniture: neeyah!!!!!!!!!!!!!

More information about the Perl mailing list