in reply to Re: Re: Re: Externally managed threads using embedded Perl
in thread Externally managed threads using embedded Perl

I'll second the suggestion to drop C/C++ here unless you have a compelling reason.

You may also want to drop the entire service wrapper, unless you specifically need this program to be controlled like a Windows service. If you just need it to start when the machine does, and you're using Windows 2000 or later, you can just make it a scheduled task that runs "on system startup". The program you launch at that point can use pthreads, pseudo-fork, or whatever else you'd like. Depending on load, it might be interesting to look at the inetd available in Cygwin also.

--
Spring: Forces, Coiled Again!
  • Comment on Re: Re: Re: Re: Externally managed threads using embedded Perl

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Externally managed threads using embedded Perl
by Anonymous Monk on Jan 09, 2004 at 06:49 UTC

    Your suggestion is noted. I'm afraid my Perl skills aren't up to the task. Perhaps if one of the Perl Monks wanted to do something wonderful for the anti-SPAM community (or at least the anti-SPAM Windows community looking at, or already using, SpamAssassin) you might like to head over to SpamAssassin.org and make spamd run under Windows as well as the platforms it currently works with.

    I think for this stuff to be accepted by the general Windows community it needs to be a service. That also gives it some visibility and increased manageability. I know about the scheduled task thing but in this instance, when we're talking about a (ideally) 24x7 operation, you need a bit more infrastructure to help manage the process.

    wrt cygwin, this is the current solution for running spamd (SpamAssassin daemon) on Windows. Even my current experimentation is showing that the memory consumption will be way down doing it my way without cygwin, even if I can't clone interpreters. I think I read somewhere around here that Perl under cygwin is about half the speed of native Win32 Perl.

    Finally, I also think that a native Windows Service, obviously designed for Windows, will have more credibility (maybe the wrong word) than, "Oh, just install this cygwin emulation environment and do this and that and it'll just work after a day or so of mucking around". This is the current proposition and although some people have done it I think there are a lot more who won't. I'm one of those - I'd rather run a dedicated Linux box than try to emulate Linux on Windows (and that's exactly what we're doing at the moment).

    Feel free to tell me I'm wrong ;-P (I probably am).

    Phil

Re: Re: Re: Re: Re: Externally managed threads using embedded Perl
by BrowserUk (Patriarch) on Jan 09, 2004 at 05:10 UTC