Lecture 10: Some Other Approaches to Concurrency

Title slide

Today’s lecture set out some alternative approaches for managing concurrency in programming languages: asynchronous message-passing Actors and the always-upbeat optimistic concurrency of Software Transactional Memory. These are two examples from a wide range of mechanisms in use across many programming languages and applications domains, all of which seek to balance the key concurrency requirements of separation to prevent inconsistency and co-operation to allow interaction.

Links: Slides for Lecture 10; Audio recording (may require Flash)

Homework

1. Read these

The Go language provides concurrent goroutines and named channels for communication between them. Read these two articles about this.

If you are interested to find out more, then try these two video talks by Rob Pike.

You can also see more code details in the following.

2. Do this

Who uses Erlang? What do they do with it?

  • Read up about Erlang, its use of actors, supervision, and live code replacement.
  • Find an example of some software / a system / a service / a company that uses the language and where someone has written about that.
  • Post the example to the mailing list or Piazza.

I’m collating examples below.

Title slide Erlang and First-Person Shooters
10s of millions of Call of Duty Black Ops fans loadtest Erlang
Malcolm Dowse, Demonware
Presentation at Erlang Factory, London 2011
Links: Overview; Slides; Erlang Factory
Picture from linked article Inside Erlang, The Rare Programming Language Behind WhatsApp’s Success.
Ainsley O’Connell
Fast Company, February 2014.
 
Link: Article

References

Screenshot What is Scala?
Martin Odersky
 
Link: Article
Akka logo Akka
 
Actor-style concurrency for Scala, with message-passing and supervision trees.
 
Link: Home page
Cover page Practical Lock-Freedom
Keir Fraser
PhD thesis, 2004. Technical report 579, University of Cambridge Computer Laboratory.
Links: Report; More on lock-freedom
Screenshot Clojure STM — What? Why? How?
Neale Swinnerton (sw1nn), November 2012
 
Article explaining software transactional memory in Clojure with dosync and ref.
 
Link: Article
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s