Learning Concurrent Programming in Scala 2nd Edition by Aleksandar Prokopec – Ebook PDF Instant Download/Delivery: 1786462141, 9781786462145
Full download Learning Concurrent Programming in Scala 2nd Edition after payment
Product details:
ISBN 10: 1786462141
ISBN 13: 9781786462145
Author: Aleksandar Prokopec
Learning Concurrent Programming in Scala 2nd Edition: Key Features Make the most of Scala by understanding its philosophy and harnessing the power of multicores Get acquainted with cutting-edge technologies in the field of concurrency, through practical, real-world applications Get this step-by-step guide packed with pragmatic examples 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. 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.
Learning Concurrent Programming in Scala 2nd Edition Table of contents:
Introduction
- Concurrent programming
- A brief overview of traditional concurrency
- Modern concurrency paradigms
- The advantages of Scala
- Preliminaries
- Execution of a Scala program
- A Scala primer
- Overview of new features in Scala 2.12
- Summary
- Exercises
Concurrency on the JVM and the Java Memory Model
- Processes and threads
- Creating and starting threads
- Atomic execution
- Reordering
- Monitors and synchronization
- Deadlocks
- Guarded blocks
- Interrupting threads and the graceful shutdown
- Volatile variables
- The Java Memory Model
- Immutable objects and final fields
- Summary
- Exercises
Traditional Building Blocks of Concurrency
- The Executor and ExecutionContext objects
- Atomic primitives
- Atomic variables
- Lock-free programming
- Implementing locks explicitly
- The ABA problem
- Lazy values
- Concurrent collections
- Concurrent queues
- Concurrent sets and maps
- Concurrent traversals
- Custom concurrent data structures
- Implementing a lock-free concurrent pool
- Creating and handling processes
- Summary
- Exercises
Asynchronous Programming with Futures and Promises
- Futures
- Starting future computations
- Future callbacks
- Futures and exceptions
- Using the Try type
- Fatal exceptions
- Functional composition on futures
- Promises
- Converting callback-based APIs
- Extending the future API
- Cancellation of asynchronous computations
- Futures and blocking
- Awaiting futures
- Blocking in asynchronous computations
- The Scala Async library
- Alternative future frameworks
- Summary
- Exercises
Data-Parallel Collections
- Scala collections in a nutshell
- Using parallel collections
- Parallel collection class hierarchy
- Configuring the parallelism level
- Measuring the performance on the JVM
- Caveats with parallel collections
- Non-parallelizable collections
- Non-parallelizable operations
- Side effects in parallel operations
- Nondeterministic parallel operations
- Commutative and associative operators
- Using parallel and concurrent collections together
- Weakly consistent iterators
- Implementing custom parallel collections
- Splitters
- Combiners
- Summary
- Exercises
Concurrent Programming with Reactive Extensions
- Creating Observable objects
- Observables and exceptions
- The Observable contract
- Implementing custom Observable objects
- Creating Observables from futures
- Subscriptions
- Composing Observable objects
- Nested Observables
- Failure handling in Observables
- Rx schedulers
- Using custom schedulers for UI applications
- Subjects and top-down reactive programming
- Summary
- Exercises
Software Transactional Memory
- The trouble with atomic variables
- Using Software Transactional Memory
- Transactional references
- Using the atomic statement
- Composing transactions
- The interaction between transactions and side effects
- Single-operation transactions
- Nesting transactions
- Transactions and exceptions
- Retry transactions
- Retry with timeouts
- Transactional collections
- Transaction-local variables
- Transactional arrays
- Transactional maps
- Summary
- Exercises
Actors
- Working with actors
- Creating actor systems and actors
- Managing unhandled messages
- Actor behavior and state
- Akka actor hierarchy
- Identifying actors
- The actor lifecycle
- Communication between actors
- The ask pattern
- The forward pattern
- Stopping actors
- Actor supervision
- Remote actors
- Summary
- Exercises
Concurrency in Practice
- Choosing the right tools for the job
- Putting it all together – a remote file browser
- Modeling the filesystem
- The server interface
- Client navigation API
- The client user interface
- Implementing the client logic
- Improving the remote file browser
- Debugging concurrent programs
- Deadlocks and lack of progress
- Debugging incorrect program outputs
- Performance debugging
- Summary
- Exercises
Reactors
- The need for reactors
- Getting started with Reactors
- The “Hello World” program
- Event streams
- Lifecycle of an event stream
- Functional composition of event streams
- Reactors
- Defining and configuring reactors
- Using channels
- Schedulers
- Reactor lifecycle
- Reactor system services
- The logging service
- The clock service
- The channels service
- Custom services
- Protocols
- Custom server-client protocol
- Standard server-client protocol
- Using an existing connector
- Creating a new connector
- Creating a protocol-specific reactor prototype
- Spawning a protocol-specific reactor directly
- Router protocol
- Two-way protocol
People also search for Learning Concurrent Programming in Scala 2nd Edition:
what is concurrent programming language
concurrent vs parallel programming
learning concurrency in python
concurrent learning
concurrent programming course
Tags:
Aleksandar Prokopec,Learning,Concurrent Programming,Scala