actor model software transactional memory data flow programming

13
Concurrent Programming and Languages Behrooz Nobakht

Upload: suzanna-golden

Post on 28-Dec-2015

227 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Actor Model  Software Transactional Memory  Data Flow Programming

Concurrent Programming and Languages

Behrooz Nobakht

Page 2: Actor Model  Software Transactional Memory  Data Flow Programming

Approaches

Actor Model Software Transactional Memory Data Flow Programming

Page 3: 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

Page 4: Actor Model  Software Transactional Memory  Data Flow Programming

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.

Page 5: Actor Model  Software Transactional Memory  Data Flow Programming

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

Page 6: Actor Model  Software Transactional Memory  Data Flow Programming

Languages and Libraries

Page 7: Actor Model  Software Transactional Memory  Data Flow Programming

JAVA

: TAS

K Relevant: Killim, Clojure

Page 8: Actor Model  Software Transactional Memory  Data Flow Programming

JAVA

: EX

EC

UTO

R S

ER

VIC

E

Page 9: Actor Model  Software Transactional Memory  Data Flow Programming

SC

ALA

: AC

TO

RS Similars: Erlang, ActorFoundry, Jetlang

Page 10: Actor Model  Software Transactional Memory  Data Flow Programming

MU

LTIV

ER

SE STM on Groovy/Java

Page 11: Actor Model  Software Transactional Memory  Data Flow Programming

HA

DO

OP Map/Reduce

Page 12: Actor Model  Software Transactional Memory  Data Flow Programming

All-in

-on

es

GPa

rsH

aske

ll

Based on Groovy and Java Parallel Collection Functions Data Flows and MapReduce Actors

forkIO and Mvars STM Foreign Function Interface Nested Data Parallelism

Page 13: Actor Model  Software Transactional Memory  Data Flow Programming

Hyb

rid S

olu

tion

s

Akka

MPI

Actors and Remote Actors STM Transactors: Transactional Actors

Message Passing Interface Distributed Memory C, C++, Fortran, Boost Library