SlideShare a Scribd company logo
Copyright © 2018 Russel Winder 1
On Concurrency and Parallelism
in the JVMVerse
Russel Winder
@russel_winder
russel@winder.org.uk
https://www.russel.org.uk
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
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
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.
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.
Copyright © 2018 Russel Winder 6
Original computing:
single CPU, single program
Copyright © 2018 Russel Winder 7
Multitasking: single CPU, many programs
Copyright © 2018 Russel Winder 8
Five programs, one CPU
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.
Copyright © 2018 Russel Winder 10
Five programs, one CPU
Copyright © 2018 Russel Winder 11
Five programs, four CPUs
Copyright © 2018 Russel Winder 12
Moving from operating systems
to applications
Copyright © 2018 Russel Winder 13
One program, one task, one CPU
Copyright © 2018 Russel Winder 14
One program, four tasks, one CPU
Copyright © 2018 Russel Winder 15
One program, four tasks, four CPUs
Copyright © 2018 Russel Winder 16
One program, four tasks, four CPUs
Copyright © 2018 Russel Winder 17
Locks, mutexes, sempahores, monitors
are the enemy of parallelism
Copyright © 2018 Russel Winder 18
What is the problem…
Copyright © 2018 Russel Winder 19
Shared Memory
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.
Copyright © 2018 Russel Winder 21
A Bit More Java History
● 2014 — Java 8 introduces:
– Lambda Expressions,
– Streams, and
– CompletableFuture.
Copyright © 2018 Russel Winder 22
Abstract code away from the details of
managing concurrency and parallelism.
Copyright © 2018 Russel Winder 23
Copyright © 2018 Russel Winder 24
Pipeline
Copyright © 2018 Russel Winder 25
Dataflow
Copyright © 2018 Russel Winder 26
Actors
Copyright © 2018 Russel Winder 27
Distributed System
Copyright © 2018 Russel Winder 28
Microservices
Copyright © 2018 Russel Winder 29
Independent processes/tasks/programs
communicating by message passing
Copyright © 2018 Russel Winder 30
Data Parallel
Copyright © 2018 Russel Winder 31
Event Processing
Copyright © 2018 Russel Winder 32
One program, four tasks
Copyright © 2018 Russel Winder 33
Have we seen the code yet?
Copyright © 2018 Russel Winder 34
Summary
● Gpars (Groovy)
● Quasar
● Kotlin Coroutines
Can Java catch up (again).
Copyright © 2018 Russel Winder 35
On Concurrency and Parallelism
in the JVMVerse
Russel Winder
@russel_winder
russel@winder.org.uk
https://www.russel.org.uk

More Related Content

Similar to On Concurrency and Parallelism in the JVMverse

GPars Workshop
GPars WorkshopGPars Workshop
GPars Workshop
Russel Winder
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL Containers
Matt Lord
 
GPars 2014
GPars 2014GPars 2014
GPars 2014
Russel Winder
 
Let’s talk about reproducible data analysis
Let’s talk about reproducible data analysisLet’s talk about reproducible data analysis
Let’s talk about reproducible data analysis
Greg Landrum
 
Interactive and reproducible data analysis with the open-source KNIME Analyti...
Interactive and reproducible data analysis with the open-source KNIME Analyti...Interactive and reproducible data analysis with the open-source KNIME Analyti...
Interactive and reproducible data analysis with the open-source KNIME Analyti...
Greg Landrum
 
Career opportunities in open source framework
Career opportunities in open source frameworkCareer opportunities in open source framework
Career opportunities in open source framework
edunextgen
 
Career opportunities in open source framework
Career opportunities in open source framework Career opportunities in open source framework
Career opportunities in open source framework
edunextgen
 
Is React The Best Thing Since Sliced Bread?
Is React The Best Thing Since Sliced Bread?Is React The Best Thing Since Sliced Bread?
Is React The Best Thing Since Sliced Bread?
Synerzip
 
Federating Subversion and Git
Federating Subversion and GitFederating Subversion and Git
Federating Subversion and Git
CollabNet
 
Ongoing management of your PHP 7 application
Ongoing management of your PHP 7 applicationOngoing management of your PHP 7 application
Ongoing management of your PHP 7 application
Zend by Rogue Wave Software
 
1 introduction to linux os
1 introduction to linux os1 introduction to linux os
1 introduction to linux osSukkur IBA
 
Петро Коренєв, "Presentation state containers"
Петро Коренєв, "Presentation state containers"Петро Коренєв, "Presentation state containers"
Петро Коренєв, "Presentation state containers"
Sigma Software
 
Controller design-pattern-drupal-north-toronto-2018-final
Controller design-pattern-drupal-north-toronto-2018-finalController design-pattern-drupal-north-toronto-2018-final
Controller design-pattern-drupal-north-toronto-2018-final
Vic Tarchenko
 
Turbo Charge Software Development with Xsemble
Turbo Charge Software Development with XsembleTurbo Charge Software Development with Xsemble
Turbo Charge Software Development with Xsemble
Ashish Belagali
 
Leveraging Open Standards to Build Highly Extensible Autonomous Systems
Leveraging Open Standards to Build Highly Extensible Autonomous SystemsLeveraging Open Standards to Build Highly Extensible Autonomous Systems
Leveraging Open Standards to Build Highly Extensible Autonomous Systems
ICS
 
GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott Rigby
Weaveworks
 
Plan a successful enterprise Linux migration
Plan a successful enterprise Linux migrationPlan a successful enterprise Linux migration
Plan a successful enterprise Linux migration
Rogue Wave Software
 
Cuashi2008revisited
Cuashi2008revisitedCuashi2008revisited
Cuashi2008revisited
Riccardo Rigon
 
Android Interview Questions And Answers | Android Tutorial | Android Online T...
Android Interview Questions And Answers | Android Tutorial | Android Online T...Android Interview Questions And Answers | Android Tutorial | Android Online T...
Android Interview Questions And Answers | Android Tutorial | Android Online T...
Edureka!
 
First Line Of Defense: How contractors can become software factories to suppo...
First Line Of Defense: How contractors can become software factories to suppo...First Line Of Defense: How contractors can become software factories to suppo...
First Line Of Defense: How contractors can become software factories to suppo...
Tasktop
 

Similar to On Concurrency and Parallelism in the JVMverse (20)

GPars Workshop
GPars WorkshopGPars Workshop
GPars Workshop
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL Containers
 
GPars 2014
GPars 2014GPars 2014
GPars 2014
 
Let’s talk about reproducible data analysis
Let’s talk about reproducible data analysisLet’s talk about reproducible data analysis
Let’s talk about reproducible data analysis
 
Interactive and reproducible data analysis with the open-source KNIME Analyti...
Interactive and reproducible data analysis with the open-source KNIME Analyti...Interactive and reproducible data analysis with the open-source KNIME Analyti...
Interactive and reproducible data analysis with the open-source KNIME Analyti...
 
Career opportunities in open source framework
Career opportunities in open source frameworkCareer opportunities in open source framework
Career opportunities in open source framework
 
Career opportunities in open source framework
Career opportunities in open source framework Career opportunities in open source framework
Career opportunities in open source framework
 
Is React The Best Thing Since Sliced Bread?
Is React The Best Thing Since Sliced Bread?Is React The Best Thing Since Sliced Bread?
Is React The Best Thing Since Sliced Bread?
 
Federating Subversion and Git
Federating Subversion and GitFederating Subversion and Git
Federating Subversion and Git
 
Ongoing management of your PHP 7 application
Ongoing management of your PHP 7 applicationOngoing management of your PHP 7 application
Ongoing management of your PHP 7 application
 
1 introduction to linux os
1 introduction to linux os1 introduction to linux os
1 introduction to linux os
 
Петро Коренєв, "Presentation state containers"
Петро Коренєв, "Presentation state containers"Петро Коренєв, "Presentation state containers"
Петро Коренєв, "Presentation state containers"
 
Controller design-pattern-drupal-north-toronto-2018-final
Controller design-pattern-drupal-north-toronto-2018-finalController design-pattern-drupal-north-toronto-2018-final
Controller design-pattern-drupal-north-toronto-2018-final
 
Turbo Charge Software Development with Xsemble
Turbo Charge Software Development with XsembleTurbo Charge Software Development with Xsemble
Turbo Charge Software Development with Xsemble
 
Leveraging Open Standards to Build Highly Extensible Autonomous Systems
Leveraging Open Standards to Build Highly Extensible Autonomous SystemsLeveraging Open Standards to Build Highly Extensible Autonomous Systems
Leveraging Open Standards to Build Highly Extensible Autonomous Systems
 
GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott Rigby
 
Plan a successful enterprise Linux migration
Plan a successful enterprise Linux migrationPlan a successful enterprise Linux migration
Plan a successful enterprise Linux migration
 
Cuashi2008revisited
Cuashi2008revisitedCuashi2008revisited
Cuashi2008revisited
 
Android Interview Questions And Answers | Android Tutorial | Android Online T...
Android Interview Questions And Answers | Android Tutorial | Android Online T...Android Interview Questions And Answers | Android Tutorial | Android Online T...
Android Interview Questions And Answers | Android Tutorial | Android Online T...
 
First Line Of Defense: How contractors can become software factories to suppo...
First Line Of Defense: How contractors can become software factories to suppo...First Line Of Defense: How contractors can become software factories to suppo...
First Line Of Defense: How contractors can become software factories to suppo...
 

More from Russel Winder

On the Architectures of Microservices: the next layer
On the Architectures of Microservices: the next layerOn the Architectures of Microservices: the next layer
On the Architectures of Microservices: the next layer
Russel Winder
 
Fast Python? Don't Bother
Fast Python? Don't BotherFast Python? Don't Bother
Fast Python? Don't Bother
Russel Winder
 
Making Python computations fast
Making Python computations fastMaking Python computations fast
Making Python computations fast
Russel Winder
 
Tales from the Workshops
Tales from the WorkshopsTales from the Workshops
Tales from the Workshops
Russel Winder
 
Making Computations Execute Very Quickly
Making Computations Execute Very QuicklyMaking Computations Execute Very Quickly
Making Computations Execute Very Quickly
Russel Winder
 
Java is Dead, Long Live Ceylon, Kotlin, etc
Java is Dead,  Long Live Ceylon, Kotlin, etcJava is Dead,  Long Live Ceylon, Kotlin, etc
Java is Dead, Long Live Ceylon, Kotlin, etc
Russel Winder
 
GPars Remoting
GPars RemotingGPars Remoting
GPars Remoting
Russel Winder
 
Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.
Russel Winder
 
Spocktacular testing
Spocktacular testingSpocktacular testing
Spocktacular testing
Russel Winder
 
Spocktacular Testing
Spocktacular TestingSpocktacular Testing
Spocktacular Testing
Russel Winder
 
Is Groovy static or dynamic
Is Groovy static or dynamicIs Groovy static or dynamic
Is Groovy static or dynamic
Russel Winder
 
Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.
Russel Winder
 
Dataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you needDataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you need
Russel Winder
 
Are Go and D threats to Python
Are Go and D threats to PythonAre Go and D threats to Python
Are Go and D threats to Python
Russel Winder
 
Is Groovy as fast as Java
Is Groovy as fast as JavaIs Groovy as fast as Java
Is Groovy as fast as Java
Russel Winder
 
Who needs C++ when you have D and Go
Who needs C++ when you have D and GoWho needs C++ when you have D and Go
Who needs C++ when you have D and Go
Russel Winder
 
Java 8: a New Beginning
Java 8: a New BeginningJava 8: a New Beginning
Java 8: a New Beginning
Russel Winder
 
Why Go is an important programming language
Why Go is an important programming languageWhy Go is an important programming language
Why Go is an important programming language
Russel Winder
 
GPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for JavaGPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for Java
Russel Winder
 
GroovyFX: or how to program JavaFX easily
GroovyFX: or how to program JavaFX easily GroovyFX: or how to program JavaFX easily
GroovyFX: or how to program JavaFX easily
Russel Winder
 

More from Russel Winder (20)

On the Architectures of Microservices: the next layer
On the Architectures of Microservices: the next layerOn the Architectures of Microservices: the next layer
On the Architectures of Microservices: the next layer
 
Fast Python? Don't Bother
Fast Python? Don't BotherFast Python? Don't Bother
Fast Python? Don't Bother
 
Making Python computations fast
Making Python computations fastMaking Python computations fast
Making Python computations fast
 
Tales from the Workshops
Tales from the WorkshopsTales from the Workshops
Tales from the Workshops
 
Making Computations Execute Very Quickly
Making Computations Execute Very QuicklyMaking Computations Execute Very Quickly
Making Computations Execute Very Quickly
 
Java is Dead, Long Live Ceylon, Kotlin, etc
Java is Dead,  Long Live Ceylon, Kotlin, etcJava is Dead,  Long Live Ceylon, Kotlin, etc
Java is Dead, Long Live Ceylon, Kotlin, etc
 
GPars Remoting
GPars RemotingGPars Remoting
GPars Remoting
 
Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.
 
Spocktacular testing
Spocktacular testingSpocktacular testing
Spocktacular testing
 
Spocktacular Testing
Spocktacular TestingSpocktacular Testing
Spocktacular Testing
 
Is Groovy static or dynamic
Is Groovy static or dynamicIs Groovy static or dynamic
Is Groovy static or dynamic
 
Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.
 
Dataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you needDataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you need
 
Are Go and D threats to Python
Are Go and D threats to PythonAre Go and D threats to Python
Are Go and D threats to Python
 
Is Groovy as fast as Java
Is Groovy as fast as JavaIs Groovy as fast as Java
Is Groovy as fast as Java
 
Who needs C++ when you have D and Go
Who needs C++ when you have D and GoWho needs C++ when you have D and Go
Who needs C++ when you have D and Go
 
Java 8: a New Beginning
Java 8: a New BeginningJava 8: a New Beginning
Java 8: a New Beginning
 
Why Go is an important programming language
Why Go is an important programming languageWhy Go is an important programming language
Why Go is an important programming language
 
GPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for JavaGPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for Java
 
GroovyFX: or how to program JavaFX easily
GroovyFX: or how to program JavaFX easily GroovyFX: or how to program JavaFX easily
GroovyFX: or how to program JavaFX easily
 

Recently uploaded

OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 

Recently uploaded (20)

OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 

On Concurrency and Parallelism in the JVMverse

  • 1. Copyright © 2018 Russel Winder 1 On Concurrency and Parallelism in the JVMVerse Russel Winder @russel_winder russel@winder.org.uk 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 6 Original computing: single CPU, single program
  • 7. Copyright © 2018 Russel Winder 7 Multitasking: single CPU, many programs
  • 8. Copyright © 2018 Russel Winder 8 Five programs, one CPU
  • 9. 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.
  • 10. Copyright © 2018 Russel Winder 10 Five programs, one CPU
  • 11. Copyright © 2018 Russel Winder 11 Five programs, four CPUs
  • 12. Copyright © 2018 Russel Winder 12 Moving from operating systems to applications
  • 13. Copyright © 2018 Russel Winder 13 One program, one task, one CPU
  • 14. Copyright © 2018 Russel Winder 14 One program, four tasks, one CPU
  • 15. Copyright © 2018 Russel Winder 15 One program, four tasks, four CPUs
  • 16. Copyright © 2018 Russel Winder 16 One program, four tasks, four CPUs
  • 17. Copyright © 2018 Russel Winder 17 Locks, mutexes, sempahores, monitors are the enemy of parallelism
  • 18. Copyright © 2018 Russel Winder 18 What is the problem…
  • 19. Copyright © 2018 Russel Winder 19 Shared Memory
  • 20. 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.
  • 21. Copyright © 2018 Russel Winder 21 A Bit More Java History ● 2014 — Java 8 introduces: – Lambda Expressions, – Streams, and – CompletableFuture.
  • 22. Copyright © 2018 Russel Winder 22 Abstract code away from the details of managing concurrency and parallelism.
  • 23. Copyright © 2018 Russel Winder 23
  • 24. Copyright © 2018 Russel Winder 24 Pipeline
  • 25. Copyright © 2018 Russel Winder 25 Dataflow
  • 26. Copyright © 2018 Russel Winder 26 Actors
  • 27. Copyright © 2018 Russel Winder 27 Distributed System
  • 28. Copyright © 2018 Russel Winder 28 Microservices
  • 29. Copyright © 2018 Russel Winder 29 Independent processes/tasks/programs communicating by message passing
  • 30. Copyright © 2018 Russel Winder 30 Data Parallel
  • 31. Copyright © 2018 Russel Winder 31 Event Processing
  • 32. Copyright © 2018 Russel Winder 32 One program, four tasks
  • 33. Copyright © 2018 Russel Winder 33 Have we seen the code yet?
  • 34. Copyright © 2018 Russel Winder 34 Summary ● Gpars (Groovy) ● Quasar ● Kotlin Coroutines Can Java catch up (again).
  • 35. Copyright © 2018 Russel Winder 35 On Concurrency and Parallelism in the JVMVerse Russel Winder @russel_winder russel@winder.org.uk https://www.russel.org.uk