Building the Web of Things
Dominique D. Guinard Vlad M. Trifa
Copyright
For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact
Special Sales Department Manning Publications Co. 20 Baldwin Road PO Box 761 Shelter Island, NY 11964 Email:
orders@manning.com2016 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps.
Recognizing the importance of preserving what has been written, it is Mannings policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without elemental chlorine.
| Manning Publications Co.20 Baldwin RoadPO Box 761Shelter Island, NY 11964 |
Development editor: Lesley TritesTechnical development editor: Scott ChausseCopyeditor: Linda RecktenwaldProofreader: Melody DolabTechnical proofreader: Valentin CrettazTypesetter: Marija TudorCover designer: Leslie Haimes
ISBN: 9781617292682
Printed in the United States of America
1 2 3 4 5 6 7 8 9 10 EBM 21 20 19 18 17 16
Brief Table of Contents
Table of Contents
Preface
Our biggest hope with this book is that weve done a good job of providing you with a deep overview of what the future of the Internet of Things (IoT) might look like. Despite the oceans of e-ink used every day to talk about the IoT, we know that practical and authoritative content about this topic is still hard to come by. We hope that this book will bring some order to the chaos by proposing a pragmatic and structured methodology to building IoT devices and services, one inherited from our own experience building large-scale commercial systems for connected devices.
Because every actor wants to get a slice of the future pie, there are literally hundreds of competing standards for connected devices. The my protocol is better than yours attitude has been the major cause of the fragmentation of the IoT world and the reason why its plagued by constant wheel reinventions and a severe lack of proper innovation. All existing applications, tools, and mechanisms need to include support for every new protocol that appears. And with the hundreds of protocols already out there that need to be integrated and maintainedwell, you get the idea!
When we started working on the Web of Things about a decade ago, our objective was to pause a bit and reflect on what could be done to realize the full potential of the IoT. At that time, it was clear that most projects tackled only smaller issues of the IoT. Few projects tried to look at the bigger picture of the IoT and ask, What problems are we really trying to solve and how can we make it easier to innovate?
Almost everyone was trying to build a global network optimized for devices and data-driven applicationsfrom scratch! Web of Things people like us, on the other hand, decided to look into and learn from the most successful application layer of them all: the web. The web scales, its open and easy to take part in, and best of all, its versatile! If its good enough for banking services, games, chat rooms, and changing the media industry, why wouldnt it be good enough for the Internet of Things?
Turns out, it is! We wrote this book to show you not only the why but also the how. We hope it will equip you with the understanding and tools necessary to thrive in a world where most physical objects have a digital life of their own thanks to web protocols. This book is about not reinventing the wheel where it isnt needed. And, as youll see, it can be a lot of fun to reuse solid web protocols to build ever bigger, smarter, and simpler Thingsto build the Web of Things!
D OM & V LAD
Acknowledgments
We learned the hard way that writing a book is not as trivial as it seems. Oh, well just refresh our PhD theses and were done in a few weeks has gradually turned into OK, well, I guess well have to write these chapters from scratch over the next few months. What about the source code? Which source code? Lets just rewrite this whole thing in Node.js! Nevertheless, the many weekends and late nights we spent putting together this book have been a lot of fun and a unique challenge. Distilling all the knowledge we acquired over a decade of R&D into a single book and making sure that book is easy to use has been a tough and very motivating aspiration.
Obviously, many people helped us in this adventure, and this book wouldnt have existed without their support and contributions, so its time to give credit where its due!
First and foremost, wed like to thank the entire team at Manning. Theyve been both very demanding and incredibly encouraging, and their feedback on the content and form of this book throughout its evolution from some ideas to what youre holding in your hands has been extremely valuable. Thanks to Michael Stephens for believing in the book and encouraging us to make it great. Thanks to Lesley Trites for her continuous support and constructive feedback and suggestions all along: by the last chapter, it was clear that shed become an expert in this field! Thanks to Candace Gillhoolley for her energy in finding new ways of marketing the book. Finally, thanks to Melody Dolab, Kevin Sullivan, and everyone else at Manning involved in the production of the book.
Wed also like to thank all the reviewers of the book for their constructive and encouraging remarks, in particular Scott Chausse, who offered suggestions on the overall technical content, and Valentin Crettaz, who gave all chapters a full technical proofread. Many others provided invaluable feedback throughout the process: Alain Couniot, Alvin Scudder, Brent Stains, Gonzalo Huerta-Canepa, Harald Kuhn, Joel Kotarski, Lance May, Kenneth Fricklas, Mayur S. Patil, Philip Arny, Rocio Chongtay, Roy Legaard, Jr., Sander Rossel, Sebastian Haehnel, Steve Grey-Wilson, Troi Eisler, and William Wade.
Next wed like to thank all the people who supported our research and work on the Web of Things. Weve had the chance to work with those who pioneered the IoT, such as Professor Sanjay Sarma at MIT and Professors Friedemann Mattern and Elgar Fleisch at ETH Zurich. A special thanks goes to Friedemann, who was also our PhD advisor. He has been an incredibly inspiring mentor, giving us the freedom to explore the Web of Things.
Thanks to all our colleagues at EVRYTHNG: to our cofounders Andy Hobsbawm and Niall Murphy, to our first readers Albert Zaragoza and Joel Vogt, to Laura Lilienthal for boosting the marketing of our book, but also to the rest of the dream team. They all contributed to this book in one way or another, and were very grateful for that! Building the Web of Things (WoT) with them for the last few years has been a blast, and weve barely scratched the surface of what it can do.