Erlang in Practice
screencasts with Kevin Smith
Learn how to write Erlang programs by sitting next to an experienced Erlang programmer as he builds an application from the ground up. In these screencasts, Kevin Smith incrementally builds a distributed chat system using Erlang. You’ll learn first-hand how each aspect of the Erlang language fits together into a real-world application.
Throughout these 20-30 minute screencast episodes, you’ll get inside the mind of an experienced Erlang programmer: his thought processes, his development techniques, the tools he uses, and the tricks of the trade. You can follow along with each twist and turn as he adds new features and refactors existing code to shape the application over time. You’ll also see how he troubleshoots problems that crop up along the way. You’ll not only learn more about Erlang, you’ll also see ways to streamline your development workflow.
- Download and watch DRM-free episodes when and where it's convenient for you
- You get both QuickTime and iPod/iPhone formats, and Theora Ogg format for select topics
- Only $5 per episode!
Buy Now
This screencast series is still being recorded. Stay tuned for more new episodes!
Episode Contents
-
Episode 1: Sending and Receiving Chat Messages
We’ll send and receive messages between a chat client and a message router running in a single Erlang node. You’ll learn how to:
- send messages to other Erlang processes
- use a
receiveblock to receive messages from other processes - use tuples to pattern-match messages
- spawn new processes
- implement tail recursion
-
Episode 2: Messaging Clients By Nickname
We’ll create a client nickname directory using an Erlang dictionary so that clients can send messages to each other using the nickname. You’ll learn how to:
- pass function references between processes
- use a dictionary to register chat clients by nickname
- register processes with the Erlang runtime
- create anonymous functions
- refactor Erlang code
-
Episode 3: Distributing Clients In A Multi-node Environment
We’ll take the single-node chat application and distribute it across multiple Erlang nodes using distributed Erlang features. You’ll learn how to:
- set up two (or more) Erlang nodes
- use distributed Erlang to exchange messages across nodes
- use the global module with distributed locking
-
Episode 4: Storing Messages in the Mnesia Database
We’ll add store and forward capabilities for more robust messaging using the Mnesia database. You’ll learn how to:
- create Mnesia records and an Mnesia database
- store messages for offline chat clients
- query Mnesia using the QLC module
- forward stored messages to online chat clients
- delete messages in an Mnesia transaction
-
Episode 5: Unit Testing with EUnit
Testing is the cornerstone of writing software that works. In this episode, we’ll take a break from the chat system and focus on how to do test-driven development in Erlang using the EUnit testing framework. You’ll learn how to:
- get started with EUnit
- write test specifications with EUnit macros
- use EUnit test generators to add flexibility to unit tests
- set up and tear down test environments, such as server processes
- run multiple tests in batch with a test suite
- write code in a test-first style
-
Episode 6: Adding REST Support with MochiWeb
It’s time to scale our chat system out to the web! In this episode, we’ll use the MochiWeb toolkit to make our chat system available to HTTP clients using REST conventions. You’ll learn how to:
- download, build, and install Mochiweb
- write a basic Erlang web server using MochiWeb
- use Erlang’s experimental support for parameterized modules
- add REST-style endpoints to the chat system developed in previous episodes
- register, send messages, and poll for messages from HTTP clients
- take advantage of Erlang’s excellent concurrency support and inexpensive processes to scale for the masses
- Episode 7: OTP is in the recording studio and will be released on or about August 29th.
Audience
These screencasts are designed for programmers who have a general feel for Erlang syntax, although you can follow along if you know any programming language.
About the Episodic Style
Watching developers work is like getting inside their head. Just by sitting beside them as they work, you can learn a bunch of tricks to help improve your workflow. And when experts do their best work, it's usually not a linear process where everything is planned out in advance and works the first time. Building applications is more organic than that. It's like watching a series of programming episodes.
These episodes were designed to help you learn in a significantly different way than reading through the books. In fact, screencasts complement the narrative in books by showing you how it's done using elements of time and motion. Seeing is believing!
We currently have a few episodes to start the "season", and we'll release new episodes over time (generally every week or two). Source code is available for each episode, including all of the work that has been done up to that point. So, you can pop in to episodes out of order and have the code you need to get started. We don't know exactly how many episodes there will be for any given series. If you've purchased an episode in a particular screencast series, and your account is configured to receive e-mail announcements from us, we’ll send you an e-mail when new episodes are released for that series.
About the Screencaster
Kevin Smith has, at various times, been a network administrator, DBA, developer, and team lead. In 2006 he discovered Erlang and immediately wondered why more people weren’t using it. Since his discovery Kevin has been writing and blogging about Erlang at his blog. Currently, Kevin is a developer at Engine Yard where he uses his Erlang skills only for good.
