Subject: [clisp-list] TCP-based Network Server in CLISP

From: [email-masked] (Don Cohen)
Date: Fri Sep 27 14:07:06 2002

> > By using a read-byte-no-hang I can read data
 > >until the entire request has been read
 > Using READ-CHAR-NO-HANG for i/o instead of sequence/array functions is 
 > going to keep your program a _toy prototype_ with extremely poor 

I think this conclusion is unjustified.  What do you consider to be
extremely poor performance?  Do you have any useful data?

- How much slower is it to read one char at a time?
I expect you can get a large factor if you only compare something like
cpu usage for a single read that returns, say, 1K bytes to 1K tests
and reads on single bytes.  However I don't think that reflects the
true cost of most services.

- In some cases this cpu overhead is not the bottleneck, such as when
you have limited network bandwidth, as most of us do.  How fast a cpu
do you need to read/write at what speeds from clisp one byte at a time?

- There are also cases where the IO cost is not the bottleneck.  That
is, high speed communication is not really needed or even intended.
In this case you can even prevent a bandwidth attack from denying
service to others by simply sharing your effort among the users.

 > performance. Stated otherwise: if it works not too badly for you, thank 
 > the OS (scheduler, dispatcher, TCP stack implementations, system load 
 > etc.), not your application.

The OS is the environment in which your server lives.  It's perfectly
reasonable for your server to be adapted to its environment.  If your
server works well in that environment I think it deserves credit for
that regardless of how it might fare in some other environment.