Here’s an introduction to distribution in Erlang. This screencast demonstrates creating three Erlang nodes on a Windows box and one on a Linux box and then connecting them using the one-liner “net_adm:ping” to form a mighty compute cluster.

Topics covered:

  • Using erl to start an Erlang node (an instance of the Erlang runtime system).
  • How to use net_adm:ping to connect four Erlang nodes (three on Windows, one on Linux).
  • Using rpc:call to RickRoll a Linux box from an Erlang node running on a Windows box.
  • Using nl to load (deploy) a module from one node to all connected nodes.

For a deeper dive into distributed Erlang here’s the official reference.

Introduction to Distributed Erlang from Bryan Hunter on Vimeo.

In 2007 when I keyed my first “HelloWorld.erl” in Notepad, I remember a general uneasiness descending over me.

I’m typing code in Notepad.
Notepad doesn’t have syntax highlighting.
Notepad doesn’t provide error squiggles.
Notepad doesn’t provide IntelliSense.
Notepad doesn’t have a “Build Solution”.
How am I supposed to set a breakpoint from Notepad?
How am I supposed to debug this stuff?
Oh, dark night of the soul! What am I getting into here!?

Well here’s an answer to at least the debugging bit…

This screencast is a simple demo of debugging (stepping through) a recursive function in an Erlang module. For grins, and to make it clear that no IDE magic is involved, the code is edited using Notepad.

Debugging in Erlang from Bryan Hunter on Vimeo.