Hi there,

*While I was writting... I ended up in a catharsis of several subjects... 
sorry for that... but I will leave the email go as is.

        My only experience with perl threads has been now, with the latest 
ActivePerl in Windows.
        I had it working for several days, as a simple SMTP server without 
trouble (nothing really related to ASSP).
        I made an threaded SMTP proxy, and then I added SPF, RBL, Delaying, 
Email validation... and it did work without trouble.
        I had no exceptions... so it seems to be quite stable at least in 
that enviroment.
        On advantage of the thread is that if something fails in the thread, 
just the thread dies, and you don't end up with a server down.
        Another advantage is that implementation is a lot cleaner than 
having tons of sockets in the same select and all what it implies.

        The bad thing about it seems to be memory... it grows a lot (anyway 
I haven't optimized some stuff, so it might be better than what it seems)
        And I am still trying to figure out what is better in terms of CPU 
processing.

        The only thing that from time to time fails in what I am testing, 
and it also fails in ASSP (all the versions I tested),  is the Socket 
Select...
        Sometimes it just sits there... waiting endlessly... and 
misteriously it only comes back to life when you type an enter in the 
console.. odd, right?
        I think it is a perl issue.

        I haven't discussed that in this forum yet, because it takes a lot 
of time to reproduce it... and I hadn't debug enabled at those moments.. but 
I am sure it is the select.

        My latest thoughts about a threaded ASSP, is that it wouldn't have 
better performance... and it wouldn't really contribute to stability because 
it is already as stable as it can currently be. So.. why to bother?

        And, as for ASSP performance, perhaps using less REs in several 
inner places, and using instead more economical functions... like index and 
substr, would help to get it a little better. Even with bayesian filters 
turned off, currently, it easily grows to 100% CPU.

        Another thing that I thought, was... that ASSP checks SPF AFTER 
getting the headers... why not checking it asap, and blocking at the DATA 
command? in that way, the SPF failures would avoid wasting BW and CPU. 
Actually, letting the DATA pass and getting the email, can be used to 
contribute to the spam dir... but shouldn't that be an option for the user? 
Checking SPF before the DATA or after it?

        Another one.. might be the tied hashes... perhaps they could have a 
better performance? perhaps a 100% memory hash and dumping it to file from 
time to time? just a thought.

        Regards!
Javier Albinarrate



----- Original Message ----- 
From: "Stas Bekman" <[EMAIL PROTECTED]>
To: "Questions and Answers for users of ASSP Anti-Spam SMTP Proxy" 
<[email protected]>
Sent: Tuesday, July 04, 2006 7:42 PM
Subject: Re: [Assp-user] Multi threading ASSP


> Przemek Czerkas wrote:
>>>     Has anybody analyzed the possibility of rewrtitting ASSP as as multi
>>>threaded proxy instead of using the socket select alone?
>>>     Do you think this may have any technical benefit per se? (Without 
>>> the
>>>consideration of all the work that this would mean of course)
>>>
>>>     I am asking this because I started playing with the concept, and
>>>getting up a simple (dumb) multithreaded SMTP proxy was fairly simple. Of
>>>course, all the features are the difficult thing to achieve.... but as a
>>>proof of concept it did work really easily.
>>>
>>>    Any opinions about it?
>>
>>
>>
>> I've added simple cooperative multitasking kernel based on 
>> semi-coroutines
>> emulated in pure Perl - the implementation is rather ugly, but theres no 
>> need
>> to use synchronization objects like semafores, mutexes etc and it was
>> straighforward (put cede() subroutine here and there :-)
>>
>> AFAIK Perl's threads are stable from 5.8.0 upwards, but I have no 
>> experience
>> with them. One may also consider use of POE framework.
>
> perl threads *API* is stable in 5.8.0. perl *threads* are not stable.
> Things are a bit better in the latest 5.9.x but expect segfaults
> everywhere. I've spent multiple hours trying to get mod_perl + threaded
> mpm work, but it's still far from being anywhere usable.
>



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Assp-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-user

Reply via email to