Skip to main content.
home | support | download

Back to List Archive

Re: Perl and Swish-e 2.0

From: Bill Moseley <moseley(at)>
Date: Thu Aug 03 2000 - 19:22:50 GMT
At 12:01 PM 08/03/00 -0700, Bill Moseley wrote:
>Anyway, it would be nice to build the interface as an object -- if for no
>other reason to be like all the other cool CPAN modules....  But it also
>might allow the perl interface to be standardized and not break when adding
>features to Swish3.0 ;)
>For example, it might be possible to build the interface so that if in the
>future someone builds a nice threaded swish server that changing over from
>the perl library version to the server version wouldn't break existing code.

And BTW -- maybe that same interface could be used to run the standard
forked version of swish.  This would help close up some security problems
when lazy^H^H^H^H busy people use system() to call swish instead of a more
secure fork/exec.

In other words, define one interface to swish as an object, and then let
the two (possibly three) ways of running swish inherit from that object.

 use Swish::E;    # this would do the fork/exec to swish
 use Swish::Lib;  # this would be when swish was embedded in the perl 
                  # application (the xs module)
 use Swish::Server; # and this would use the load balanced threaded backend 
                    # swish servers for processing the queries.

But since they all inherit from the same object, the actual code in the
program wouldn't need to change.  You know, it's the DBI approach.

Bill Moseley
Received on Thu Aug 3 15:26:24 2000