Overview of the Implementation
All the code for Sherlock is stored in the
code/sherlock
directory in the code available from the
book’s
home page.[46]
This section provides a high-level overview of the
implementation.
The main stages in processing are as follows:
- Initializing the data store
-
sherlock_mail:ensure_mail_root/0
is called at the very beginning. This routine ensures that the directory${HOME}/.sherlock
exists. We’re going to store all data under a directory called${HOME}/.sherlock/mails
; we’ll call this directoryMAIL
in the following text. - Fetching the mail index
-
The first step is to fetch the data at http://erlang.org/pipermail/erlang-questions/. This is done using the
inets
HTTP client, which is part of the Erlang distribution. ...
Get Programming Erlang, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.