--- Andrew Piskorski <[EMAIL PROTECTED]> wrote:

> > > > I would prefer to use C, since I don't
> currently know Tcl, and
> > > > I am developing for a fairly low end machine.
>
> Btw, how low end is this machine exactly?

PIII 800MHz 512MB RAM, 40GB IDE drive.

>  And what
> is your
> application doign?
>

The portion that's going on this type of machine will
be taking file uploads along with an authorization
ticket to deter unauthorized uploads.  It also serves
the files as static content.

Since the goal is to keep costs as low as possible, I
would like to make sure that I'm limited by the
bandwidth available to the machine, not the hardware.

In order to do that, I want to do as little disk I/O
as possible, and keep the CPU usage minimized, as
well.

Since the application on this end is super simple, and
requires C APIs such as mkstemps(3) and MD5(3) I would
find it easier to just write a small amount of C and
be sure that the machine isn't doing more work than it
needs to.

> > > IMNSHO that is an incredibly bad reason to use
> C, especially with
> > > AOLserver, and especially if you plan to write
> code using
> > > AOLserver on an ongoing basis.
> >
> > Is this because you have a bad impression of C, or
> because it
> > AOLserver doesn't work well with C?
>
> Neither.  Writing new C code for AOLserver works
> quite well, in large
> part because of all the existing nice C APIs.
> (Indeed, I'd hate to do
> multi-threaded C programming solely with the POSIX
> thread APIs.  What
> AOLserver gives you is built on POSIX threads
> underneath, but much
> nicer.)
>
> But there's a reason Jim D. and the other AOLserver
> guys integrated a
> high level, powerful, simple, and easy to learn
> scripting language
> very early on in AOLserver.  Tcl is there in
> AOLserver because it's
> makes development vastly more productive than coding
> in C alone.

Perhaps.  If I'm writing an application that will take
me two days to code and debug in C, and I know it's
efficient, I'm happy.

If I take the time to learn Tcl, then I have to take
it on faith that it'll be fast enough.  Over the last
25 years I've been professionally coding, I've seen
various interpreted languages touted for their speed,
such as Forth, Perl, Java, etc., but I always find the
speed claims to be inflated.  Knowing how interpeters
work, I know there's going to be a penalty to using an
interpreter.  There's the obvious fact that the
commands have to be interpreted, but it's also
typically true that strings are copied around quite a
bit, which can be avoided with careful C coding.  If
my uploaded file can be read into memory from the
socket, and then written to a file without needing any
excess copying, then that saves my CPU cycles and
caches.

> There are many good reasons to use C with AOLserver,
> but "I don't want
> to bother to learn any Tcl at all." is not one of
> them.
>

Quotation marks should mean you are quoting someone.
That statement is not what I said, or meant.  I am
willing to learn Tcl if there's a need, but I don't
perceive a need to do that at this point.

On another tangent, my web searching indicates that
it's possible to keep AOLserver from starting up a Tcl
interpreter for each thread, but the method was not
described.  If this were done, would the
multipart/form-data still be parsed?

Thanks,

Fred



__________________________________
Discover Yahoo!
Get on-the-go sports scores, stock quotes, news and more. Check it out!
http://discover.yahoo.com/mobile.html


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to