Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Preface > How to Read This Book

P2.4. How to Read This Book

We wrote this book in two parts, the first to be read sequentially and the second can be read concurrently (or sequentially in whatever order you like), as the chapters are independent of each other.

The first 11 chapters of the book cover the core parts of Erlang:

  • Chapter 1 gives a high-level introduction to the language, covering its key features for building high-availability, robust concurrent systems. In doing this, we also describe how Erlang came to be the way it is, and point out some of its high-profile success stories, which explain why you may want to adopt Erlang in one of your projects.

  • The basics of sequential programming in Erlang are the subject of Chapters Chapter 2 and Chapter 3. In these chapters, we cover the central role of recursion in writing Erlang programs, as well as how single assignment in Erlang is quite different from the way variables are handled in other languages, such as C and Java.

  • While covering sequential programming, we also introduce the basic data types of Erlang—numbers, atoms, strings, lists, and tuples—comparing them with similar types in other languages. Other types are covered later: records in Chapter 7, and function types and binaries in Chapter 9. Large-scale storage in ETS tables is the topic of Chapter 10.

  • Erlang’s distinctiveness comes to the fore in Chapters Chapter 4Chapter 6, which together cover the concurrent aspects of Erlang, embodied in message passing communication between concurrently executing processes running in separate memory spaces.

  • It is possible to “hot-swap” code in a system, supporting software upgrades in running systems: this is the topic of Chapter 8.

  • To conclude this part of the book, we cover distributed programming in Chapter 11. This allows different Erlang runtime systems (or nodes), which might be running on the same or different machines, to work together and interact as a distributed system.

In the remaining chapters, we cover a variety of different topics largely independent of each other. These include the following:

  • The Open Telecom Platform (OTP) gives a set of libraries and design principles supporting the construction of robust, scalable systems in Erlang; this is the subject of Chapter 12.

  • The Erlang distribution contains some standard computing applications: we cover the Mnesia database in Chapter 13 and the wxErlang GUI programming library in Chapter 14.

  • Erlang distribution gives one mechanism for linking Erlang systems to each other. Chapter 15 shows how Erlang supports programming across the Internet using sockets, and Chapter 16 covers the various ways in which Erlang can interwork with systems written in C, Java, and Ruby, as well as many other languages.

  • The standard Erlang distribution comes with a number of very useful tools, and we cover some of these next. Chapter 17 explains in depth how all aspects of Erlang systems can be traced without degrading their performance, and Chapter 18 covers tools for checking the correctness of programs, and for constructing documentation for Erlang systems. Unit testing, and how it is supported by EUnit, is the subject of Chapter 19.

  • The last chapter, Chapter 20, looks at how to write programs that are elegant, readable, and efficient, and pulls together into one place much of the accumulated experience of the Erlang community.

The Appendix A covers how to get started with Erlang, how to use the Erlang shell, popular tools for Erlang, and how to find out more about Erlang.

Each chapter is accompanied by a set of exercises, and you can download all the code in this book from its website:

http://www.erlangprogramming.org

The website also has references to further reading as well as links to the major sites supporting the Erlang community.

We wrote this book to be compatible with Erlang Release 13 (R13-B). Most of the features we describe will work with earlier releases; known incompatibilities with more recent earlier releases are detailed on our website.