Your software needs to leverage multiple cores, handle thousands of users and terabytes of data, and continue working in the face of both hardware and software failure. Concurrency and parallelism are the keys, and Seven Concurrency Models in Seven Weeks equips you for this new world. See how emerging technologies such as actors and functional programming address issues with traditional threads and locks development. Learn how to exploit the parallelism in your computer’s GPU and leverage clusters of machines with MapReduce and Stream Processing. And do it all with the confidence that comes from using tools that help you write crystal clear, high-quality code.

Bonus Chapter

Buy Now

Select a DRM-free Format:

In Stock
In Stock
Buy the eBook and get these DRM-free formats delivered immediately:
  • epub (for iPhone/iPad, Android, eReaders)
  • mobi (for Kindle)
  • PDF
We can automatically send them to your Kindle or Dropbox, and for a social reading experience we can link the book to your Readmill account. (You'll need to log in to enable these options.)

This title is currently available in Beta. Buy the eBook now, and you'll be able to download successive releases of the eBook as the authors add material and correct mistakes. You'll get the final eBook when the book is finished.

If you buy the combo pack (Beta eBook + finished Paper Book) now, you'll get the Beta eBook immediately. You'll get the finished paper book when it's released (we're currently estimating 2014-06-30, but these dates can change).

 

About this Book

  • 300 pages (est)
  • Published:
  • Release: B10.0.11.2 (2014-04-22)
  • ISBN: 978-1-93778-565-9

This book will show you how to exploit different parallel architectures to improve your code’s performance, scalability, and resilience.

Learn about the perils of traditional threads and locks programming and how to overcome them through careful design and by working with the standard library. See how actors enable software running on geographically distributed computers to collaborate, handle failure, and create systems that stay up 24/7/365. Understand why shared mutable state is the enemy of robust concurrent code, and see how functional programming together with technologies such as Software Transactional Memory (STM) and automatic parallelism help you tame it.

You’ll learn about the untapped potential within every GPU and how GPGPU software can unleash it. You’ll see how to use MapReduce to harness massive clusters to solve previously intractible problems, and how, in concert with Stream Processing, big data can be tamed.

With an understanding of the strengths and weaknesses of each of the different models and hardware architectures, you’ll be empowered to tackle any problem with confidence.

What You Need

The example code can be compiled and executed on *nix, OS X, or Windows. Instructions on how to download the supporting build systems are given in each chapter.

Contents and Extracts

This book is currently in beta, so the contents and extracts will change as the book is developed.

Bonus Chapter

  • Concurrent or Parallel?
  • Parallel Architecture
  • Concurrency: Beyond Multiple Cores
  • The Seven Models
  • Threads and Locks
    • The Simplest Thing That Could Possibly Work
    • Day 1: Mutual Exclusion and Memory Models
    • Day 2: Beyond Intrinsic Locks
    • Day 3: On the Shoulders of Giants
    • Wrap-Up
  • Functional Programming excerpt
    • If It Hurts, Stop Doing It
    • Day 1: Programming Without Mutable State
    • Day 2: Reducers
    • Day 3: Dataflow Programming with Futures and Promises
    • Wrap-Up
  • The Clojure Way—Separating Identity from State
    • The Best of Both Worlds
    • Day 1: Atoms and Persistent Data Structures
    • Day 2: Agents and Software Transactional Memory
    • Day 3: In Depth
    • Wrap-Up
  • Actors excerpt
    • More Object-Oriented than Objects
    • Day 1: Messages and Mailboxes
    • Day 2: Error Handling and Resilience
    • Day 3: Distribution
    • Wrap-Up
  • Data Parallelism
  • Lambda Architecture
  • Tuple Spaces
  • Wrapping Up

About the Author

Paul Butcher has worked in diverse fields at all levels of abstraction, from microcode on bit-slice processors to high-level declarative programming, and all points in between. Paul’s experience comes from working for startups, where he’s had the privilege of collaborating with several great teams on cutting-edge technology. He is the author of Debug It!.

Upcoming Author Events

  • 2012-12-05: Bruce Tate
    Mary Poppins Meets the Matrix. A look at the languages in Seven Languages in Seven Weeks. What was going on when these languages were written, and what are the design principles that distinguish each one? Fans use discount code tate250. (London)
  • 2014-06-09: Paul Butcher
    The Parallelism and Concurrency Landscape - Where Does Erlang Fit? Developers are flocking to Erlang because of its superb support for concurrency. Erlang's actor-based approach is particularly strong, but it's not the only way. (Erlang User Conference 2014)