
Scheme in Commercial Web Application Development [PDF] - dt
http://www.untyped.com/downloads/icfp068-welsh.pdf
======
ralph
Interesting to see they had the same problems in using continuations that bit
pg with news.yc; you garbage collect them too early and the links in someone's
browser stops working, too late and your server exhausts memory. Plus, it's
trivial to do a DoS; just act like a newly arrived visitor to the site so a
new continuation get created for you. See sections 4 and 5 in the PDF.

I can't see a good way around this as long as the server keeps the
continuations instead of offloading it to the client.

~~~
Tichy
I don't fully understand the use of continuations in web applications yet,
what are they being used for? Are they an alternative to using transaction
id's (avoiding the duplicate submission of forms)? I am not sure, but maybe
making everthing more RESTful could help? Or maybe not...

~~~
troels
REST is a broad term, which covers different ideas. One of these is that the
statelessness of HTTP is an inherent aspect of web applications. Instead of
trying to build abstractions, to hide this fact, (some) REST-proponents, will
say that the only proper way to write web applications, is to avoid server
side state, and instead rely on client side state. Continuations are in direct
conflict with this principle.

Continuations captures state in a way very similar to closures. I think this
is why the lisp/scheme crowd are so found of them. In contrast, the client-
side-state-way appears procedural. I strongly believe that client side state
is the _only_ worthwhile solution; We need to accept that fact and get rid of
continuations.

~~~
brlewis
I'm part of the Lisp/Scheme crowd. I don't use continuations in my web
development, but I think you're stating things too strongly to say they should
never be used. I think it's easy to see the convenience of them, and rapid
prototyping is important. When scalability becomes a big issue people will
come up with a good way of serializing continuations.

~~~
troels
You're right that most existing web application frameworks (targeted at lisp
or otherwise), use some sort of server side state mechanism. But that is not
to say, that a rapid prototyping framework couldn't be made, which used solely
client side state.

Anyway, I am of course putting it a bit on the extreme end here, but in
principle I stand by it. Continuations are but an elegant hack; I might prefer
it over other similar hacks, but I'd rather not have to use it at all.

------
Tichy
I wish I could upvote you with 100 points ;-)

