The Road to the Generic Server
This is the most important section in the entire book, so read it once, read it twice, read it a hundred times—just make sure the message sinks in.
This section is about building abstractions; we’ll look at a
module called gen_server.erl. The gen server is one
of the most commonly used abstractions in the OTP system, but a
lot of folks never look inside gen_server.erl to
see how it works. Once you understand how the gen server was
constructed, you’ll be able to repeat the abstraction process to
build your own abstractions.
We’re going to write four little servers called
server1, server2, server3, server4, each slightly
different from the last. server4 will be similar to the gen server in the Erlang distribution. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access