• Complain

Venkat Subramaniam - Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors

Here you can read online Venkat Subramaniam - Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2011, publisher: Pragmatic Bookshelf, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Venkat Subramaniam Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors
  • Book:
    Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors
  • Author:
  • Publisher:
    Pragmatic Bookshelf
  • Genre:
  • Year:
    2011
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

More than ever, learning to program concurrency is critical to creating faster, responsive applications. Speedy and affordable multicore hardware is driving the demand for high-performing applications, and you can leverage the Java platform to bring these applications to life. Concurrency on the Java platform has evolved, from the synchronization model of JDK to software transactional memory (STM) and actor-based concurrency. This book is the first to show you all these concurrency styles so you can compare and choose what works best for your applications. Youll learn the benefits of each of these models, when and how to use them, and what their limitations are. Through hands-on exercises, youll learn how to avoid shared mutable state and how to write good, elegant, explicit synchronization-free programs so you can create easy and safe concurrent applications. The techniques you learn in this book will take you from dreading concurrency to mastering and enjoying it. Best of all, you can work with Java or a JVM language of your choice - Clojure, JRuby, Groovy, or Scala - to reap the growing power of multicore hardware. If you are a Java programmer, youd need JDK 1.5 or later and the Akka 1.0 library. In addition, if you program in Scala, Clojure, Groovy or JRuby youd need the latest version of your preferred language. Groovy programmers will also need GPars.

Venkat Subramaniam: author's other books


Who wrote Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors? Find out the surname, the name of the author of the book and a list of all author's works by series.

Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Programming Concurrency on the JVM Mastering Synchronization STM and Actors - photo 1
Programming Concurrency on the JVM
Mastering Synchronization, STM, and Actors
by Venkat Subramaniam
Version: P1.0 (August 2011)
Copyright 2011 Pragmatic Programmers, LLC. This book is licensed tothe individual who purchased it. We don't copy-protect itbecause that would limit your ability to use it for yourown purposes. Please don't break this trust-don't allow othersto use your copy of the book. Thanks.
- Dave & Andy.

To Mom and Dad, for teaching the values of integrity, honesty, and diligence.

Table of Contents
  • STM in Clojure, Groovy,
    Java, JRuby, and Scala
Copyright 2011, The Pragmatic Bookshelf.
What Readers Are Saying About Programming Concurrency on the JVM

An excellent book! Venkat skillfully leads us through the many design and implementation decisions that todays JVM developer faces in multithreaded programming. His easy-to-read style and the many examples he providesusing a variety of current open source tools and JVM languagesmake this complex topic very approachable.

Albert Scherer
Manager, eCommerce Technologies, Follett Higher Education Group, Inc.

If the JVM is your platform of choice, then this book is an absolute must-read. Buy it, read it, and then buy a copy for all your team members. You will well be on your way to finding a good solution to concurrency issues.

Raju Gandhi
Senior consultant, Integrallis Software, LLC

Extremely thorough coverage of a critically important topic.

Chris Richardson
Author of POJOS in Action and Founder, CloudFoundry.com

There has been an explosion of interest and application for both new concurrency models and new languages on the JVM. Venkats book ties it all together and shows the working developer how to structure their application and get the most out of existing libraries, even if they were built in a different language. This book is the natural successor to Java Concurrency in Practice .

Alex Miller
Architect/Senior Engineer, Revelytix, Inc.

I found Programming Concurrency akin to sitting under a master craftsman imparting wisdom to his apprentice. The reader is guided on a journey that starts with the why of concurrency and the big-picture design issues that hell face. Hes then taught the modern concurrency tools provided directly within the Java SDK before embarking upon an adventure through the exciting realms of STM and actors. I sincerely believe that this book is destined to be one of the most important concurrency books yet written. Venkat has done it again!

Matt Stine
Technical Architect, AutoZone, Inc.

Concurrency is a hot topic these days, and Venkat takes you through a wide range of current techniques and technologies to program concurrency effectively on the JVM. More importantly, by comparing and contrasting concurrency approaches in five different JVM languages, you get a better picture of the capabilities of various tools you can use. This book will definitely expand your knowledge and toolbox for dealing with concurrency.

Scott Leberknight
Chief Architect, Near Infinity Corporation

Preface

Speed. Aside from caffeine, nothing quickens the pulse of a programmer as much as the blazingly fast execution of a piece of code.How can we fulfill the need for computational speed? Moores law takes us some of the way, but multicore is the real future. To take full advantage of multicore, we need to program with concurrency in mind.

In a concurrent program, two or more actions take place simultaneously. A concurrent program may download multiple files while performing computations and updating the database. We often write concurrent programs using threads in Java. Multithreading on the Java Virtual Machine (JVM) has been around from the beginning, but how we program concurrency is still evolving, as well learn in this book.

The hard part is reaping the benefits of concurrency without being burned. Starting threads is easy, but their execution sequence is nondeterministic. Were soon drawn into a battle to coordinate threads and ensure theyre handling data consistently.

To get from point A to point B quickly, we have several options, based on how critical the travel time is, the availability of transport, the budget, and so on. We can walk, take the bus, drive that pimped-up convertible, take a bullet train, or fly on a jet. In writing Java for speed, weve also got choices.

There are three prominent options for concurrency on the JVM:

  • What I call the synchronize and suffer model

  • The Software-Transactional Memory model

  • The actor-based concurrency model

I call the familiar Java Development Kit (JDK) synchronization model synchronize and suffer because the results are unpredictable if we forget to synchronize shared mutable state or synchronize it at the wrong level. If were lucky, we catch the problems during development; if we miss, it can come out in odd and unfortunate ways during production. We get no compilation errors, no warning, and simply no sign of trouble with that ill-fated code.

Programs that fail to synchronize access to shared mutable state are broken, but the Java compiler wont tell us that. Programming with mutability in pure Java is like working with the mother-in-law whos just waiting for you to fail. Im sure youve felt the pain.

There are three ways to avoid problems when writing concurrent programs:

  • Synchronize properly.

  • Dont share state.

  • Dont mutate state.

If we use the modern JDK concurrency API, well have to put in significant effort to synchronize properly. STM makes synchronization implicit and greatly reduces the chances of errors. The actor-based model, on the other hand, helps us avoid shared state. Avoiding mutable state is the secret weapon to winning concurrency battles.

In this book, well take an example-driven approach to learn the three models and how to exploit concurrency with them.

Whos This Book For?

Ive written this book for experienced Java programmers who are interested in learning how to manage and make use of concurrency on the JVM, using languages such as Java, Clojure, Groovy, JRuby, and Scala.

If youre new to Java, this book will not help you learn the basics of Java. There are several good books that teach the fundamentals of Java programming, and you should make use of them.

If you have fairly good programming experience on the JVM but find yourself needing material that will help further your practical understanding of programming concurrency, this book is for you.

If youre interested only in the solutions directly provided in Java and the JDKJava threading and the concurrency libraryI refer you to two very good books already on the market that focus on that: Brian Goetzs Java Concurrency in Practice [Goe06] and Doug Leas Concurrent Programming in Java [Lea00]. Those two books provide a wealth of information on the Java Memory Model and how to ensure thread safety and consistency.

My focus in this book is to help you use, but also move beyond, the solutions provided directly in the JDK to solve some practical concurrency problems. You will learn about some third-party Java libraries that help you work easily with isolated mutability. You will also learn to use libraries that reduce complexity and error by eliminating explicit locks.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors»

Look at similar books to Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors»

Discussion, reviews of the book Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.