Asynchronous and non-Blocking network frameworks have become a big deal: tools like node.js and BlueEyes have set the pattern for new projects. Yet they use an approach to their networking and architecture that is foreign to even many seasoned developers: callbacks instead of pure function calls can be daunting at first glance, yet powerful.
As many Scala developers don't understand these approaches , we'll introduce Async/Non-Blocking IO and demonstrate both Netty & Raw NIO – and discuss strengths and weaknesses of each. Understanding the hows and why's of these approaches versus the more traditional synchronous can make a big difference for developers looking to choose the right approach for a new product.
We'll also discuss patterns and concepts which can make these frameworks more powerful: The use of callbacks, Either[E, T] to pass errors, implicit tricks to simplify them and even the Iteratee pattern. Finally, we'll explore several ways to build synchronous looking APIs on top of these tools using varying approaches such as Continuations, Coroutines and even Actor based facades with Akka.