8 inspiring talks from Scala.io Conference 2018

Romain Lebran
Powerspace Engineering
5 min readNov 7, 2018

--

Our takeaways from one of the best Scala conferences in Europe

Opening keynote by Martin Odersky

Martin Odersky’s keynote was an update about the Scala 3 roadmap and the changes we can expect.

The common theme of the talk was how Scala 3 intend to simplify what currently exists. We saw a few comparisons between what dotty aims to provide and what Scala actually does.

More importantly, despite what we can read in numerous articles, Scala 3 does not choose between FP or OOP, it still aims to embrace the best from both worlds.

Better, faster, stronger Coder. Improving data processing by Julien Tournay

After using a little bit Scio by ourself, we were really looking forward for this talk. Scio is an open source framework maintained by Spotify build on top of apache beam and written in Scala. This talk was about the performance improvements we can expect in the new upcoming version, Scio 0.7.

With Scio 0.7 some breaking changes will be introduced (BQ client, serialization…), Julien Tournay presents us the changes made about serialization. In particular, why did they migrate from Kryo to Magnolia (in fact Kryo is still there behind the scene as a fallback).

This change brings huge performance improvements to data processing pipelines. That means less workers, nonetheless, more importantly your batch pipeline should take less time to complete.

Because there is a lot of breaking changes in this version, Julien also developed some scalafix rules to help you go through the migration process!

Cats Effect: The IO Monad for Scala by Gabriel Volpe

Cats effect, or how to deal with side effect the functional way.

This talk was about moving to the FP side of Scala using cats effect. No more side effect, only pure functions. Parallelism with cancellation, race and resource management made easy.

The talk started with a simple example about referential transparency. Please consider the next two pieces of code:

val print = println(“hey!”)(print, print)

This one will only display hey! once, while

import cats.effect.IO

val ioa = IO { println("hey!") }

val program: IO[Unit] =
for {
_ <- ioa
_ <- ioa
} yield ()

program.unsafeRunSync()

will display hey! two times. Wrapping the function responsible of the side effect make the output more controllable and also easier to test.

After introducing us to the basics of cats effect with some example of parallelism, concurrency and cancellation, Gabriel showed how he had implemented a caching system currently used in production at Paidy using cats. You can find the code here.

The Category Theory: you already know it by Emilien Pecoul

This presentation gave us an excellent introduction to the Category Theory demonstrating why this is not only about mathematics, but it closely concerns programming principles.

It gives also a bird’s eye view on the plethora of new functional programming libraries and makes you want to learn more about advanced concepts like Monads, Functors, Applicatives etc.

Introduction to Apache Spark using Frameless by Brian Clapper

In this talk Brian Clapper not only explains in a clear and concise manner the main differences between the main Scala APIs available for Spark (Spark DataFrame, Datasets APIs and Frameless), but he also convinces you on why types are important and why you could benefit from the latest library written by Typelevel.

This was a no-slides presentation, Brian actually used the Databricks platform to go through the various scenarios making this talk quite interactive and straightforward.

Is there anybody out there? by Manuel Bernhardt

A crazy interesting presentation on how distributed systems work and how sometimes… don’t. Nondeterminism, network partitions and outages are just some of the unexpected behaviours you can face in an Akka cluster.

We actually attended this presentation at Scala Days but it did deserve to be mentioned in this article.

Everything you’d ever want to know about Functional Programming but were afraid to ask by Xavier Detant

Wonderful live-coding session on Functional Programming principles in which currying, partial functions, closures, lambdas and many other functional concepts got finally demystified.

The Future of Scala by John Pretty

One of the very promising open-source project in Scala community is dependency manager that could possibly substitute the current pioneer — SBT. The project is still under development, but it is open for determined testers to speed up delivery.

Fury introduces numerous of new concepts. Each fury instance is run inside a workspace, which consists of collection of projects and modules. Workspace has its own git repository. Going further, a schema is the way how Fury lets users support several different target versions of Scala within the same workspace. Next core concept, linking, gives users the possibility to import dependent modules and projects. It has build in support for direct commit imports from source repositories.
Fury gives also hacky, command-line interface to operate on existing workspace. Wonderful and colorful layout which makes you feel like a real hacker.

It all sounds like what we have already in SBT so why should it be promising dependency manager? The golden bullet is the performance!
To dive deeper, you can take a look into Fury’s website or even ask gently Jon Pretty for binaries to test locally.

Building GraphQL API with Sangria by Oleg Ilyenko

Everyone of us, developers, has its ups and downs when it comes to API development. Typically we apply REST API pattern or something that looks close enough to be classified as REST relative. After code crafting we need to spend some time on documenting each of the endpoints to let frontend developers understand how they can use them.
Well, both of those processes can be frustrating but especially the latter.

One way to overgo the overwhelming steps and unify it, is to use GraphQL. GraphQL is a data query language developed by Facebook and specified in the draft in July 2015. Being a part of the Scala community, we got attracted by the library which implements those concepts — Sangria.

Oleg presented step by step how to start over experiencing with Sangria. From creating a schema to fetch books from bookstore, he exposed the very primitive endpoint to retrieve details the way we do it every day. Limiting the results by adding arguments and adding security layer. All of those, looked incredible straightforward. Check out this wonderful library here and source code to presentation here .

Conclusion

Summarizing the conference, we could reflect a lot and be inspired to purify many code snippets in our stack. This motivation gives also the will to continue exploring and considering more the choices.

All of the talks were very interesting, took different approaches to problems that we tackle on the daily basis and gave us a lot of fun!

Big thanks to the organizers for this wonderful and surely, exhausting job! I hope you enjoyed as much as we did.

Thanks to Emanuele Pirro and Paweł Gontarz for writing this article with me and also thanks to Cedric Sadai for reviewing it and thank you all for reading it!

--

--