2011-04-30

Let's Code Dimdwarf #50: Decoding Session Messages

The end-to-end tests proved to be useful in catching a mistake in understanding the requirements which caused the unit tests to specify the wrong kind of encoding for session messages.

Download as MP4

Episode Archive

2011-04-28

Let's Code Dimdwarf #49: Session Messages Roadmap

Here starts the work on implementing the sending and receiving of session messages between the client and server. Implementing that will drive the design of the overall architecture quite far, because it will among other things require executing application code in worker threads and committing transactions. As usual, we start with a failing end-to-end test.

Download as MP4

Episode Archive

2011-04-10

Let's Code Dimdwarf #47: Manual DI vs. Guice

The spike for manual dependency injection configuration is nearing its end and it's a good time to compare it with the original Guice-specific code which was needed to do the same thing. The infrastructure code is 50 lines of Scala for manual DI, vs. over 120 lines of Java code for Guice-based DI (which also includes lots of complex reflection). There is slightly more configuration code with manual DI, but it's also more explicit and it's easier to find out what is happening.

After this episode I did still some more refactoring off-camera, in order to reduce the duplication/boilerplate. Specifically, I created an abstract base class for the modules and passed the ServerBuilder instance to them as a hidden parameter (via a ThreadLocal), in addition to which I resolved the contention between ControllerHub and regular actors. The final code is here.

Download as MP4

Episode Archive