Learning Concurrent Programming in Scala

Dive into the Scala framework with this programming guide, created to help you learn Scala and to build intricate, modern, scalable concurrent applications
Preview in Mapt

Learning Concurrent Programming in Scala

Aleksandar Prokopec

2 customer reviews
Dive into the Scala framework with this programming guide, created to help you learn Scala and to build intricate, modern, scalable concurrent applications
Mapt Subscription
FREE
$29.99/m after trial
eBook
$18.90
RRP $26.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$18.90
$44.99
$29.99p/m after trial
RRP $26.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Learning Concurrent Programming in Scala Book Cover
Learning Concurrent Programming in Scala
$ 26.99
$ 18.90
Learning Concurrent Programming in Scala - Second Edition Book Cover
Learning Concurrent Programming in Scala - Second Edition
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $27.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781783281411
Paperback366 pages

Book Description

This book will give you an insight into the best practices necessary to build concurrent programs in Scala using modern, high-level concurrency libraries. It starts by introducing you to the foundations of concurrent programming on the JVM, outlining the basics of the Java Memory Model, and then shows some of the classic building blocks of concurrency, such as the atomic variables, thread pools, and concurrent data structures, along with the caveats of traditional concurrency. It then walks you through different high-level concurrency abstractions, each tailored toward a specific class of programming tasks. Finally, the book presents an overview of when to use which concurrency library and demonstrates how they all work together.

Table of Contents

Chapter 1: Introduction
Concurrent programming
The advantages of Scala
Preliminaries
Summary
Exercises
Chapter 2: Concurrency on the JVM and the Java Memory Model
Processes and Threads
Monitors and synchronization
Volatile variables
The Java Memory Model
Summary
Exercises
Chapter 3: Traditional Building Blocks of Concurrency
The Executor and ExecutionContext objects
Atomic primitives
Lazy values
Concurrent collections
Creating and handling processes
Summary
Exercises
Chapter 4: Asynchronous Programming with Futures and Promises
Futures
Promises
Futures and blocking
The Scala Async library
Alternative Future frameworks
Summary
Exercises
Chapter 5: Data-Parallel Collections
Scala collections in a nutshell
Using parallel collections
Caveats of parallel collections
Using parallel and concurrent collections together
Implementing custom parallel collections
Alternative data-parallel frameworks
Summary
Exercises
Chapter 6: Concurrent Programming with Reactive Extensions
Creating Observable objects
Composing Observable objects
Rx schedulers
Subjects and top-down reactive programming
Summary
Exercises
Chapter 7: Software Transactional Memory
The trouble with atomic variables
Using Software Transactional Memory
Composing transactions
Retrying transactions
Transactional collections
Summary
Exercises
Chapter 8: Actors
Working with actors
Communication between actors
Actor supervision
Remote actors
Summary
Exercises
Chapter 9: Concurrency in Practice
Choosing the right tools for the job
Putting it all together – a remote file browser
Debugging concurrent programs
Summary
Exercises

What You Will Learn

  • Get to grips with the fundamentals of concurrent programming on modern multiprocessor systems, with a particular focus on the JVM concurrency model
  • Build high-performance concurrent systems from simple, low-level concurrency primitives
  • Express asynchrony in concurrent computations with futures and promises
  • Seamlessly accelerate sequential programs by using data-parallel collections
  • Implement reactive and event-based programs declaratively with Rx-style event streams
  • Design safe, scalable, and easy-to-comprehend in-memory transactional data models
  • Transparently create distributed applications that scale across multiple machines
  • Choose the correct concurrency abstraction and integrate different concurrency frameworks together in large applications

Authors

Table of Contents

Chapter 1: Introduction
Concurrent programming
The advantages of Scala
Preliminaries
Summary
Exercises
Chapter 2: Concurrency on the JVM and the Java Memory Model
Processes and Threads
Monitors and synchronization
Volatile variables
The Java Memory Model
Summary
Exercises
Chapter 3: Traditional Building Blocks of Concurrency
The Executor and ExecutionContext objects
Atomic primitives
Lazy values
Concurrent collections
Creating and handling processes
Summary
Exercises
Chapter 4: Asynchronous Programming with Futures and Promises
Futures
Promises
Futures and blocking
The Scala Async library
Alternative Future frameworks
Summary
Exercises
Chapter 5: Data-Parallel Collections
Scala collections in a nutshell
Using parallel collections
Caveats of parallel collections
Using parallel and concurrent collections together
Implementing custom parallel collections
Alternative data-parallel frameworks
Summary
Exercises
Chapter 6: Concurrent Programming with Reactive Extensions
Creating Observable objects
Composing Observable objects
Rx schedulers
Subjects and top-down reactive programming
Summary
Exercises
Chapter 7: Software Transactional Memory
The trouble with atomic variables
Using Software Transactional Memory
Composing transactions
Retrying transactions
Transactional collections
Summary
Exercises
Chapter 8: Actors
Working with actors
Communication between actors
Actor supervision
Remote actors
Summary
Exercises
Chapter 9: Concurrency in Practice
Choosing the right tools for the job
Putting it all together – a remote file browser
Debugging concurrent programs
Summary
Exercises

Book Details

ISBN 139781783281411
Paperback366 pages
Read More
From 2 reviews

Read More Reviews

Recommended for You

Scala for Machine Learning Book Cover
Scala for Machine Learning
$ 35.99
$ 25.20
Machine Learning with Spark Book Cover
Machine Learning with Spark
$ 29.99
$ 3.00
Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
Building Machine Learning Systems with Python Book Cover
Building Machine Learning Systems with Python
$ 29.99
$ 6.00
Scala for Java Developers Book Cover
Scala for Java Developers
$ 26.99
$ 18.90
Machine Learning with R Book Cover
Machine Learning with R
$ 32.99
$ 23.10