title: Concurrent programming techniques, pros, cons
body: <p>There is at least three well-known approaches for creating concurrent applications:</p>
  
  <ol>
  <li><p>Multithreading and memory synchronization through locking(.NET, Java). Software Transactional Memory (<a href="http://en.wikipedia.org/wiki/Software_transactional_memory" rel="noreferrer">link text</a>) is another approach to synchronization.</p></li>
  <li><p>Asynchronous message passing (Erlang).</p></li>
  </ol>
  
  <p>I would like to learn if there are other approaches and discuss various pros and cons of these approaches applied to large distributed applications. My main focus is on simplifying life of the programmer.</p>
  
  <p>For example, in my opinion, using multiple threads is easy when there is no dependencies between them, which is pretty rare. In all other cases thread synchronization code becomes quite cumbersome and hard to debug and reason about.   </p>