[plt-scheme] production use of PLT servlets

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon Mar 9 13:16:35 EDT 2009

In my experimentation, the only source of problems with the PLT Web
Server is the memory used by storing the continuation. The time and
network utilization are on par with other Web app servers.

The timeout manager is pathetic for real applications.

The LRU manager can guarantee an upper bound of memory usage. On a
reasonable machine (about 1GB), your user's timeouts will be about the
same as using, say, Tomcat.

The other issue with the stored continuation managers is that it
complicates distribution because you'll need to make each Web server
session 'sticky' to the server it started on. There's no way (now) to
have two different servers cooperate when generating session
identifiers, so to do that would require a bit of development, but I
don't think it would be do big of a deal. I'd be interested in doing
this, so if you want to supply the testbed, I'll do the code.

On the other hand, the serializable continuations are great for what
you're talking about. In my experience, most serializable
continuations are about 100 bytes, making them fit in the user's URLs.
If they get bigger, you can store them on the disk. In my experiments,
I've supported many hundreds of users with about 15 MBs of disk
storage. That's small enough to be easily synchronized with other
servers, so distribution is pretty easy.

The serializable language is very compatible with the rest of PLT, but
not perfectly. The biggest problem is that you can't capture
continuations inside of parameterize... which many parts of PLT (such
as exception handlers) rely on. The other annoyance is that you have
to provide your own version of higher order functions (like map) that
you want to capture continuations inside of.

Jay


On Sun, Mar 8, 2009 at 4:40 AM, Neil Van Dyke <neil at neilvandyke.org> wrote:
> I'm interested in hearing about people's experiences using the PLT Web
> servlets with stored continuations.
>
> My motivation is that, now that I'm looking for new consulting/employment, I
> want to be able to recommend PLT Scheme for the new work, as appropriate.
>  For Web sites, I have experience developing production servers using PLT
> Scheme Apache CGI but not using PLT servlets.
>
> I suspect that, if a PLT process can handle, say, 1000 simultaneous sessions
> with rock-solid reliably, and with reasonable CPU/memory requirements, then
> it can scale by a combination of distributing sessions across servers and
> gracefully expiring PLT processes (to clean up any memory leaks).
>
> Noel Welsh has already given me some information about Untyped's successes
> with servlets.  I'd appreciate any other experiences people have.
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



-- 
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.