On Thursday 06 May 2004 03:51 am, Davide Libenzi wrote:
> On Wed, 5 May 2004, Beau E. Cox wrote:
> > > There's a better solution that does not involve tweaking the XMail
> > > source code. You have one (or more) pre-loaded Perl interpreters
> > > running as servers bound on certain TCP ports, and you have a very
> > > small binary (cperl, written in C using sockets) that talks a trivial
> > > protocol with the Perl interpreters. You "external" command call will
> > > change from:
> > >
> > > "perl /home/davide/myscript.pl"
> > >
> > > to:
> > >
> > > "cperl -s localhost -p 17171 /home/davide/myscript.pl"
> > >
> > > If the script is not already loaded in the interpreter, it will be at
> > > client connection time. Do I have to proceed? :-)
> >
> > Yes, Davide, I understand that approach.
> >
> > But even with that approach, the new process overhead ('fork') remains,
> > which my code completely eliminates.
>
> Man, you cannot BS me with fork() costs ;) Just for example, and your
> eyes:
>
> http://www-106.ibm.com/developerworks/linux/library/l-rt7/?Open&t=grl,l=252
>,p=mgth
>
> The process create speed is the cost of a fork/exec on a PIII 500MHz, and
> it's 3ms. And it's compared to the cost of an interpreted Perl script, that
> is most likely going to do a non-trivial task in decoding a message, and
> maybe running other tools. You want a plugin interface for XMail? You've
> got it. The above one, once the trivial protocol is established, can talk
> to Perl servers, Python servers, Ruby servers, Tcl/Tk servers, Java
> servers, C# server, (put your list of favourite script languages here).
> The above solution, does not touch the XMail code, allows plugging any
> script server you like, scale better because you can round robin on many
> script-servers if you like, and does not force Perl requirements on XMail.

Davide -

I'm really not trying to BS anyone. OK, I'll make a new filter:
'mod_xmail', that tcp's to a server 'mod_xmaild' which will
implement my perl embedding. To use mod_xmail, simply change the
filter's .tab from:

"/where/ever/my_filter.pl"[TAB]"@@WHATEVER"[TAB]...

to:

"/where/ever/mod_email"[TAB]"/where/ever/my_filter.pl"[TAB]"@@WHATEVER"[TAB]...

I will get back to everyone soon with timings.

Aloha => Beau;

-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to