modperl_web_spell_check_problem

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



To: <modperl@apache.org>
From: "Vladislav Safronov" <vlads@comptek.ru>
Subject: Advice needed. (web app. performance)
Date: Mon, 29 Jan 2001 17:52:42 +0300

Hi,

I've just finished a simple web based spellcheck application
based on ispell, it's written as perl module which just call
ispell on every request (actually keeps it open afert first request).
The bad thing is N users used spellcheck there are N running
useless ispells and it is not good I think. 

I think as sort of spellcheck server should be written which can fork
accordingly to user requests. 

Where can I find sample code (skeleton code) for such server?
Would you recommend any other method?

===

To: <vlads@comptek.ru>
From: Robin Berjon <robin@knowscape.com>
Subject: Re: Advice needed. (web app. performance)
Date: Mon, 29 Jan 2001 16:02:58 +0100

At 17:52 29/01/2001 +0300, Vladislav Safronov wrote:
>I've just finished a simple web based spellcheck application
>based on ispell, it's written as perl module which just call
>ispell on every request (actually keeps it open afert first request).
>The bad thing is N users used spellcheck there are N running
>useless ispells and it is not good I think. 
>
>I think as sort of spellcheck server should be written which can fork
>accordingly to user requests. 

Why not simply rewrite ispell in Perl and make your module do that instead
of needing an external server ? I think it has been at least partially done
(well, there's at least spell). See http://doriath.perl.com/ppt/what.html

===

To: Vladislav Safronov <vlads@comptek.ru>
From: Matt Sergeant <matt@sergeant.org>
Subject: Re: Advice needed. (web app. performance)
Date: Mon, 29 Jan 2001 15:06:02 +0000 (GMT)

On Mon, 29 Jan 2001, Vladislav Safronov wrote:

> Hi,
>
> I've just finished a simple web based spellcheck application
> based on ispell, it's written as perl module which just call
> ispell on every request (actually keeps it open afert first request).
> The bad thing is N users used spellcheck there are N running
> useless ispells and it is not good I think.
>
> I think as sort of spellcheck server should be written which can fork
> accordingly to user requests.
>
> Where can I find sample code (skeleton code) for such server?
> Would you recommend any other method?

You want to write an XS interface to the aspell API. That would be far
lighter. I thought about doing this a while back, but decided we didn't
need it for our current project.

===

To: Vladislav Safronov <vlads@comptek.ru>
From: Stas Bekman <stas@stason.org>
Subject: Re: Advice needed. (web app. performance)
Date: Mon, 29 Jan 2001 16:06:35 +0100 (CET)

On Mon, 29 Jan 2001, Vladislav Safronov wrote:

> Hi,
> 
> I've just finished a simple web based spellcheck application
> based on ispell, it's written as perl module which just call
> ispell on every request (actually keeps it open afert first request).
> The bad thing is N users used spellcheck there are N running
> useless ispells and it is not good I think. 


Have you checked CPAN?

http://search.cpan.org/search?dist=Lingua-Ispell

===

To: "Stas Bekman" <stas@stason.org>
From: "Ken Williams" <ken@forum.swarthmore.edu>
Subject: Re: Advice needed. (web app. performance)
Date: Mon, 29 Jan 2001 09:13:04 -0600

stas@stason.org (Stas Bekman) wrote:
>On Mon, 29 Jan 2001, Vladislav Safronov wrote:
>> I've just finished a simple web based spellcheck application
>> based on ispell, it's written as perl module which just call
>> ispell on every request (actually keeps it open afert first request).
>> The bad thing is N users used spellcheck there are N running
>> useless ispells and it is not good I think. 
>
>
>Have you checked CPAN?
>
>http://search.cpan.org/search?dist=Lingua-Ispell

It looks like that simply calls out to the ispell program.


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  ken@forum.swarthmore.edu                            The Math Forum


===

To: Vladislav Safronov <vlads@comptek.ru>
From: "Ken Y. Clark" <kclark@logsoft.com>
Subject: Re: Advice needed. (web app. performance)
Date: Mon, 29 Jan 2001 10:12:02 -0500 (EST)

On Mon, 29 Jan 2001, Vladislav Safronov wrote:

> Date: Mon, 29 Jan 2001 17:52:42 +0300
> From: Vladislav Safronov <vlads@comptek.ru>
> To: modperl@apache.org
> Subject: Advice needed. (web app. performance)
> 
> Hi,
> 
> I've just finished a simple web based spellcheck application
> based on ispell, it's written as perl module which just call
> ispell on every request (actually keeps it open afert first request).
> The bad thing is N users used spellcheck there are N running
> useless ispells and it is not good I think. 
> 
> I think as sort of spellcheck server should be written which can fork
> accordingly to user requests. 
> 
> Where can I find sample code (skeleton code) for such server?
> Would you recommend any other method?
> 
> Thanx,
> 
> \Vlad.

How funny.  I just spent the last several days working on the exact
same code.  I used Lingua::Ispell to communicate with ispell.  It's
pretty good, but I think it could be written much more cleanly.  (I
know, I know patches are always welcome :)  I spent a long time last
week closely examing the source for Lingua::Ispell because I
encountered what turned out to be a bug in mod_perl versions 1.23 and
higher built with Perl 5.6.0 where the STDIN and STDOUT get very, very
confused.  You could always take a look at that code to get a feel for
where to start.  I began hacking on my own implementation, playing
with IPC::Open2 and IO::* modules.  Very interesting stuff.  Anyway,
that's what I'd recommend.

BTW, any chance I could take a look at how you solved the problems?
I'm still working on my version.

===

To: "'Ken Y. Clark'" <kclark@logsoft.com>
From: "Vladislav Safronov" <vlads@comptek.ru>
Subject: RE: Advice needed. (web app. performance)
Date: Mon, 29 Jan 2001 19:11:11 +0300

I swear, I searched CPAN before posting the question to the conference and I
used Lingua::Ispell
in my application. But Lingua::Ispell just opens 'ispell -a' on reading and
writing for every new httpd process, so it take time to open dictionaries or
switch to other language dictionary.
It provide nice interface .. but I thought that stand-alone "spell" server
would provide better performance and
used less memory.

===

To: Vladislav Safronov <vlads@comptek.ru>
From: John BEPPU <beppu@lineo.com>
Subject: Re: Advice needed. (web app. performance)
Date: Mon, 29 Jan 2001 13:34:03 -0700

[  date  ] 2001/01/29 | Monday | 05:52 PM
[ author ] Vladislav Safronov <vlads@comptek.ru> 

> Where can I find sample code (skeleton code) for such server?
> Would you recommend any other method?

I wrote a little server that wraps around mpg123.  Maybe
the structure of this module will help you out.

    http://opensource.lineo.com/cgi-bin/cvsweb/pm/MP3/Daemon/

Check out Daemon.pm and bin/mp3 .
 
===

To: modperl@apache.org
From: Robert Landrum <rlandrum@capitoladvantage.com>
Subject: Re: Advice needed. (web app. performance)
Date: Mon, 29 Jan 2001 15:57:59 -0500

Wasn't ispell ported to the PPT?  If so, you could rip the source 
from the perl power tools library and eliminate the external call to 
ispell completely.  This doesn't povide any forking or server stuff, 
but I've found that solutions like that are rarely needed.

At 1:34 PM -0700 1/29/01, John BEPPU wrote:
>[  date  ] 2001/01/29 | Monday | 05:52 PM
>[ author ] Vladislav Safronov <vlads@comptek.ru>
>
>> Where can I find sample code (skeleton code) for such server?
>> Would you recommend any other method?
>
>I wrote a little server that wraps around mpg123.  Maybe
>the structure of this module will help you out.
>
>    http://opensource.lineo.com/cgi-bin/cvsweb/pm/MP3/Daemon/
>
>Check out Daemon.pm and bin/mp3 .
>
>> Thanx,
>> \Vlad.


===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu