On Mon, Jul 23, 2012 at 3:07 AM, Russel Winder <[email protected]> wrote:

> java.concurrent.util is showing more and more high-level features as
> Doug et al. work them in, but the problem remains that most Java
> programmers still think shared-memory multi-threading is the way to code
> up parallel algorithms.
>

To be fair, there is nothing running on the JVM today showing that this is
wrong. All the alternate solutions fail on one of these criteria while
java.concurrent.util meets them all:

   - Proven track record of scaling to very high loads and used in many,
   many very high traffic sites (starting with Google). And by that, I don't
   just mean that "company X says they are using language Y", which means very
   little, but that this code actually powers the monumental traffic that
   these sites support.

   - Performance coming directly from the mutable aspect. A lot of the
   immutable approaches to concurrency will use, by definition, more memory
   and generate more garbage collector pressure, which is often the bottle
   neck in these high load applications.

   - Easy to reason about. Yes, I claim that understanding errors that
   arise because of multithreaded mutable code is really not that difficult.
   It's also easy to solve (albeit admittedly harder to solve optimally).
   Alternatives offered by actors or asynchronous solutions don't have some
   problems that mutable code has but they certainly have plenty others
   (starting by the difficulty of tracing fully asynchronous code to create a
   reproducible test case).

   - Very mature and powerful tools. Eclipse will even show you who holds a
   lock to what in the stack frame.

java.concurrent.util has set the bar very high and so far, I remain
unconvinced that any other technology is even close to being able to
perform as well on all these criteria.

-- 
Cédric

-- 
You received this message because you are subscribed to the Google Groups "Java 
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to