Pexels Photo 612999

Asynchronous streams in direct style with and without macros by Philipp Haller

Pexels Photo 612999

Scala-async helps us to simplify the use of futures so what if there was an extension that enabled us to write producers and consumers of asynchronous streams. At Scala DaysPhilipp Haller introduced us to this extension so we can implement it into our programming!


Asynchronous streams in direct style with and without macros

Scala-async is a macro for simplifying the use of futures. This talk presents an extension of scala-async which additionally enables writing producers and consumers of asynchronous streams using familiar straight-line, blocking-style code while using efficient non-blocking, event-based concurrency under the hood. Building on the Reactive Streams standard enables integrating with many stream-based Scala libraries and frameworks. The second part of the talk shows how OpenJDK Project Loom fibers can be used to implement extended scala-async without the use of Scala's deprecated macro system.


About Philipp Haller

Philipp Haller is an associate professor in the department of computer science at KTH Royal Institute of Technology in Stockholm, the leading technical university in Sweden. Philipp is co-author of Scala's async/await extension for asynchronous programming, and one of the lead designers of Scala's futures library. Main author of the book "Actors in Scala," he created Scala's first widely-used actor library. Previously, Philipp held positions at Typesafe, Stanford University, and EPFL.


This talk was given by Philipp Haller at Scala Days 2019.