Asynchronous programming (Concurrency | Parallel)
Table of Contents
1 - About
Multi-thread (Multi User) application
Asynchronous programming is notoriously difficult because the order of operations is highly unpredictable.
From a classic computing perspective, concurrent and parallel are clearly synonyms but:
- concurrency is about data structure
- and parallel is about process
Two process can run in parallel without being concurrent on any data structure.
Parallel tasking is a concurrency design
The five functions of functional programming hold a key to simplifying asynchronous programming.
2 - Model
Concurrency implementation is done:
- on a logical level through the notion of transaction.
- on a code process level through the notion of:
- or channel. No Shared State, communication using channel. See Concurrency - Communicating sequential processes (Tony Hoare’s CSP paper)
3 - Documentation / Reference
- Transactional Data Structure Libraries - Alexander Spiegelman, Guy Golan-Gueta, Idit Keidar. Transactions into libraries of concurrent data structures; such transactions can be used to ensure atomicity of sequences of data structure operations