Learning Concurrent Programming in Scala

Free download. Book file PDF easily for everyone and every device. You can download and read online Learning Concurrent Programming in Scala file PDF Book only if you are registered here. And also you can download or read online all Book PDF file that related with Learning Concurrent Programming in Scala book. Happy reading Learning Concurrent Programming in Scala Bookeveryone. Download file Free Book PDF Learning Concurrent Programming in Scala at Complete PDF Library. This Book have some digital formats such us :paperbook, ebook, kindle, epub, fb2 and another formats. Here is The CompletePDF Book Library. It's free to register here to get Book file PDF Learning Concurrent Programming in Scala Pocket Guide.

As parallel and distributed computing systems are now the norm, most applications are concurrent, be it for increasing the performance or for handling asynchronous events. So far, most developers are unprepared to deal with this revolution. Maybe they have learned the traditional concurrency model, which is based on threads and locks, in school, but this model has become inadequate for dealing with massive concurrency in a reliable manner and with acceptable productivity.

Indeed, threads and locks are hard to use and harder to get right. To make progress, one needs to use concurrency abstractions that are at a higher level and composable. All the programming concepts were explained in this language as syntactic sugar on top of functional nets, an object-oriented variant of join calculus.

Top Authors

Even though join calculus is a beautiful theory, we realized after some experimentation that the concurrency problem is more multifaceted than what can be comfortably expressed in a single formalism. There is no silver bullet for all concurrency issues; the right solution depends on what one needs to achieve. Do you want to define asynchronous computations that react to events or streams of values? Or have autonomous, isolated entities communicating via messages?

Or define transactions over a mutable store?

Or, maybe the primary purpose of parallel execution is to increase the performance? For each of these tasks, there is an abstraction that does the job: futures, reactive streams, actors, transactional memory, or parallel collections. This brings us to Scala and this book. As there are so many useful concurrency abstractions, it seems unattractive to hardcode them all in a programming language. The purpose behind the work on Scala was to make it easy to define high-level abstractions in user code and libraries.

All of these modules would be built on a low-level core that is provided by the host system. In retrospect, this approach has worked well. Today, Scala has some of the most powerful and elegant libraries for concurrent programming. This book will take you on a tour of the most important ones, explaining the use case for each and the application patterns. This book could not have a more expert author. Aleksandar Prokopec contributed to some of the most popular Scala libraries for concurrent and parallel programming.

He also invented some of the most intricate data structures and algorithms. With this book, he created a readable tutorial at the same time and an authoritative reference for the area that he had worked in. I believe that Learning Concurrent Programming in Scala, Second Edition will be a mandatory reading for everyone who writes concurrent and parallel programs in Scala.

I also expect to see it on the bookshelves of many people who just want to find out about this fascinating and fast moving area of computing. Aleksandar Prokopec, who also authored the first edition of this book, is a concurrent and distributed programming researcher. He has worked at Google and is currently a principal researcher at Oracle Labs. As a member of the Scala team at EPFL, Aleksandar actively contributed to the Scala programming language, and he has worked on programming abstractions for concurrency, data-parallel programming support, and concurrent data structures for Scala.

He created the Scala Parallel Collections framework, which is a library for high-level data-parallel programming in Scala, and participated in working groups for Scala concurrency libraries, such as Futures, Promises, and ScalaSTM. It really was a pleasure to work with these people. Many individuals have somehow, directly or indirectly, contributed to the development of these utilities.


It is difficult to enumerate all of them here, but I tried my best. It goes without saying that Martin Odersky is to thank for creating the Scala programming language, which was used as a platform for the concurrency frameworks described in this book. Special thanks goes to him, all the people that were part of the Scala team at the EPFL through the last 10 or more years, and the people at Typesafe, who are working hard to keep Scala one of the best general purpose languages out there.

Most of the Scala concurrency frameworks rely on the work of Doug Lea, in one way or another. Many of the Scala concurrency libraries were influenced by his advice. Later on, Dmitry Petrashko and I started working on an improved version of parallel and standard collection operations, optimized through the use of Scala Macros. Since its original. The initial Scala actor library was inspired by the Erlang actor model and developed by Philipp Haller.

Finally, I would like to thank the entire Scala community for their contributions, and for making Scala an awesome programming language. Vikash Sharma is a software developer and open source technology evangelist, located in India. He tries to keep things simple and that helps him writing clean and manageable code.

He has authored a video course for Scala. He is employed as an associate consultant with Infosys and has also worked as a Scala developer. Thank you would not suffice for the support I got from my family, Mom, Dad and Brother. I really want to appreciate everyone who were there when I needed them the most.

Special thanks to Vijay Athikesavan for passing to me the insights he had for coding. Besides his research projects, he teaches a course on concurrent programming. Some years ago, the goal of this course was to convince the students that writing correct concurrent programs is too complicated for mere mortals an educational objective that was regularly achieved.


Learning Concurrent Programming in Scala - Second Edition by Aleksandar Prokopec

With the availability of high-level concurrency frameworks in Java and Scala, this has changed, and this book, Learning Concurrent Programming in Scala, is a great resource for all programmers who want to learn how to write correct, readable, and efficient concurrent programs. This book is the ideal textbook for a course on concurrent programming. Zhen Li acquired an enthusiasm of computing early in elementary school when she first learned Logo. She focused on psychological aspects of programmers' learning behaviors, especially the way programmers understand concurrent programs.

Based on the research, she aimed to develop effective software engineering methods and teaching paradigms to help programmers embrace concurrent programs. Zhen Li had practical teaching experience with undergraduate students on a variety of computer science topics, including system and network programming, modeling and simulation, as well as human-computer interaction.

Her major contributions in teaching computer programming were to author syllabi and offer courses with various programming languages and multiple modalities of concurrency that encouraged students to actively acquire software design philosophy and comprehensively learn programming concurrency. Zhen Li also had a lot of working experience in industrial innovations. She worked in various IT companies, including Oracle, Microsoft, and Google, over the past 10 years, where she participated in the development of cutting-edge products, platforms and infrastructures for core enterprise, and Cloud business technologies.

Zhen Li is passionate about programming and teaching. You are welcome to contact her at janeli uga. Lukas Rytz is a compiler engineer working in the Scala team at Typesafe. She has conducted research on various areas, such as testing concurrent programs and in particular actor programs, patterns in parallel programming, and verification of component-based systems. I would like to thank my husband and mom for their endless love and support.

Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career. Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. If you'd like to join our team of regular reviewers, you can email us at customerreviews packtpub.

We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!

  • Iconoclastic.
  • Quake 4 (Xbox 360) (Prima Official Game Guide)?
  • Six Poetic Tone-Pictures, op. 3, no. 4!
  • Origins of Phobias and Anxiety Disorders: Why More Women than Men? (BRAT Series in Clinical Psychology)?
  • Productspecificaties.

Concurrency is everywhere. With the rise of multicore processors in the consumer market, the need for concurrent programming has overwhelmed the developer world. Where it once served to express asynchronously in programs and computer systems and was largely an academic discipline, concurrent programming is now a pervasive methodology in software development. As a result, advanced concurrency frameworks and libraries are sprouting at an amazing rate.

Recent years have witnessed a renaissance in the field of concurrent computing.

  • 3. Traditional Building Blocks of Concurrency - Learning Concurrent Programming in Scala [Book]!
  • Surgical Atlas of Sports Orthopaedics and Sports Traumatology;
  • Learning Concurrent Programming in Scala [Book].
  • Hire and Keep the Best People: 21 Practical and Proven Techniques You Can Use Immediately?
  • Juniper Networks Field Guide and Reference.

As the level of abstraction grows in modern languages and concurrency frameworks, it is becoming crucial to know how and when to use them. Having a good grasp of the classical concurrency and synchronization primitives, such as threads, locks, and monitors, is no longer sufficient.

High-level concurrency frameworks, which solve many issues of traditional concurrency and are tailored towards specific tasks, are gradually overtaking the world of concurrent programming.

Bestselling Series

This book describes high-level concurrent programming in Scala. It presents detailed explanations of various concurrency topics and covers the basic theory of concurrent programming. Simultaneously, it describes modern concurrency frameworks, shows their detailed semantics, and teaches you how to use them. Its goal is to introduce important concurrency abstractions and, at the same time, show how they work in real code. We are convinced that, by reading this book, you will gain both a solid theoretical understanding of concurrent programming and develop a set of useful practical skills that are required to write correct and efficient concurrent programs.

These skills are the first steps toward becoming a modern concurrency expert. This book is organized into a sequence of chapters with various topics on concurrent programming. The book covers the fundamental concurrent APIs that are a part of the Scala runtime, introduces more complex concurrency primitives, and gives an extensive overview of high-level concurrency abstractions. Chapter 1, Introduction , explains the need for concurrent programming and gives some philosophical background.

At the same time, it covers the basics of the Scala programming language that are required for understanding the rest of this book.

Scala Tutorial

This chapter will teach you how to use threads and how to protect access to shared memory and introduce the Java Memory Model. Chapter 3, Traditional Building Blocks of Concurrency , presents classic concurrency utilities, such as thread pools, atomic variables, and concurrent collections, with a particular focus on the interaction with the features of the Scala language. The emphasis in this book is on the modern, high-level concurrent programming frameworks. Consequently, this chapter presents an overview of traditional concurrent programming techniques, but it does not aim to be extensive.

Chapter 4, Asynchronous Programming with Futures and Promises , is the first chapter that deals with a Scala-specific concurrency framework. This chapter presents the futures and promises API and shows how to correctly use them when implementing asynchronous programs. Chapter 5, Data-Parallel Collections , describes the Scala parallel collections framework. In this chapter, you will learn how to parallelize collection operations, when it is allowed to parallelize them, and how to assess the performance benefits of doing so.

Chapter 6, Concurrent Programming with Reactive Extensions , teaches you how to use the Reactive Extensions framework for event-based and asynchronous programming. You will see how the operations on event streams correspond to collection operations, how to pass events from one thread to another, and how to design a reactive user interface using event streams. Chapter 7, Software Transactional Memory , introduces the ScalaSTM library for transactional programming, which aims to provide a safer, more intuitive, shared-memory programming model. In this chapter, you will learn how to protect access to shared data using scalable memory transactions and, at the same time, reduce the risk of deadlocks and race conditions.

Chapter 8, Actors , presents the actor programming model and the Akka framework. In this chapter, you will learn how to transparently build message-passing distributed programs that run on multiple machines.

  • ulelemalip.ga | Learning Concurrent Programming in Scala -, Aleksandar Prokopec | | Boeken.
  • A New Euro-Mediterranean Cultural Identity (Soviet Study of War).
  • Air Plants: The Curious World of Tillandsias.
  • Shop now and earn 2 points per $1.
  • Learning Concurrent Programming in Scala, Second Edition.
  • See a Problem?.

Chapter 9, Concurrency in Practice , summarizes the different concurrency libraries introduced in the earlier chapters. In this chapter, you will learn how to choose the correct concurrency abstraction to solve a given problem, and how to combine different concurrency abstractions together when designing larger concurrent applications.

Chapter 10, Reactors , presents the reactor programming model, whose focus is improved composition in concurrent and distributed programs. This emerging model enables separation of concurrent and distributed programming patterns into modular components called protocols. While we recommend that you read the chapters in the order in which they appear, this is not strictly necessary.

If you are well acquainted with the content in Chapter 2, Concurrency on the JVM and the Java Memory Model , you can study most of the other chapters directly. The only chapters that rely on the content from all the preceding chapters are Chapter 9, Concurrency in Practice , where we present a practical overview of the topics in this book, and Chapter 10, Reactors , for which it is helpful to understand how actors and event streams work. In this section, we describe some of the requirements that are necessary to read and understand this book.

We explain how to install the Java Development Kit, which is required to run Scala programs and show how to use Simple Build Tool to run various examples. We will not require an IDE in this book. Scala programs are not compiled directly to the native machine code, so they cannot be run as executables on various hardware platforms. Instead, the Scala compiler produces an intermediate code format called the Java bytecode. To run this intermediate code, your computer must have the Java Virtual Machine software installed.

In this section, we explain how to download and install the Java Development Kit, which includes the Java Virtual Machine and other useful tools. There are multiple implementations of the JDK that are available from different software vendors. We recommend that you use the Oracle JDK distribution. To download and install the Java Development Kit, follow these steps:. Open the following URL in your web browser: www. If you are using the Windows operating system, simply run the installer program.

You should now be able to run the java and javac commands in the terminal. It is possible that your operating system already has JDK installed. To verify this, simply run the javac command, as we did in the last step in the preceding description. Its purpose is to compile Scala code, manage dependencies, continuous compilation and testing, deployment, and many other uses.

Throughout this book, we will use SBT to manage our project dependencies and run example code. Ajit J. Alessandro S. Alex B.

Book Review: Learning Concurrent Programming in Scala

Alex N. Skip to content. Hosted by Andy H. This is a past event people went.

Learning Concurrent Programming in Scala - Second Edition

Attendees See all. Go to Attendee List Andy H. Adamos Adamos Member.