Subject: Another Web-Design Anecdote

From: Shlomi Fish <[email-masked]>
Date: Tue, 12 Feb 2002 17:04:05 +0200 (IST)

When I worked in Smart-Link (http://www.smlink.com/) I was a half-time
tester and half-time Jack-of-all-trades programmer. One of the tasks that
I was given to do was to write a form which programmers will fill whenver
they commited a change to the Visual Source Safe[1] source tree, so it
will send a notification E-mail to our Q&A engineer.

I said that it would be quite easy to do in HTML, and eventually got a
green light to continue with it. Now, I wanted to do it in Perl. However,
our Sys Admin returned from a Microsoft course full of "ideals". He said,
Perl CGI was slow, and would cause memory leaks. I told Perl in fact had
an ISAPI module, and that I could also write ASPs in Perl, so it was just
as good as normal ASPs. I also told him that I could not find an ASP
primitive to send an E-mail message[2].

He eventually agree and we set up Perl 5 and IIS' Perl support on the
server. We did not manage to set up ISAPI from some reason, but vanilla
Perl CGI worked nicely.

Apache 1.3.x alpha for Win32 came out at that time, and I decided to try
it out. However, I just could not write a perl script that would send an
E-mail message no matter what method I tried. All my scripts ran perfectly
from the command line, but failed on Apache.

After a lot of pondering and trial and error I discovered that DNS lookups
did not work, and even wrote a C program to demonstrate it. I sent a bug
reoprt on it to the Apache guys and they said that they will fix it in
their next Alpha release. But meanwhile the Sys Admin said he will just
give me a directory in which I can put CGI scripts for the IIS.

Afterwards, writing the form handler went pretty well, and I had little
trouble. I believe I had to modify it a bit once or twice afterwards. I
eventually contacted the Sys Admin and asked him if he wishes us to re-try
setting up the Perl ISAPI. He said, that I should not bother, and that
he'll just reboot the server once in a while to get rid of the memory
leaks. (or he could set up a Linux server... ;-))

Best regards,

	Shlomi Fish

[1] - They should have used CVS instead, yes.

[2] - Chen eventually told me that a COM object that does that exists, and
that it is called CDONTS or whatever.

----------------------------------------------------------------------
Shlomi Fish        [email-masked]
Home Page:         http://t2.technion.ac.il/~shlomif/
Home E-mail:       [email-masked]

"Let's suppose you have a table with 2^n cups..."
"Wait a second - is n a natural number?"

---

From: Tzafrir Cohen <[email-masked]>
Date: Tue, 12 Feb 2002 17:21:06 +0200 (IST)

On Tue, 12 Feb 2002, Shlomi Fish wrote:

> Perl CGI was slow, and would cause memory leaks.

I understand that CGI is slow. But why would CGI have memory leaks?

You run a separate processfor each request. Is the OS that buggy that it
has memory leaks, or is there anything I'm missing?

-- 
Tzafrir Cohen                        /"\
mailto:[email-masked]        \ /  ASCII Ribbon Campaign
Taub 229, 972-4-829-3942,             X   Against  HTML  Mail
http://www.technion.ac.il/~tzafrir   / \

---

From: Shlomi Fish <[email-masked]>
Date: Tue, 12 Feb 2002 20:29:44 +0200 (IST)

> has memory leaks, or is there anything I'm missing?

It is something that has to do with WinNT or IIS or IIS' handling of CGI
scripts, or the integration of them. Maybe it is fixed in recent versions
of the Windows/IIS combo. And it could also have been a rumour.

Regards,

	Shlomi Fish

> To unsubscribe from this group, send an email to:
> [email-masked]
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>