Difference between revisions of "Applications and libraries/Concurrency and parallelism"

From HaskellWiki
Jump to: navigation, search
(+Bulat's Process library for concurrent streams)
(Move process stuff into OperatingSystem/Processes)
Line 1: Line 1:
== Concurrency and Paralleism ==
+
== Concurrent and Parallel Programming ==
   
Libraries (and in some cases, new runtime systems, for programming concurrent and parallel applications in Haskell).
+
Libraries and extensions for programming concurrent and parallel applications in Haskell.
   
 
;[http://haskell.org/haskellwiki/GHC/Concurrency Concurrent Haskell]
 
;[http://haskell.org/haskellwiki/GHC/Concurrency Concurrent Haskell]
Line 32: Line 32:
 
;[http://www.cs.kent.ac.uk/~cr3/HCPN/ HCPN: Haskell-Coloured Petri Nets]
 
;[http://www.cs.kent.ac.uk/~cr3/HCPN/ HCPN: Haskell-Coloured Petri Nets]
 
:Haskell-Coloured Petri Nets (HCPN) are an instance of high-level Petri Nets, in which anonymous tokens are replaced by Haskell data objects (and transitions can operate on that data, in addition to moving it around). This gives us a hybrid graphical/textual modelling formalism for Haskell, especially suited for modelling concurrent and distributed systems.
 
:Haskell-Coloured Petri Nets (HCPN) are an instance of high-level Petri Nets, in which anonymous tokens are replaced by Haskell data objects (and transitions can operate on that data, in addition to moving it around). This gives us a hybrid graphical/textual modelling formalism for Haskell, especially suited for modelling concurrent and distributed systems.
 
;[http://freearc.narod.ru/ Process]
 
:Process is a fun library for easing decomposition of algorithms to several processes, which transmit
 
intermediate data via Unix-like pipes. Each sub-process is just a function started with forkIO/forkOS with one additional parameter-pipe.
 

Revision as of 02:26, 1 April 2006

Concurrent and Parallel Programming

Libraries and extensions for programming concurrent and parallel applications in Haskell.

Concurrent Haskell
GHC has supported basic concurrency via forkIO and MVars for almost a decade.
Software Transactional Memory
Since 2005, GHC has supported a sophisticated version of software transactional memory. Software Transactional Memory (STM) is a new way to coordinate concurrent threads. STM is in GHC 6.6, and is described in the paper Composable memory transactions. The paper Lock-free data structures using Software Transactional Memory in Haskell gives further examples of concurrent programming using STM.
Multiprocessor GHC
As of version 6.5, GHC supports running programs in parallel on an SMP or multi-core machine.
GpH: Glasgow Parallel Haskell
A complete, GHC-based implementation of the parallel Haskell extension GpH and of evaluation strategies is available. Extensions of the runtime-system and language to improve performance and support new platforms are under development.
GdH: Glasgow Distributed Haskell
GdH supports distributed stateful interactions on multiple locations. It is a conservative extension of both Concurrent Haskell and GpH, enabling the distribution of the stateful IO threads of the former on the multiple locations of the latter. The programming model includes forking stateful threads on remote locations, explicit communication over channels, and distributed exception handling.
Mobile Haskell (mHaskell)
Mobile Haskell supports both strong and weak mobility of computations across open networks. The mobility primitives are higher-order polymorphic channels. Mid-level abstractions like remote evaluation, analogous to Java RMI, are readily constructed. High-level mobility skeletons like mobile map and mobile fold encapsulate common patterns of mobile computation.
Eden
Eden extends Haskell with a small set of syntactic constructs for explicit process specification and creation. While providing enough control to implement parallel algorithms efficiently, it frees the programmer from the tedious task of managing low-level details by introducing automatic communication (via head-strict lazy lists), synchronisation, and process handling.
hMPI
hMPI is an acronym for HaskellMPI. It is a Haskell binding conforming to MPI (Message Passing Interface) standard 1.1/1.2. The programmer is in full control over the communication between the nodes of a cluster.
The Haskell Ports Library (HPL)
Ports are an abstraction for modelling variables whose values evolve over time without the need to resort to mutable variable, such as IORefs. More precisely, a port represents all values that a time-dependent variable successively takes as a stream, where each element of the stream corresponds to a state change - we can also say that a port represents a time series. Moreover, a port supports concurrent construction of the time series, or stream of values.
HCPN: Haskell-Coloured Petri Nets
Haskell-Coloured Petri Nets (HCPN) are an instance of high-level Petri Nets, in which anonymous tokens are replaced by Haskell data objects (and transitions can operate on that data, in addition to moving it around). This gives us a hybrid graphical/textual modelling formalism for Haskell, especially suited for modelling concurrent and distributed systems.