News for hackers. Stuff that matters.
Re:Why Are Continuations So Confusing, and What Do They Real... by henning on Friday March 14, 2008 @02:32AM (#136622)
does simulating state in http with continuations scale?
Re:Why Are Continuations So Confusing, and What Do They Real... by pg on Friday March 14, 2008 @08:18PM (#137268)
It would depend on how much you used them. In News.YC I try to avoid using even closures as much as I can. In the earliest versions I made practically every link on every page be a closure. The source is so simple that way. But keeping that many closures around (in case the user hits the back button a couple times then makes another choice) soon became unwieldy. You rapidly find you have a couple hundred thousand closures in memory. So now whenever I can conveniently get all the state I need into the arguments of a url, I do that.

You can see which links need to be closures by mousing over them. If the link looks like r?fnid=hashkey, it's a reference to a closure on the server. Usually it means there is something that has to be done after whatever the link does.

Though Arc has continuations, I haven't needed to use them anywhere in News yet (except for catch and throw, which is a degenerate case). Nothing has state that complicated.

Re:Why Are Continuations So Confusing, and What Do They Real... by mykdavies on Friday March 14, 2008 @06:04AM (#136687)
Yes, dabbledb.com runs on Seaside, a continuations-based web framework running on Squeak, and Avi Bryant has posted that they're very happy with their ability to support thousands of user sessions.