Videos tagged with Erlang in Practice
In this final episode, we’ll focus on two mechanisms that OTP provides to manage the lifecycle of processes in an application: supervisor and application behaviors. We’ll write a Web Supervisor and a Messaging Supervisor to manage those subsystems, and then layer another meta-supervisor on top to manage the entire chat system. You’ll learn how to: implement an OTP Supervisor b...
Erlang in Practice Episode 7: Writing Servers with gen_server
In the first half of this episode, we’ll learn how to write Erlang server processes using gen_server, a module in the OTP library. Then, in the second half of this episode, we’ll put what we learned into practice by incrementally refactoring two of our home-grown servers to use gen_server. As a result, you’ll be able to immediately apply gen_server to your next Erlang server p...
Erlang in Practice 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 ch...
Erlang in Practice 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 envi...
Erlang in Practice 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
Erlang in Practice 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
Erlang in Practice 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
Erlang in Practice 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 receive block to receive messages from other processes use tuples to pattern-match messages spawn new processes implement tail recursion
Erlang in Practice: Application preview
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, yo...