SBT plugins, Freestyle & Chaos tests
We'd like to invite you to the first meetup of the year. We will give 3 talks which we gave during last month's Scala eXchange. Each of them is for different level of audience, so everybody will find something to learn about. There will be beer, snacks and opportunity to ask hard questions.
- Talk #1: Sbt plugins 101 - How to create your own plugin
Krzysztof Otrębski, Lightning talk (18:40-19:05)
Sbt offers a lot of functionality out of the box. A bigger advantage is the ease of creating custom tasks and plugins. Sbt has a high entry threshold but extending builds is easy.
During this short session I want to show how you can start creating custom tasks and end up with publishing community plugins. This will be based on my personal experience with creating the plugin sbt-flaky.
- Talk #2: Freestyle, Free & Tagless: Separation of Concerns on Steroids
Michał Płachta (19:10-19:55)
You will learn how to cut your applications into isolated, independent pieces using Freestyle library with free monads or tagless final style. The session is based on a multiplayer, purely functional version of Prisoner’s Dillema.
Our applications frequently consist of business logic, communication, persistence, caches & logging. We always want to keep them apart and reason about each of them individually. However, this is very difficult to achieve in practice.
Enter free monad. It lets us decouple those concerns by dividing our program into algebras and interpreters. I will show you an application built on top of free monad in Scala & Cats. You will learn how to create pure & declarative DSLs, side-effecting interpreters and how to use them together. Then I will introduce Freestyle library and show how it makes the code more concise. At the end I will compare the free monad approach to another technique used to decouple concerns: tagless final.
- Talk #3: Control the Chaos
Piotr Śliwa, Lightning talk (20:00-20:20)
Akka doesn't guarantee message delivery, especially for remoting or persistent actors.
During this talk, you will learn how a very simple idea of how to test with minimal effort if your Akka application is resilient in case of persistence failures. Chaos testing is very broad and complex topic. If you would like to test your application against one specific point of failure, it may be too expensive to use standard chaos testing techniques. In case of persistence failures you will discover how to use "ChaosJournal" - journal that randomly fails.
You will explore a simple case study, practical advices, ideas and pitfalls. The talk will be about testing, not how to prevent loosing messages itself. Similar techniques may be used for testing against eg. remoting failures.