You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Neil Gunton <ne...@nilspace.com> on 2001/08/16 02:24:37 UTC

Re: Using Lingua::Ispell in Embperl

I thought you might be interested in a follow-up to this thread.

I ended up implementing a spellchecking daemon using Paul Kulchenko's
wonderful SOAP::Lite module (http://www.soaplite.com and CPAN). You can
take a look at a demo and download the client & server scripts from my
website:

   http://www.neilgunton.com/

I also wrote it up as an article which was published in the current
(September 2001) issue of Dr Dobb's Journal. The server has been up
constantly for a couple of months now, and it seems pretty stable...

It's a very simple script. Let me know if you find it useful...

-Neil

Neil Gunton wrote:
> 
> Angus Lees wrote:
> >
> > On Tue, Mar 13, 2001 at 09:42:48AM -0500, Neil Gunton wrote:
> > > But it doesn't seem to affect the main problem of the spawn
> > > failing. This is a real corker. I wonder what else is different when
> > > we are running under Apache/mod_perl?  I guess it could still be a
> > > stdin problem, you mentioned that the < /dev/null redirection is not
> > > exactly the same. I am stumped.
> >
> > try "strace -f -p <process id>" on the running apache/mod_perl process.
> 
> Thanks Gus. I think I have found the problem - it is a generic one for
> mod_perl scripts spawning other processes. You need to be really careful
> about it; there is a whole section on spawning in the mod_perl
> performance tuning doc, and a mention in the mod_perl traps doc. I
> contacted the author of Lingua::Ispell and he doesn't have any
> experience using mod_perl, though he did confirm someone else having the
> same kind of problem that I am having (but no resolution). Since he is
> apparently unaware of mod_perl spawning issues, I doubt that
> Lingua::Ispell is "mod_perl safe" as it stands.
> 
> At this point I am thinking about writing a separate daemon wrapper for
> Lingua::Ispell which I will communicate with from Embperl using sockets.
> This may be the best solution, given the apparent issues with spawning
> processes from mod_perl. If this works then I will pass the code back to
> the author of Lingua::Ispell, because I imagine that I am not the first
> person to want to do trivial spell checking from mod_perl/Embperl
> scripts... hopefully what I can end up with is a simple method call,
> passing in a string and getting back a list of bad words (or, perhaps,
> the same string with bad words marked up somehow, e.g. in HTML). And if
> I make the daemon pre-forking (i.e. able to efficiently handle multiple
> requests in parallel, like apache) then it could be quite useful in a
> web server environment. Plus, for busy websites you could put the
> spellcheck server on its own machine, load balance etc.
> 
> Thanks again
> 
> -Neil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org