Advanced Async and Concurrent Programming with ZIO by John A. De Goes

Event Information

Share this event

Date and Time




Derech Menachem Begin 121

Tel Aviv-Yafo


View Map

Refund Policy

Refund Policy

No Refunds

Event description


Advanced Async & Concurrent Programming with ZIO by John A. De Goes

Advanced Async & Concurrent Programming with ZIO is an intensive 3 day course that may be attended remotely (Israel Daylight Time) or locally (Tel Aviv, Israel).

The course rigorously instructs Scala developers on how to solve complex problems in asynchronous, concurrent programming using the purely-functional ZIO library. No background knowledge of functional programming is assumed, and upon completion of the workshop, attendees will be confident using the ZIO library (and similar libraries, like Monix or Cats IO) to build modern high-performance, asynchronous, concurrent applications that don't block threads, don't deadlock, and don't leak resources; and which follow best practices regarding error management, thread management, and dependency management.

If you are using Scala at your day job, but wonder what functional programming can do for the business applications you develop, then this is the course for you. You will learn how pure functional programming with ZIO helps developers solve the hard, messy problems they face at work every day.

Day 1: ZIO Essentials

In ZIO Essentials, you will learn the basic building blocks in ZIO and how to combine them together to write fast programs that use the Scala compiler to safely handle errors, manage service-oriented dependencies, execute real-world effects, and safely acquire and release resources. More than just learning ZIO building blocks, however, you will learn how to think about pure functional programs as the composition of pure immutable values that model interaction with the real world. By the end of the day, you'll know to build real-world, effectful applications that are easy to reason about and easy to test using the ZIO library.

  • Effects. In object-oriented programming, types say nothing about the behavior of a function, and detailed exploration of code is necessary to understand behavior. Functional programming solves these problems by turning effects into ordinary values, which provides a uniform model for both asynchronous and synchronous computation, allows types to describe behavior, and provides powerful ways of reasoning about and composing programs. You will learn how to model any interaction with effectful systems using the ZIO library, trivially reusing existing code, even if it's not written using ZIO.

  • Error Management. In object-oriented programming, the error handling is typically done with exceptions. Unlike values, duplication across exception handling cannot be abstracted or composed, and the compiler cannot help developers reason about error handling. Worse still, exceptions do not work across asynchronous and concurrent boundaries, making them of limited value in modern applications. Functional programming solves all these problems with values, without the return-value boilerplate common in C and Go. You will learn how to statically reason about the error behavior of your programs using the Scala compiler, to detect and locally respond to errors, and to leverage async and concurrent-aware execution traces to diagnose runtime failures.

  • Thread Management. In object-oriented programming, it is difficult to ensure that the right parts of a computation are running in the appropriate thread pools (for example, JDBC connections in a blocking thread pool; Kafka logic in the Kafka thread pool; etc). Functional programming gives us the ability to write effect combinators, which can take an effect, and return a new effect that runs where it is supposed to run. You will discover how to use ZIO's locking facilities to trivially gain iron-clad guarantees about where parts of your logic are executed.

  • Resource-Safety. In object-oriented programming, the only primitive for resource safety is try / finally, which doesn’t work for async and concurrent programs, and doesn't help with thread leaks. Functional programming allows us to increase the usefulness of try / finally across async and concurrent code, and across threads as well as file and socket handles. You will learn how to write ZIO programs that cannot leak resources, and which can safely and easily consume from multiple scoped resources simultaneously, with well-defined behavior in the event of failure or interruption.

  • Testing & Mocking. In object-oriented programming, testing effectful code is difficult, often requiring strange mocking libraries that perform bytecode rewriting. Functional programming makes testing even the most effectful code trivial, without requiring any bytecode rewriting and still being completely typesafe. You will learn how to thoroughly test effectful ZIO code with blazing fast unit tests that require no magic and are completely type safe.

Day 2: ZIO Concurrency

In ZIO Concurrency, you will learn the basics of ZIO's fiber-based concurrency model, which scales well past the limiations of JVM threads. In the process, you'll learn how to build concurrent applications that take advantage of arbitrary numbers of cores, safely update data that's shared between many fibers, build streaming data applications, and write code without using any locks, semaphores, or other legacy concurrency structures. By the end of the day, you’ll be able to rapidly and easily build high-performance concurrent applications that don't suffer from any of the concurrency and synchronization problems that plague imperative and object-oriented approaches.

  • Concurrency & Parallelism. In object-oriented programming, concurrency and parallelism are extremely painful, because of the presence of shared mutable state, which leads to deadlocks, thread leaks, and other massive pain points. Functional programming provides a more principled, sane model of concurrency and parallelism, which makes developing asynchronous, safe, scalable programs trivial. You will learn how to write efficient (asynchronous) and performant code using the simple building blocks in ZIO.

  • Shared Concurrent State. In object-oriented programming, mutable data is notorously difficult to update safely in a concurrent setting. In functional programming, purely functional models of mutable data are equipped with powerful features like atomic update, which allows programmers to reduce or eliminate error-prone structures like semaphores, mutexes, and locks. You will learn how to use ZIO primitives to easily and safely share data between many different fibers.

  • Classic Concurrent Structures. In object-oriented programming, powerful concurrent structures like promises, queues and maps allows programmers to more easily solve challenging problems. In functional programming, we have these same concurrent structures, only they don't waste resources by blocking, they expose a uniform access model whether the updates are synchronous or asynchronous, and they integrate beautifully with other functional features. You will learn how to use ZIO's concurrent data structures to make short work of challenging problems in concurrency and synchronization.

  • Streaming. In object-oriented programming, streaming libraries have taken some principles from functional programming and applied them to solve problems in service request and data processing. In functional programming, the birthplace of streaming, we push streaming further by making the entire workflow pure, which gives us advantages in improved laziness, type safety, and concurrency. You'll learn how to use ZIO's concurrent streaming abstractions to process large or infinite amounts of data in finite memory, using a declarative API that expresses intent rather than low-level mechanics.

  • Software Transactional Memory (STM). In object-oriented programming, the traditional approaches to concurrency involve locks and condition variables, or actors. Locks and condition variables are low-level, and can easily lead to deadlocks. Actors provide a saner method of concurrency, but they do not compose, and their transactionality is limited to the state of a single actor. Functional programming, thanks to immutable data structuers, provides us transactional memory updates across our entire system, without the need for locks or condition variables, and in a way that's completely asynchronous and interruptible. You'll learn how to leverage ZIO's STM to declaratively solve problems in concurrency that would be error-prone and costly otherwise.

Day 3: ZIO Applications

In ZIO Applications, you will solidify your extensive knowledge of ZIO to build applications across a variety of domains. As you build different interactive applications, exploring different aspects of async and concurrent programming with ZIO, you'll gain insight into how to structure purely functional code bases, how to refactor them, and how to design them to take advantage of the features provided by ZIO.

By the end of the day, you will feel confident using ZIO to meet complex real-world challenges, without assistance from anyone, and you'll be able to mentor new team members on advanced async and concurrent programming in Scala.

Daily Structure

  • 9:00 - Begin Instruction

  • 10:25 - Break

  • 10:35 - Resume Instruction

  • 12:00 - Lunch Break

  • 13:30 - Resume Instruction

  • 14:55 - Break

  • 15:05 - Resume Instruction

  • 16:25 - Break

  • 16:35 - Resume Instruction

  • 17:30 - End of Day


The training course will take place at IronSource in Tel-Aviv, Israel.


Attendance is local or remote. Local attendees must arrange their own transportation and lodging to the host city, as well as their own food and beverages. Remote attendees will be provided with a link to a remote meeting session, in which they can see and hear the live workshop, ask the instructor questions, and chat with both local and remote attendees. Motivated remote attendees who participate in all exercises can expect to get nearly as much out of the training as local attendees.


Attendees will be provided with example code, a course outline, and exercises in electronic form. The workshop is not recorded and recording is strictly prohibited.

Financial Aid

Financial aid is available for qualified applicants. If you would like to attend the training but cannot afford the list prices, please contact the organizer for information on all available aid packages.

Share with friends

Date and Time



Derech Menachem Begin 121

Tel Aviv-Yafo


View Map

Refund Policy

No Refunds

Save This Event

Event Saved