A Series of Twisty Little Threads

Java Case Study, Episode 5

By Robert C. Martin & Micah D. Martin

84 minDec 2014

Working on the web server leads to periods of befuddlement followed by periods of productivity.

This episode might be a little painful to watch as Micah and I stumble around trying to make this multi-threaded web-server code work. You'll watch us miss obvious things that you see right away. You might even be moved to leap up from your seat and shout at the screen.

Still, in the end, we solve the threading problems and make a lot of progress on our little web server. After three tomatoes, we can see our way clear to the end.

Working on multi-threaded code is always a challenge. TDD helps a lot with correctness; but imposes it's own complications too. If you've always wondered how to do TDD in a multithreaded environment, you can watch us do it here.