130 likes | 305 Views
Concurrent Programming and Languages. Behrooz Nobakht. Approaches. Actor Model Software Transactional Memory Data Flow Programming . Actor Model. Actor: an autonomous and concurrent entity sending “messages” In response to a “message”, an actor may
E N D
Concurrent Programming and Languages BehroozNobakht
Approaches • Actor Model • Software Transactional Memory • Data Flow Programming
Actor Model • Actor: an autonomous and concurrent entity sending “messages” • In response to a “message”, an actor may • Send an finite set of messages to known actors • Create a finite set of new actors • Define how it will respond to future messages
Software Transactional Memory • Translating sequential object implementation to concurrent non-blocking ones • Transaction: a finite sequence of local and shared memory machine instructions • The illusion: Isolation and Atomicity • A shared object plays the role of an STM.
Data Flow Programming • Divide, conquer, merge the processing data • MapReduce • Map: map incoming data to intermediate results • Reduce: merge intermediate results to final results • Specialized File System
Java: Task Relevant: Killim, Clojure
Scala: Actors Similars: Erlang, ActorFoundry, Jetlang
Multiverse STM on Groovy/Java
Hadoop Map/Reduce
All-in-ones GPars • Based on Groovy and Java • Parallel Collection Functions • Data Flows and MapReduce • Actors • forkIO and Mvars • STM • Foreign Function Interface • Nested Data Parallelism Haskell
Hybrid Solutions Akka • Actors and Remote Actors • STM • Transactors: Transactional Actors • Message Passing Interface • Distributed Memory • C, C++, Fortran, Boost Library MPI