Chapter 8. Continuation Servers

I rarely run rapids on blind faith. If there’s any danger, I like to know exactly what the water and rocks could do to me, and I need a plan to deal with any potential trouble. On this day, though the consequences for failure were high, the move was easy. I still don’t know exactly how it worked, but I watched boater after boater thrust, brace, and arrive in the turbulent boil below The Elbow, a slotted 20-foot drop that guidebooks describe as a deadly entrapment motel. Sure, I could tell you that the move was called a slot move, and I’d need to apply my brace with perfect timing and angle to avoid hitting the wall on the way down. I knew the timing, because I’d been told. It’s just the “why” of it that was a mystery. The experts tried to tell me why it worked. Most really didn’t know. No one could really tell me with any kind of certainty how the rocks were configured at the bottom. They just knew that at this river level, the move worked. And so it did.

At different points in my programming life, a few tricks held the same kind of mystery for me: recursion as a college student, my first glimpse at reflection shortly thereafter, and now, continuation servers . In this chapter, you’ll see continuations, and how they’re used in a new class of application servers.

The Problem

Web development, for all its usefulness, often happens with a curious inelegance. It’s kind of like making sausage. I like the result, but I don’t want to see how it’s made. Web programming ...

Get Beyond Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.