Concurrency versus Distributed Systems

Up until recently I was a bit fuzzy on the difference between concurrency and distributed systems.  It was not until I was studying Facebook Chat, Erlang, Scala, Go, and the new python web server Tornado that it finally clicked.  Concurrency simply implies that two or more pieces of code are executing at the same time.  Distributed system are running concurrently on many different machines.

The difference is a critical when planning how to scale a system.  With simple concurrency, you can only scale a program vertically- by adding faster or more cores, installing more ram, etc.  However, a properly abstracted distributed system can be scaled horizontally – adding in more machines or nodes to the system easily by simply modifying a config file.

Scala and Erlang and Google’s new language Go share a model of concurrency based on message passing.  However, only one of these languages, Erlang, natively supports distributed systems using its message passing system.  Erlang’s native and transparent support of distributed computing is one of the reasons Facebook chose to use it for Facebook Chat. Other languages like Scala and Python require cumbersome third party libraries to support distributed computing.  Scala’s lack of native support for distributed computing is particularly interesting given that it’s concurrency model is directly based on Erlang.

So I could learn Erlang, or try to learn distributed programming in Python. It has tons of third party options for distributed programming, but as yet I don’t know which is the best.

Thoughts? Am I an idiot?

PS: Thanks to my six readers Jeff, Thor, Karan, Eric,  Rachel, and Dad for reading!

EDIT:

And Jamie (Nice blog dude! (Omegle Voyeur is hilarious))

 
 
3 Comments. Leave a comment or send a Trackback.
  1. #1 • Jeff Bain said on November 18 2009:
     

    See, this is why I like reading the blogs of my peers. Interesting things get mentioned. This is actually a pretty interesting topic, I really need to get on looking into it sometime. Everything seems to be getting massively distributed nowadays because the web 2.0 world requires so much more power.

  2. #2 • Jamie Wong said on December 1 2009:
     

    You have at least one reader not listed there. I looked around for a bunch of other SE blogs once I got to Waterloo. You have a lot of things worth reading on here.

    Good job

  3. #3 • Fad Samuel said on December 20 2009:
     

    Distributed systems also require the consideration of fault tolerance which is a non-issue on a single machine. A distributed system is expected to be functional even if one or more of the machines stop operating or behave erratically or even if one or more links between the machines drop. These are very, very hard problems to solve.

 

Comment: