[Erlang] Functional Programming in Erlang (University of Kent) (free)

Concurrency means the possibility of running independently perhaps at the same time.

The Concurrent Programming in Erlang course will remain open for free until 2017-May-08.

The course is primarily about working with message-passing-based concurrency and for the most part was taught in terms of the raw concurrency primitives . But ultimately all this exposure at the lower level was designed to persuade the participants to actually (continue to) work with OTP instead.

The first course focused on “the functional Way” while this course focused on “the message-passing concurrent Way”. As with the first course the topics operated with a very compact core set of Erlang features that really should not present much difficultly to a practicing Elixir developer (as long as one is a bit open minded about it being different) - if one wishes to get a sense of “the Way”.
(I’m not expecting these courses to be remastered for Elixir - as it really isn’t necessary).

The Frequency Server from Erlang Programming serves as the teaching vehicle for most of the course. (The Frequency Server also makes an appearance in Designing for Scalability with Erlang/OTP). The final exercise is to convert it to a version that is based on OTP’s gen_server.

The first week revolved around sequential vs. concurrent code, introducing the spawn, ! (send), self and receive concurrency primitives and some of the operational details of a process’s mailbox. Shortly after that the frequency server was introduced as the basis for a peer-reviewed assignment - timeouts were to be added for the purpose of preventing receive deadlocks and purging stale messages.

The second week covered a selection of fault tolerance topics leading with the introduction of the “Let it fail” design philosophy which segued into a treatment of process links, exit signals, and exit trapping which was capped off by an exercise to add exit signal handling to the frequency server to certain effect. The week’s topics then continued with supervision which lead to the assignment of introducing a supervisor process to the frequency server. This was then followed by a number of exception handling topics. Possible scenarios leading to race conditions were alluded to and finally the topic of hot code reloading was introduced and demonstrated with an exercise.

The third week lead with some overview of scaling and distribution topics before getting to “separating the generic from the specific” as an introduction to OTP. After the frequency server as a gen_server exercise, miscellaneous Erlang features like macros, records, maps and binaries were given a quick introductory overview followed by an overview of some of the more commonly used tools in the Erlang ecosystem.

The weekly feedback videos are available on YouTube:
Concurrent Programming in Erlang: week 1 feedback
Concurrent programming in Erlang: week 2 feedback
Concurrent programming in Erlang: week 3 feedback

There are plans to potentially add a third course focusing on OTP by the end of the year; presumably about design strategies and real product “war stories”.

5 Likes