Linux Appliance Design (Book Review)
By Ben Okopnik
LINAPPDSGN.RVW 20070429 ================ %A Bob Smith %A John Hardin %A Graham Phillips %A Bill Pierce %C San Francisco CA %D 2007 %G 978-1-59327-140-4 %I NoStarch Press %O http://www.nostarch.com/appliance.htm %P 356 pages %T "Linux Appliance Design: A Hands-On Guide to Building Linux Appliances"
Introduction
Size sells. Lots of words - even when those words obscure the new and interesting material in the presentation, even when they frustrate the reader who is looking for the kernel of knowledge and truth - are what people buy, and are consequently what publishers strive to produce. As a result, this book - which would have made an excellent introduction to its stated subject if it had been trimmed to half or a third of its length - can be quite a slog for anyone unfamiliar with the subject. Please note that I do not blame the authors: in my experience, technical people rarely make good writers, and often have trouble seeing the forest for the fascinating details of the microsopic striations on the surface of a particular blade of grass. It is the editor's job to rescue the gem of meaning out of the extraneous verbiage and the hyperfocusing on details that bog down the progress and clog the machinery of understanding. In the execution of this book - and I will leave the interpetation of the precise shading of that word to the reader - the editors have failed in that job, thus leaving the content buried and accessible only to those who are willing to dig, refine, and mentally revise for themselves.
If there is any failure on the authors' part, it is an omission that stems directly from the above, and could have been corrected by a note from the editors: there is a distinct absence of the "author's voice", a perspective that is necessary for anyone who wishes to explore and understand a new field. A smart and capable reader, especially one with a broad range of knowledge in related topics, should be able to wrestle his way through and extract the meaning from the details, but it is a struggle that could have been prevented with a little effort. By the same token, the book seems to focus on a "here's what we did, you can too" approach rather than a considered analysis of the possibilities and why certain choices work better than others; this, too, could have been cured by a discussion between editors and authors. Finally, the illustrations in the book are... well, not illustrative (an unfortunately-common fault in much technical literature these days). With a few exceptions, they do not illuminate anything that is not perceivable in the text, expose no new structure; essentially, they're more "space filler" than perspective. This is sad, given the above-mentioned absence of perspective; that job could have been done better.
Having said all of the above - if you're already a programmer, a Linux user, and are reasonably familiar with printed circuit board design, soldering irons, flux, and integrated circuit handling, this book can be a fun day's read, especially if you've been itching to build a multi-armed whatchamacallit, thingamajig, or gilliwillikin with infrared sensors and miniature tank treads. In fact, it bears a strong resemblance to a design engineer's project diary: "I tried this, it didn't work, so I tried that. It worked fine after I bent the FM antenna into a corkscrew shape and removed the dried-up cockroach between R12 and Q17." Frankly, as a personal preference - as opposed to a position I need to take as a reviewer - it's the kind of book I prefer when I want to tinker with a new concept or to build an experimental project. In a way, it reminds me of the Forest Mims' "Engineer's Mini Notebooks" that Radio Shack used to sell; they were lots of fun, provided you were willing to try again and again until you got it right (and oh, the joy when the lights finally came on or the propeller started spinning!). This was great amusement for a kid whose main hobby was experimenting with electronics... but not necessarily what you'd want, if you were a professional looking for definitive answers.
Details
Table of Contents |
1. Appliance Architecture |
2. Managing Daemons |
3. Using Run-Time Access |
4. Building and Securing Daemons |
5. The Laddie Alarm System: A Sample Appliance |
6. Logging |
7. Laddie Event Handling |
8. Designing a Web Interface |
9. Designing a Command Line Interface |
10. Designing a Front Panel Interface |
11. Designing a Framebuffer Interface |
12. Infared Remote Control |
13. Hands-On Introduction to SNMP |
14. Designing Your SNMP MIB |
15. Implementing Your SNMP MIB |
A. RTA Reference |
B. A Review of SNMP |
C. Installing a Framebuffer Device Driver |
D. A DB-to-File Utility |
E. The Laddie Appliance Bootable CD |
The book is laid out in reasonable order, and will guide the would-be appliance designer or programmer through the entire process. It includes many digressions into areas that aren't properly part of appliance design - e.g., writing secure daemons - but it does get to the point eventually. In chapter 5, which is the actual "meat" of this book, we get to see the unfolding of the sample project step-by-step - something that, by contrast to the rest of the book, should have been expanded.
One of the things that the authors got right, in my opinion, is their strong insistence on the modular design and construction of any project. This also feeds into and supports their position on code re-use - it's much better to leave the specifics of, e.g., the HTTP protocol to the people who are experts at it (for example, using 'libhttp' rather than writing your own library from scratch). Amusingly enough, they didn't follow their own advice in writing this book: in many areas that would have been better served by a simple reference to the relevant book, protocol description, or RFC, the authors went in for an exhaustive treatise on the subject (e.g., their repeated side trips into the miserable mess known as SNMP).
There's a reasonable amount of discussion related to the output methods at the beginning of the book... which is, bewilderingly, essentially repeated later on, this time with even more discussion of the pertinent issues. Back-end daemons, user interfaces, and connection methods are discussed and rehashed, over and over again; front panels, Web servers, text-mode/framebuffer output, infared control, SNMP, and warnings against XML are liberally scattered and appear, again and again, throughout. At times, it feels like being stuck in an endless loop - "did I just accidentally flip back a chapter or two?" Keeping good mental notes - or even paper ones - while reading this book may be a good idea.
Again, I may be a bit oversensitive to editorial issues, being an editor myself. However, every time I think that it may just be me climbing on my favorite hobbyhorse, I recall literally hundreds of books written by professionals in their fields - e.g., Bruce Schneier's Beyond Fear, Strunk and White's Elements of Style, Kernighan and Pike's The Practice of Programming immediately come to mind. Incisive, clear, intensely-concentrated, solid material that introduces its subject, treats it with perspective, focus, and precision, then draws interesting, educational conclusions at the end, and leaves you with a sharp perception of the authors' professionalism. They also provide good reference material for later; I think of these books as old friends that can be pulled down from the shelf for just that one missing bit of info. Call me a cranky old geek, but, as a teacher and technical professional, I believe that there's little that is new under the sun in regard to the learning methods for the human animal - and I believe that technical books should follow that old, well-working pattern. The rarity of such books is, perhaps, one of the reasons for the preponderance of cranky old geeks....
Conclusion
It may be that this book was written for the hobbyist/experimenter, or it could be that I found the title a bit misleading, and am therefore judging it for not fitting into a slot into which it was never meant to go. If so, the suggested price of $59.95 makes it somewhat of a "betwixt and between": it's a bit steep for a casual, "fun" book - and the material suffers from a few problems too many for professional material. On the other hand, if you've got a desire to tinker and a few extra bucks in your pocket, or if you already know the field but would like a step-by-step walkthrough of a project, this one isn't a bad choice. Again, if you wanted a single source for Linux appliance design, and were willing to chase down the missing bits, or just wanted to focus on the fine details of a specific, working implementation, this book has much to recommend itself. As for me - in technical material, at least - I prefer targeted, tightly-written books that explore their specific subject in depth and provide pointers to avenues for further exploration. This book isn't bad - but it does not fit that definition.
Talkback: Discuss this article with The Answer Gang
Ben is the Editor-in-Chief for Linux Gazette and a member of The Answer Gang.
Ben was born in Moscow, Russia in 1962. He became interested in electricity at the tender age of six, promptly demonstrated it by sticking a fork into a socket and starting a fire, and has been falling down technological mineshafts ever since. He has been working with computers since the Elder Days, when they had to be built by soldering parts onto printed circuit boards and programs had to fit into 4k of memory. He would gladly pay good money to any psychologist who can cure him of the recurrent nightmares.
His subsequent experiences include creating software in nearly a dozen languages, network and database maintenance during the approach of a hurricane, and writing articles for publications ranging from sailing magazines to technological journals. After a seven-year Atlantic/Caribbean cruise under sail and passages up and down the East coast of the US, he is currently anchored in St. Augustine, Florida. He works as a technical instructor for Sun Microsystems and a private Open Source consultant/Web developer. His current set of hobbies includes flying, yoga, martial arts, motorcycles, writing, and Roman history; his Palm Pilot is crammed full of alarms, many of which contain exclamation points.
He has been working with Linux since 1997, and credits it with his complete loss of interest in waging nuclear warfare on parts of the Pacific Northwest.