Re: Advice needed. (web app. performance)
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 -- robin b. "Chance is irrelevant. We will succeed." -- 7o9
Re: Advice needed. (web app. performance)
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. -- /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: Advice needed. (web app. performance)
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 > 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. > _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Advice needed. (web app. performance)
On Mon, 29 Jan 2001, Vladislav Safronov wrote: > Date: Mon, 29 Jan 2001 17:52:42 +0300 > From: Vladislav Safronov <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > 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. ky
Re: Advice needed. (web app. performance)
[EMAIL PROTECTED] (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 [EMAIL PROTECTED]The Math Forum
RE: Advice needed. (web app. performance)
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. \ vlad.
Re: Advice needed. (web app. performance)
[ date ] 2001/01/29 | Monday | 05:52 PM [ author ] Vladislav Safronov <[EMAIL PROTECTED]> > 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.
Re: Advice needed. (web app. performance)
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 <[EMAIL PROTECTED]> > >> 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.
RE: Advice needed. (web app. performance)
What about this idea: open N 'ispell -a' processes for writing and reading at httpd start up, save their descriptors into an array in some Perl module and then mark decriptors in the table then as "busy" or "idle". But the question is how to share this dynamicly modified table among all httpd processes? .. / vlad
RE: Advice needed. (web app. performance)
On Tue, 30 Jan 2001, Vladislav Safronov wrote: Try Unix sockets > What about this idea: > > open N 'ispell -a' processes for writing and reading at httpd start up, > save their descriptors into an array in some Perl module and then > mark decriptors in the table then as "busy" or "idle". But the question > is how to share this dynamicly modified table among all httpd processes? .. > > / vlad > > > Vasily Petrushin +7 (095) 2508363 http://www.interfax.ru mailto:[EMAIL PROTECTED]