Anyone searching online for the term “IoT platform” will be shown at least 200 million
results within a second. This is the level of proliferation that IoT has achieved (particularly
IoT platforms) in the past several years. The IoT platform is an integral part of any IoT
solution, underscoring the importance of having this platform well built.
Whether you develop a bespoke platform, buy it as an off-the-shelf product, or subscribe
to the service, it will mean a lot to your final product. Moreover, the term IoT platform has
many connotations, and vendors have overused it to a point where it does not convey
anything meaningful.
As businesses and working scenarios keep evolving, I see many smaller companies
delving into IoT. However, not having your own IoT platform is one of the impediments to
this evolution. The easy and lazy answer is available—it is to use a freemium, free trial, or a
third-party platform.
But what lies ahead is a greater challenge. When things scale, costs skyrocket
exponentially. You will find yourself locked in when the trial expires, or freemium is not
enough. Switching over is neither simple nor easy.
Additionally, buying an off-the-shelf solution often means that you subordinate
requirements or retrofit things to suit what is available. As a result, you might end up
building a subpar solution, if not an outright bad one. If having full flexibility and control
means something to you, this book is for you.
I chose to write this book as I saw many of my customers struggling to understand the
IoT platform landscape. Unfortunately, the state of the play has not been balanced, with
many vendors convoluting the offering to make it look like the greatest thing ever built. They
have raised artificial constraints for short-term gains and showed superficial problems that
only their offering can solve.
I believe in empowering customers, and this book is a humble attempt to do it.
The book is not about building a full-blown enterprise-grade system. It is about being
agile in a true sense and reducing time to the market without breaking the bank. It is about
designing something that you can scale incrementally without doing a lot of rework or
disrupting your current state of the work.
If you are a small- to medium-sized company or part of the development team at a non-
IT company, you will find this book quite useful. If you are an independent developer,
researcher, or learner, you will see the usefulness of the content for your endeavors too.
Finally, you will find this hands-on book equally useful whether you are new to the
programming world or have basic to intermediate programming skills.
, The book supports the idea of being frugal at the start and then investing only when and
where necessary. It would help you tap into technology advancements without bank-
breaking budgets and get off the ground quickly, contrary to the longer times required to
adapt to the off-the-shelf or freemium platforms. More importantly, you will fully control
what you are developing throughout the process.
Throughout 15 chapters of this book, I guide you through the step-by-step process of
building your own IoT platform. Of course, there are must-haves and nice-to-haves; I will
distinguish between the two and focus on how to build the must-haves. As a result, you will
not only save heaps but also enjoy a control-wielding and satisfying learning experience.
Chapter 1 discusses the necessary and sufficient qualities that any IoT platform must
have and why. I also elaborate on the key question of why you should build your own.
Building your own means understanding at the ecosystem level is important; we do that
in Chapter 2, where block diagram–level details of the IoT platform are discussed.
Better planning is a key to success that reduces confusion and agony later. So, I cover a
platform wish list and the technical and general requirements for building our platform
in Chapters 3 and 4.
The rubber actually hits the road in Chapter 5, where we initialize the cloud instance,
install the required software stack, and apply security. If you are eager to jump into the “how”
of building things, this is where you might want to start (and read about the “why” later).
One of the core elements of the platform is a two-way messaging system bus, which is
explained in Chapter 6, along with the installation of broker software and securing it.
Building critical platform components and the message broker extension with additional
functionality are covered in Chapter 7. Finally, additional configurations and testing the
core built to that point are covered in Chapter 8.
In Chapter 9, additional microservices and data access APIs are covered, along with the
foundation for the rule engine. Then we build a full rule engine and authentication
mechanism in Chapter 10.
In Chapter 11, we add documentation and provide the testing facility for developers
with the interactive API documentation.
The response was awesome after we published the first edition back in 2019. However,
every second person I met or interacted with online suggested that a little bit about
hardware interfacing with this platform could have helped. Moreover, quite a few people
pointed out that it would put things in perspective if I discussed real-life use cases where this
platform has been used. Considering all these inputs and feedback over the past few years, I
am happy to add three more chapters to this edition.
, Chapter 12 discusses various ways you could connect your hardware with this platform.
Again, I am not going through low-level details per se; however, the principles discussed
would help you execute them effectively.
Chapter 13 discusses an interesting case study, where we (my team and I in Knewron
Technologies) built a smart and better mousetrap for a few of our clients. I talk about the
project’s origin story, decision making for hardware and software selection, and some
learning and takeaways.
In addition to one full-length case study, I have included a few more practical applications
that my team and I implemented for our clients in Chapter 14. These applications will give
you some perspective and ideas about how people have been using IoT in many different
ways.
Finally, in Chapter 15, I address a few commonly asked questions in various forums and
discuss a few advancements in progress, which you might want to add to the platform when
you build it. As I conclude, I leave you with a few possibilities to experiment.
Remember that all the code and configuration files discussed in this book are available
on GitHub. Feel free to star, fork, or download them as you wish, and if you have more to add
or suggest, I will be happy to hear from you.
I wish you all the best on this interesting journey and sincerely hope that you will enjoy
the book as much as I enjoyed writing it!
Any source code or other supplementary material referenced by the author in this book is
available to readers on GitHub via the book’s product page, located at
https://link.springer.com/book/10.1007/978-1-4842-8072-0.
Acknowledgments
I am grateful to my entire family: my son, daughter, and wife, my daily sources of inspiration
and energy. My humble regards to my father, who nurtured my love of books since
childhood; my mother, who supported my quests; and my sister and all my in-laws, who have
encouraged and supported me in all my endeavors. My sincere thanks to the Apress team—
Spandana and Shrikant—for their continued support and for helping to bring this book to
life. Special thanks to Atonu for his careful review and helpful feedback.
Thanks to my friends who helped in the initial review of a few chapters with their
valuable feedback—Peter Vinogradoff, Prof. Pradnya Kulkarni, Prof. Dipalee Rane, and
Gregory Bell. Their inputs helped shape and make this book more suitable for the target
audience.
Table of Contents
Chapter 1: So… You Want to Build Your Own!