Learning Concurrent Programming in Scala - Second Edition

Learn the art of building intricate, modern, scalable, and concurrent applications using Scala
Preview in Mapt

Learning Concurrent Programming in Scala - Second Edition

Aleksandar Prokopec

1 customer reviews
Learn the art of building intricate, modern, scalable, and concurrent applications using Scala
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.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
$25.20
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Learning Concurrent Programming in Scala - Second Edition Book Cover
Learning Concurrent Programming in Scala - Second Edition
$ 35.99
$ 25.20
Learning Concurrent Programming in Scala Book Cover
Learning Concurrent Programming in Scala
$ 26.99
$ 18.90
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 139781786466891
Paperback434 pages

Book Description

Scala is a modern, multiparadigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way. Scala smoothly integrates the features of object-oriented and functional languages.

In this second edition, you will find updated coverage of the Scala 2.12 platform. The Scala 2.12 series targets Java 8 and requires it for execution. The book 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.

The book then walks you through different high-level concurrency abstractions, each tailored toward a specific class of programming tasks, while touching on the latest advancements of async programming capabilities of Scala. It also covers some useful patterns and idioms to use with the techniques described. Finally, the book presents an overview of when to use which concurrency library and demonstrates how they all work together, and then presents new exciting approaches to building concurrent and distributed systems.

Table of Contents

Chapter 1: Introduction
Concurrent programming
The advantages of Scala
Preliminaries
Overview of new features in Scala 2.12
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
Custom concurrent data structures
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 with parallel collections
Using parallel and concurrent collections together
Implementing custom parallel collections
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
Chapter 10: Reactors
The need for reactors
Getting started with Reactors
The "Hello World" program
Event streams
Reactors
Schedulers
Reactor lifecycle
Reactor system services
Protocols
Summary
Exercises

What You Will Learn

  • Get to grips with the fundamentals of concurrent programming on modern multiprocessor systems.
  • 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
  • Design safe, scalable, and easy-to-comprehend in-memory transactional data models
  • Transparently create distributed applications that scale across multiple machines
  • Integrate different concurrency frameworks together in large applications
  • Develop and implement scalable and easy-to-understand concurrent applications in Scala 2.12

Authors

Table of Contents

Chapter 1: Introduction
Concurrent programming
The advantages of Scala
Preliminaries
Overview of new features in Scala 2.12
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
Custom concurrent data structures
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 with parallel collections
Using parallel and concurrent collections together
Implementing custom parallel collections
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
Chapter 10: Reactors
The need for reactors
Getting started with Reactors
The "Hello World" program
Event streams
Reactors
Schedulers
Reactor lifecycle
Reactor system services
Protocols
Summary
Exercises

Book Details

ISBN 139781786466891
Paperback434 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

RESTful Web Services with Scala Book Cover
RESTful Web Services with Scala
$ 27.99
$ 19.60
Learning Concurrent Programming in Scala Book Cover
Learning Concurrent Programming in Scala
$ 26.99
$ 18.90
Mastering Concurrency Programming with Java 8 Book Cover
Mastering Concurrency Programming with Java 8
$ 43.99
$ 30.80
Scala for Machine Learning Book Cover
Scala for Machine Learning
$ 35.99
$ 25.20
Learning Akka Book Cover
Learning Akka
$ 35.99
$ 25.20
Scala Design Patterns Book Cover
Scala Design Patterns
$ 43.99
$ 30.80