[plt-scheme] Limiting Concurrent Connections to Web Server

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Fri Jan 16 10:17:07 EST 2009

On Fri, Jan 16, 2009 at 8:02 AM, Henk Boom <lunarc.lists at gmail.com> wrote:
> 2009/1/16 Robby Findler <robby at eecs.northwestern.edu>:
>> Perhaps I misunderstood, but I think Henk was looking for a different
>> behavior, ie when there are too many connections in session that the
>> webserver would just close and forget about the other connections.

I'm not sure how to do this... with semaphores I could use
semaphore-try-wait?, but I don't know how to recreate that with the
manager.

> It's not that I want to drop all connections after the first 5, it's
> just that if the connection is cancelled by the other party after it
> queues up, there's no point in letting it start.

One implication of the release rules I wrote earlier, is that a
problem with the connection won't be noticed until it is written to,
which is /after/ the work has been done. I'm not sure how (or if I'd
want to) have another thread monitoring the connection port to see if
it is active, it doesn't look like there is anything in scheme/tcp
that does that.

Jay

-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.