Upgrade to Pro — share decks privately, control downloads, hide ads and more …

On Concurrency and Parallelism in the JVMverse

On Concurrency and Parallelism in the JVMverse

Slides for my session at JAX London 2018.

Be aware I did a lot of writing over the slides during the session do the slides are not that useful. Find the video.

Russel Winder

October 09, 2018
Tweet

More Decks by Russel Winder

Other Decks in Technology

Transcript

  1. Copyright © 2018 Russel Winder 1 On Concurrency and Parallelism

    in the JVMVerse Russel Winder @russel_winder [email protected] https://www.russel.org.uk
  2. Copyright © 2018 Russel Winder 2 The Presenter • Ex

    theoretical physicist • Ex UNIX systems programmer • Ex academic: – Parallel programming – Software development and programming – HCI, UI, UX • Ex Company director • Ex Independent consultant • Ex analyst • Ex author • Ex expert witness • Ex trainer Russel Winder
  3. Copyright © 2018 Russel Winder 3 Me at Previous JAXLondons

    • 2011 ”Just Keep Passing the Messages” • 2012 ”it’S All About Processes Communicating” Also many sessions at other conferences
  4. Copyright © 2018 Russel Winder 4 Concurrency • dictionary.com –

    concurrence – the act of concurring. – accordance in opinion; agreement: With the concurrence of several specialists, our doctor recommended surgery. – cooperation, as of agents or causes; combined action or effort. • Wikipedia – concurrency – In computer science, concurrency refers to the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, without affecting the final outcome.
  5. Copyright © 2018 Russel Winder 5 Parallelism • dictionary.com –

    parallelism – the position or relation of parallels. – agreement in direction, tendency, or character; the state or condition of being parallel. – a parallel or comparison. • Wikipedia – parallelism – Parallel computing is a type of computation in which many calculations or the execution of processes are carried out simultaneously.
  6. Copyright © 2018 Russel Winder 9 OS manages all the

    programs in one memory, eventually get virtual memory, in the mean time locks, semaphores, monitors, mutexes, and the theory of concurrency get invented.
  7. Copyright © 2018 Russel Winder 20 A Bit of Java

    History • 1995 — Java introduces threads, multithreading, monitors, synchronized, locks, etc. • 1996 — People predict lots of tears and grief. • 2002 —Doug Lea gets JSR166 moving. • 2011 — Fork/Join framework in Java 7.
  8. Copyright © 2018 Russel Winder 21 A Bit More Java

    History • 2014 — Java 8 introduces: – Lambda Expressions, – Streams, and – CompletableFuture.
  9. Copyright © 2018 Russel Winder 22 Abstract code away from

    the details of managing concurrency and parallelism.
  10. Copyright © 2018 Russel Winder 34 Summary • Gpars (Groovy)

    • Quasar • Kotlin Coroutines Can Java catch up (again).
  11. Copyright © 2018 Russel Winder 35 On Concurrency and Parallelism

    in the JVMVerse Russel Winder @russel_winder [email protected] https://www.russel.org.uk