Scala Asynchronous Programming

by Vikash Sharma

This course enables developers to write non-blocking and asynchronous code using Scala. You'll learn how to use Scala Futures for writing async code. It covers how actor model can be leveraged to write an asynchronous and message based application.

What you'll learn

A good software system should be performant, scalable, and efficient. Along with infrastructure, it depends a lot on the way it’s written. In the course, Scala Asynchronous Programming, you’ll learn how to achieve better performance and scalability by non-blocking and asynchronous code. First, you’ll discover why blocking is not the way to go, you’ll understand why it’s important to write asynchronous code. Then, you’ll explore one of the high level abstractions for writing async code i.e. Scala Futures. By the end of the course, you’ll learn to create Scala Futures and how to handle successful and failed future values.

Finally, you’ll learn about the actor model and how it can be used to write async message based systems. You’ll learn the basics of using Akka’s actor model, along with writing message protocols, async communication, supervision strategy. You’ll learn how a shared mutable state is handled in Actors. You’ll also get a basic understanding about routing, mailbox and dispatcher.

By the end of this course, you’ll have the knowledge to use Scala Futures or Actor Model for writing scalable and performant software systems.

Course FAQ

What are the prerequisites for this Scala course?

Before beginning this course, you should be familiar with basic concurrency primitives, such as threats.

What will this course provide for me overall?

By the end of this course, you will have a solid grasp of concepts such as Scala Futures and Akka Actors. You will be able to use these async programming constructs to build scalable software systems.

What is Asychronous Code?

Asynchronous programming is a means of parallel programming in which a unit of work runs separately from the main application thread and notifies the calling thread of its completion, failure or progress.

What are the benefits of using Asynchronous Code?

The main benefits one can gain from using asynchronous programming are improved application performance and responsiveness. One particularly well suited application for the asynchronous pattern is providing a responsive UI in a client application while running a computationally or resource expensive operation.

What are Akka Actors?

The Actor Model provides a higher level of abstraction for writing concurrent and distributed systems. It alleviates the developer from having to deal with explicit locking and thread management, making it easier to write correct concurrent and parallel systems.

About the author

Vikash Sharma is a developer, trainer and open source technology evangelist. He has invested a large amount of time learning and implementing Scala code and authored video course for Scala. He has authored a beginner's book on Scala named Learning Scala Programming. He works as a developer at SAP Labs.

Ready to upskill? Get started